n8n

How to Automate Airtable Chat Data Analysis?

Talk to your Airtable data in plain English. Ask for records, totals, trends, or a quick map from any base. Great for operations and support teams that need fast answers without digging through many views.

Behind the chat, an AI agent powered by OpenAI plans the steps and runs the right tools. It can list bases, read the table schema, and then build a clean filter and field list before searching records. A code step handles math like averages and sums, and a map step turns coordinates into a shareable image link using a Mapbox key. Smart routing joins and formats results so replies stay clear and focused. The flow can also create an assistant thread to return file links when needed.

Connect your Airtable token, OpenAI key, and Mapbox public key, then send a message to the chat webhook to test. Sample prompts include show 10 latest orders, average revenue this week, or map these locations. Teams get faster answers and fewer errors, which saves hours each week compared to manual queries. Useful for quick order lookups, product checks, store locator maps, and simple data reviews across different departments.

What are the key features?

  • Chat webhook trigger captures chatInput and sessionId for each conversation
  • OpenAI functions agent with memory plans up to 10 tool calls to answer a request
  • Gets Airtable base list and table schema to guide safe queries and field selection
  • Generates structured filters based on schema, then searches records with limit, sort, and fields
  • Processes numbers with a code step to calculate sums, averages, and other simple stats
  • Creates a static map image link from coordinates using a Mapbox public key
  • Switch, Merge, and Aggregate nodes route actions and combine records into one clean reply
  • Assistant thread nodes create and fetch files, then return a direct download URL
  • Window buffer memory keeps conversation context across messages

What are the benefits?

  • Reduce manual lookups from 30 minutes to 2 minutes
  • Automate 80 percent of routine data questions from teams
  • Improve query accuracy by using the live table schema
  • Connect chat, Airtable, and map images in one place
  • Handle more parallel requests with session based memory

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n, click the three dots menu, select 'Import from File', then choose the downloaded JSON file
  2. You'll need accounts with Airtable, OpenAI and Mapbox. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create an Airtable Personal Access Token. Give it access to the bases you want to query. Name the credential so you can find it later.
  4. In the n8n credentials manager, create an OpenAI API Key credential. Paste your key from the OpenAI API page and save it.
  5. Get your Mapbox public access token from your Mapbox account. Open the Create map image or related code node and replace the placeholder key with your token as noted in the sticky note.
  6. Open the OpenAI Chat Model and AI Agent nodes and select your OpenAI credential from the Credential to connect with dropdown. Pick a model you have access to.
  7. Open the Get Bases, Get Base/Tables schema, and Airtable - Search records nodes. Select your Airtable credential in each node.
  8. If any node shows Credential to connect with is empty, double click the node, click Create new credential, then follow the on screen steps to connect that service.
  9. Open the When chat message received node and copy its test URL. Use an HTTP client to send a JSON body with chatInput and sessionId to verify it receives messages.
  10. Check the Switch and If nodes for default paths. Keep the provided rules unless you need custom routing.
  11. Save the workflow and set it to Active when your test messages return valid responses with records or maps.

How do you test it?

  1. Run Get list of bases and confirm you receive a list of base IDs and names in the node output
  2. Run Get base schema with a base_id and confirm each table has fields with types
  3. Execute OpenAI Generate search filter with a sample request and the schema. Confirm it returns a clear filter and field list
  4. Run Airtable Search records with the generated filter. Confirm records array is returned and fields match your selection
  5. Test Process data with code using a small set of numbers. Confirm the node outputs the expected sum or average
  6. Test Create map image with two coordinates and open the link. Confirm the image loads without errors
  7. Send a full chat request to the webhook with chatInput and sessionId. Verify the final Response node returns a clean answer and any file URL works
  8. Review n8n execution logs for errors or slow steps, then set the workflow to Active and share the chat endpoint with your team

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Airtable

Sign up

Free (1,000 API calls / mo)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.