At a glance
- Trigger
- Chat Trigger (When chat message received)
- Nodes
- 30
- Apps
- OpenAI and Airtable
- AI nodes
- 9
- Credentials
- 3 types
- Category
- Spreadsheets, databases and docs
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
AI Agent to chat with Airtable and analyze data
Made by Mark Shcherbakov from community 5minAI
Engaging with data stored in Airtable often requires manual navigation and time-consuming searches. This workflow allows users to interact conversationally with their datasets, retrieving essential information quickly while minimizing the need for complex queries.
This workflow enables an AI agent to facilitate chat interactions over Airtable data. The agent can
- Retrieve order records, product details, and other relevant data.
- Execute mathematical functions to analyze data such as calculating averages and totals.
- Optionally generate maps for geographic data visualization.
- Dynamic Data Retrieval: The agent uses user prompts to dynamically query the dataset.
- Memory Management: It retains context during conversations, allowing users to engage in a more natural dialogue.
- Search and Filter Capabilities: Users can perform tailored searches with specific parameters or filters to refine their results.
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Set up steps
- Separate workflows
- Create additional workflow and move there Workflow 2.
- Replace credentials
- Replace connections and credentials in all nodes.
- Start chat
- Ask questions and don't forget to mention required base name.
... or watch set up video [20 min]
Replace Mapbox public key - in code
Nodes in this workflow
The 30 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- OpenAI Chat Model (OpenAI Chat Model)
- AI Agent (AI Agent)
- Window Buffer Memory (Window Buffer Memory)
- When chat message received (Chat Trigger)
- Execute Workflow Trigger (Execute Workflow Trigger)
- Response (Edit Fields (Set))
- Switch (Switch)
- Aggregate (Aggregate)
- Aggregate1 (Aggregate)
- Merge (Merge)
- Aggregate2 (Aggregate)
- If1 (If)
- Response1 (Edit Fields (Set))
- Search records (Call n8n Workflow Tool)
- Process data with code (Call n8n Workflow Tool)
- Create map image (Code Tool)
- Get list of bases (Call n8n Workflow Tool)
- Get base schema (Call n8n Workflow Tool)
- Get Bases (Airtable)
- Get Base/Tables schema (Airtable)
- If filter description exists (If)
- Airtable - Search records (HTTP Request)
- OpenAI - Generate search filter (HTTP Request)
- Set schema and prompt (Edit Fields (Set))
- Upload file to get link (HTTP Request)
- OpenAI - Download File (HTTP Request)
- OpenAI - Get messages (HTTP Request)
- OpenAI - Run assistant (HTTP Request)
- OpenAI - Send message (HTTP Request)
- OpenAI - Create thread (HTTP Request)
Credentials you need
- Airtable API – used by Airtable - Search records, Get Base/Tables schema and Get Bases
- HTTP Query Auth – used by Airtable - Search records
- OpenAI API – used by OpenAI - Create thread, OpenAI - Download File, OpenAI - Generate search filter and OpenAI - Get messages and others
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.