Node Details

  • Name: airtableAgent
  • Category: Agents
  • Version: 2.0

Description

This agent is used to answer queries on Airtable tables. It leverages a language model to interpret user questions, generates Python code to analyze the Airtable data, and then provides human-readable answers based on the analysis results.

Parameters

  1. Language Model (Required)
    • Type: BaseLanguageModel
    • Description: The language model used for interpreting queries and generating responses.
  2. Base Id (Required)
  3. Table Id (Required)
  4. Return All (Optional)
    • Type: boolean
    • Default: true
    • Description: Determines whether to return all results or limit the number of results.
  5. Limit (Optional)
    • Type: number
    • Default: 100
    • Description: The maximum number of results to return if “Return All” is set to false.
  6. Input Moderation (Optional)
    • Type: Moderation
    • Description: Applies moderation to detect potentially harmful input before processing.

Credentials

  • Credential Name: airtableApi
  • Required Parameter: accessToken (Airtable API access token)

Input

  • A natural language query about the data in the specified Airtable table.

Output

  • A detailed answer to the query, based on analysis of the Airtable data.

How It Works

  1. The agent first retrieves data from the specified Airtable base and table using the provided credentials.
  2. The data is converted to a Pandas DataFrame using Pyodide (a Python runtime for the browser).
  3. A language model interprets the user’s query and generates Python code to analyze the data.
  4. The generated Python code is executed using Pyodide to perform the analysis.
  5. The results of the analysis are then passed back to the language model to generate a human-readable response.
  6. The final answer is returned to the user.

Use Cases

  • Querying Airtable data without writing complex formulas or scripts.
  • Generating insights and summaries from Airtable tables.
  • Performing data analysis on Airtable content using natural language queries.

Notes

  • The node uses Pyodide to run Python code in a JavaScript environment, allowing for powerful data analysis capabilities.
  • Input moderation can be applied to prevent potentially harmful queries.
  • The node supports both streaming and non-streaming response modes. This Airtable Agent node provides a powerful interface for interacting with Airtable data using natural language, making it easier for users to gain insights from their Airtable bases without needing to write complex queries or scripts.