[FMP Tip-n-Trick] – Integrating A.I. with FileMaker for Marketing Research
By Doug West
Have you considered using an AI service for some market research? What began as a relatively simple concept turned into a frustrating cycle of trial and error with various input prompts and widely varied results.
The goal was to fully automate a data collection workflow with real-world data found on the web. The ChatGPT API was quickly ruled out because it didn’t support real-time web browsing without a cumbersome integration with a separate web search API. That began the quest for a prompt syntax that would produce consistent results, formatted appropriately for use in FileMaker.
Required Steps:
Find an input prompt that produces reliable results (Not as easy as it sounds!)
Pass the prompt into an AI service in a web viewer
Wait while the dynamic web content is collected and displayed
Parse the delimited data from the web viewer content
Use FileMaker’s native commands to write the results to a text file and import as comma-separated values
Sample Prompt:
“Display a preformatted .csv file with at least 10 pizza shops in ZIP Code 10001. Include only the business name and street address. Add a “|” character at the end of each result.”
Testing produced more consistent results using https://copilot.microsoft.com instead of https://chatgpt.com. Both currently allow the prompt text to be passed in the URL as a query string (using the “?q=prompt” syntax). Both also tend to include unwanted formatting tags throughout the response when attempting to extract the data from the web viewer content.
Asking specifically for a “preformatted .csv file” produced consistent results that did not include HTML tags that got in the way when parsing. The results seemed to have everything we needed when displayed in the web viewer. Unfortunately, line breaks didn’t exist behind the scenes when using FileMaker to capture the web viewer content. That’s where the instruction to “Add a “|” character at the end of each result” comes in. Replacing the “|” character with a line break before writing the data to a text file for import solves the last challenge in this exercise.
Below is a link to download the prompt to use for your own AI Research Assistant.
•• Download AIResearchAssistant.zip ••
**This article is provided for free and as-is, use, enjoy, learn, and eXperiment at your own risk – but have fun! eXcelisys does not offer any free support or free assistance with any of the contents of this blog post. If you would like help or assistance, please consider retaining eXcelisys’ FileMaker Pro consulting & development services.
About eXcelisys, Inc. : Founded in 2001, eXcelisys (www.excelisys.com) was an FBA Platinum Partner from 2014-2018, FBA member from 2002 – 2020 and still a FileMaker Certified developer organization since version 7. eXcelisys specializes in designing, developing, customizing, supporting, consulting, migrating, upgrading, fixing, and integrating of database solutions for Desktop, Mobile, and Web applications. Our core technology competencies are FileMaker Pro and MySQL for database frameworks, along with FileMaker WebDirect, WordPress, MySQL, PHP, CodeIgniter, PostgreSQL, CSS, HTML5, and Javascript for web sites and web applications. Aside from providing eXcellent customer service, our goals are to use these technologies to intuitively automate your organization’s data solution needs seamlessly and flawlessly across the web, mobile, and desktop platforms. Contact eXcelisys today for a free estimate and consultation about making your business more efficient through intuitive and effective software automation. 866-592-9235.
eXcelisys, Inc. is an independent entity and this web site/information/blog post has not been authorized, sponsored, or otherwise affiliated with Claris, Inc. FileMaker is a trademark of Claris, Inc., registered in the U.S. and other countries.
Leave A Comment