Files
n8nworkflows.xyz/workflows/Query Airtable data from ChatGPT using an MCP server-13458/readme-13458.md
T
nusquama f18ffb040c creation
2026-02-23 12:03:07 +08:00

12 KiB
Raw Blame History

Query Airtable data from ChatGPT using an MCP server

https://n8nworkflows.xyz/workflows/query-airtable-data-from-chatgpt-using-an-mcp-server-13458

Query Airtable data from ChatGPT using an MCP server

disclaimer Le texte fourni provient exclusivement dun workflow automatisé réalisé avec n8n, un outil dintégration et dautomatisation. Ce traitement respecte strictement les politiques de contenu en vigueur et ne contient aucun élément illégal, offensant ou protégé. Toutes les données manipulées sont légales et publiques.

1. Workflow Overview

This workflow turns n8n into an MCP (Model-Client-Protocol) server that exposes Airtable search capabilities as AI tools. External AI clients (e.g., ChatGPT with Developer Mode enabled or a custom GPT) can connect to the MCP endpoint and query Airtable tables using natural language; the client then calls the appropriate tool(s) hosted by this n8n workflow.

1.1 MCP Server Entry Point (Tool Host)

  • Provides an MCP endpoint (webhook-like URL) that an AI client connects to.
  • Registers n8n “AI Tool” nodes (Airtable search tools) so the client can call them.

1.2 Airtable Search Tools (Data Access Layer)

  • Two Airtable Tool nodes are exposed:
    • Search Contacts table
    • Search Companies table
  • Each tool performs a search operation against the configured base/table.

1.3 Documentation / Operator Notes

  • Sticky notes describe setup steps (Airtable token scopes, configuring n8n credentials, and connecting ChatGPT to the MCP URL).
  • Includes a link to a video walkthrough.

2. Block-by-Block Analysis

Block A — MCP Server Entry Point (Tool Registration + Endpoint)

Overview:
Creates the MCP server endpoint in n8n and acts as the host/registry for AI tools. External AI clients connect to this endpoint and can invoke the registered Airtable tools.

Nodes Involved:

  • Airtable CRM MCP Trigger

Node: Airtable CRM MCP Trigger

  • Type / Role: @n8n/n8n-nodes-langchain.mcpTrigger — MCP server trigger node; exposes an MCP endpoint and receives tool calls from an MCP-capable client.
  • Key configuration (interpreted):
    • Path/Webhook ID: 20c5d050-e533-469d-a15e-98da73e32cf7
      This becomes part of the MCP URL path used by clients.
  • Connections:
    • Inputs: Receives tool invocations from an MCP client (not a traditional n8n wire input).
    • Outputs: Not used as a typical “data output” node here; instead it collects tool definitions via the special ai_tool connections from the Airtable Tool nodes.
  • Version-specific requirements:
    • Uses typeVersion 2; requires an n8n version that includes the LangChain/MCP nodes (@n8n/n8n-nodes-langchain).
  • Edge cases / failure modes:
    • Client cannot connect if the workflow is not active/published or if networking/reverse proxy blocks the endpoint.
    • Wrong URL (test vs production URL) or wrong path leads to 404/connection errors.
    • If no tools are connected via ai_tool, the MCP server will expose no useful actions.
    • Authentication/authorization to the n8n instance (if configured) may block external clients unless allowed.
  • Sub-workflow reference: None (this workflow does not call other workflows).

Block B — Airtable Search Tools (Contacts + Companies)

Overview:
Defines two Airtable-backed tools that an AI client can call. Each tool searches a specific table in a specific base using the Airtable Personal Access Token configured in n8n.

Nodes Involved:

  • Search Contacts
  • Search Companies

Node: Search Contacts

  • Type / Role: n8n-nodes-base.airtableTool — Airtable node configured as an AI tool so the MCP server can expose it to the AI client.
  • Key configuration (interpreted):
    • Operation: search
    • Base: “Contacts (YT n8n Tutorial Base)” (app1bfDNQWWNpiwal)
    • Table: “Contacts” (tblubuxXAzrkV59GY)
    • Options: empty/default (no extra filters/options configured in this workflow JSON)
  • Credentials:
    • Uses Airtable Personal Access Token credential: Airtable Personal Access Token account
    • Token must have appropriate scopes (see sticky note): read/write records and schema read.
  • Connections:
    • Output (ai_tool): Connected to Airtable CRM MCP Trigger via the ai_tool channel, registering this node as a callable tool.
    • No standard data input is wired; parameters are driven by the tool call payload from the MCP client.
  • Version-specific requirements:
    • Uses typeVersion 2.1 of the Airtable Tool node.
  • Edge cases / failure modes:
    • 401/403 if token is invalid or missing required scopes.
    • 404/base/table not found if base/table IDs dont exist or were changed.
    • Schema mismatch if the client searches using fields that dont exist (depending on how the tool constructs its query internally).
    • Rate limits from Airtable if many searches are executed rapidly.
    • Empty results are valid outcomes and should be handled by the calling AI client.

Node: Search Companies

  • Type / Role: n8n-nodes-base.airtableTool — second Airtable AI tool for a different table.
  • Key configuration (interpreted):
    • Operation: search
    • Base: “Contacts (YT n8n Tutorial Base)” (app1bfDNQWWNpiwal)
    • Table: “Companies” (tblih4kyMEc5y5Fsx)
    • Options: empty/default
  • Credentials:
    • Same Airtable Personal Access Token credential as above.
  • Connections:
    • Output (ai_tool): Connected to Airtable CRM MCP Trigger via the ai_tool channel.
  • Version-specific requirements:
    • Uses typeVersion 2.1.
  • Edge cases / failure modes:
    • Same as “Search Contacts” (auth, base/table mismatch, rate limiting, empty result sets).

Block C — Embedded Operator Notes (Sticky Notes)

Overview:
Two sticky notes provide human guidance: overall setup instructions and a video link. They do not affect execution but are important for reproducing and operating the workflow.

Nodes Involved:

  • Workflow Description (sticky note)
  • Video Walkthrough (sticky note)

Node: Workflow Description (Sticky Note)

  • Type / Role: n8n-nodes-base.stickyNote — documentation.
  • Content highlights (interpreted):
    • Explains the purpose: MCP server exposing Airtable as AI tools.
    • Setup steps: create Airtable token with scopes:
      • data.records:read
      • data.records:write
      • schema.bases:read
    • Add token to n8n credentials.
    • Enable Developer Mode in ChatGPT and add MCP server URL as an app.
    • Configure base/tables and copy production URL from MCP trigger node after publishing.
  • Edge cases: None (non-executable).

Node: Video Walkthrough (Sticky Note)

  • Type / Role: n8n-nodes-base.stickyNote — documentation with link.
  • Content (link preserved):
  • Edge cases: None (non-executable).

3. Summary Table

Node Name Node Type Functional Role Input Node(s) Output Node(s) Sticky Note
Airtable CRM MCP Trigger @n8n/n8n-nodes-langchain.mcpTrigger Hosts MCP endpoint; registers and exposes AI tools to MCP clients (MCP client / external) (Tool registry via ai_tool)
Search Contacts n8n-nodes-base.airtableTool AI tool: search Airtable “Contacts” table (Called by MCP tool invocation) Airtable CRM MCP Trigger (ai_tool)
Search Companies n8n-nodes-base.airtableTool AI tool: search Airtable “Companies” table (Called by MCP tool invocation) Airtable CRM MCP Trigger (ai_tool)
Workflow Description n8n-nodes-base.stickyNote Embedded operational notes and setup requirements ## Workflow Overview\n\nThis workflow creates an MCP (Model-Client-Protocol) server that exposes your Airtable data as AI-powered tools, allowing external applications like ChatGPT or custom GPTs to query your data using natural language.\n\n### First Setup\n\n1. Airtable Connection: Create an Airtable Personal Access Token at airtable.com/create/tokens with the following scopes:\n - data.records:read\n - data.records:write\n - schema.bases:read\n\n2. n8n Credential: Add the token to n8n by creating a new Airtable Personal Access Token API credential.\n\n3. External Application: To use this server, enable Developer Mode in ChatGPT settings (or your preferred AI client) and add the MCP Server URL as a new app.\n\n### Configuration\n\n- Airtable Base & Tables: Update both Airtable Tool nodes to point to your own Airtable base and tables instead of the default Contacts and Companies tables.\n- Search Tools: Customize which tables are searchable or add additional Airtable Tool nodes for more tables.\n- MCP Endpoint: After publishing, copy the Production URL from the MCP Server Trigger node to connect external applications.\n\nOnce configured and published, external AI applications can query your Airtable data in real-time using natural language.
Video Walkthrough n8n-nodes-base.stickyNote Embedded video link for workflow explanation # Video Walkthrough\nimage.png

4. Reproducing the Workflow from Scratch

  1. Create Airtable Personal Access Token

    1. Go to https://airtable.com/create/tokens.
    2. Create a token granting these scopes:
      • data.records:read
      • data.records:write
      • schema.bases:read
    3. Ensure the token has access to the target base(s).
  2. Create n8n Airtable Credential

    1. In n8n: Credentials → New.
    2. Choose Airtable Personal Access Token API.
    3. Paste the token and save (name it e.g., “Airtable Personal Access Token account”).
  3. Add the MCP Trigger Node

    1. Create a new workflow.
    2. Add node: MCP Trigger (LangChain / MCP).
    3. Set the Path (or let n8n generate one). In this workflow it is:
      20c5d050-e533-469d-a15e-98da73e32cf7
    4. Save the workflow.
  4. Add “Search Contacts” Airtable Tool

    1. Add node: Airtable Tool.
    2. Select your Airtable Personal Access Token credential.
    3. Configure:
      • Operation: Search
      • Base: select your base (or paste base ID)
      • Table: select “Contacts” (or your equivalent table)
    4. Leave options at defaults unless you need filters/limits.
  5. Add “Search Companies” Airtable Tool

    1. Add another Airtable Tool node.
    2. Use the same Airtable credential.
    3. Configure:
      • Operation: Search
      • Base: same base (or your base)
      • Table: “Companies” (or your equivalent table)
  6. Connect Tools to the MCP Trigger

    1. From Search Contacts, connect its AI Tool output (ai_tool) to Airtable CRM MCP Trigger.
    2. From Search Companies, connect its AI Tool output (ai_tool) to Airtable CRM MCP Trigger.
    • Note: This is not a standard “main” connection; it must be the tool connection type so the MCP Trigger can register the nodes as tools.
  7. (Optional) Add Sticky Notes

    1. Add a Sticky Note for setup instructions (token scopes, configuration guidance).
    2. Add a Sticky Note with the video link: https://youtu.be/lQh1fuIrBN8
  8. Activate/Publish and Retrieve the MCP URL

    1. Activate the workflow (and publish if your n8n deployment requires publishing for production URLs).
    2. Open the MCP Trigger node and copy the Production URL (naming may vary by n8n version).
    3. This URL is what the external AI client will use as the MCP server address.
  9. Connect from an External AI Client (ChatGPT / Custom GPT)

    1. Enable Developer Mode (or the equivalent MCP/app integration setting).
    2. Add a new MCP server/app and paste the MCP URL from step 8.
    3. Verify that two tools are available to the client: “Search Contacts” and “Search Companies”.

5. General Notes & Resources

Note Content Context or Link
Airtable token scopes required: data.records:read, data.records:write, schema.bases:read From “Workflow Description” sticky note
Configure both Airtable Tool nodes to point to your own base/tables From “Workflow Description” sticky note
After publishing, copy the Production URL from the MCP Trigger to connect external apps From “Workflow Description” sticky note
Video walkthrough link https://youtu.be/lQh1fuIrBN8
Thumbnail image used in sticky note https://vasarmilan-public.s3.us-east-1.amazonaws.com/blog_thumbnails/thumbnail_recidrbznaXlmqFUI.jpg