webhookAPI

Other systems can use Gaio's analytical intelligence through APIs. This feature allows you to connect Gaio flows to external services via RESTful APIs, using secure authentication through API Keys.


How to Use


1. Access the API Tab

  • On the left-hand panel, click the API icon.

  • Use the API Key tab to create and manage your keys.

  • Use the API tab to configure API calls to external services.


2. Create an API Key

  1. Click the "+" button in the upper right corner of the API Key tab.

  2. Fill out the fields:

    • Name: Name of the key (e.g., Doc).

    • Status: Select Active.

  3. Click generate.

  4. Once the key is generated, copy and save it securely.

  5. To view or renew the key, use the eye icon or the renew button.

  6. Click Save.


3. Configure an API Integration

  1. Go to the API tab and click "+" to add a new integration.

  2. Fill in the fields:

    • Name: Integration name (e.g., SendToCRM).

    • Endpoint: Only the final endpoint name (e.g., https://api.example.com/send).

  3. Configure authorization token:

    1. Choose where the authorization token will be read from.

      1. Supported locations:

        • Header (recommended)

        • Query parameters (if required)

  4. Select flow (optional): choose the Gaio flow to be executed when the API is called.

  5. Input data in a table (optional): Optionally, map incoming API data into a table.

    1. When defined:

      1. Incoming request data is stored as rows

      2. The table becomes available to the executed flow

      3. Enables batch processing, auditing, and traceability

  6. Output type: Define how the API response will be generated.

    1. Table → Return data from a table

    2. Custom → This enables a manual response body definition.

Example Custom Response:

  1. Return table: select the table that contains the data that will be consumed via API.

  2. Go to the API Key tab and check the previously created key.

  3. Click Save.


4. API Task · MCP Tool

The MCP Tool tab allows you to expose an existing API Task as a callable tool for AI agents. Once enabled, the API can be invoked programmatically by agents during reasoning and execution. This transforms your API into a first-class AI tool, usable within chat agents, flow agents, and automated decision-making pipelines.

The MCP Tool configuration defines:

  • How the API is presented to AI agents.

  • What input the agent must provide.

  • Whether the tool is available for execution.

  • How the agent understands when and why to call it.

How to configure MCP Tool

  1. Enter a clear and action-oriented tool name.

  2. Describe what the tool does and when it should be used.

  3. Define the expected input schema for the tool.

  1. Click Generate to auto-create an input schema based on the API configuration.

  2. Toggle the Status switch to enable or disable the tool.


5. Execution and Results

After saving the configuration:

  • The API can be triggered manually or as part of an automated process in Gaio.

  • If a process is selected, it is executed whenever a Gaio API endpoint is called. This means that any analysis can be performed through calls external to Gaio, such as creating/applying a predictive model, inserting, deleting, calling external APIs (REST), accessing data sources external to Gaio, and all other features.

  • Row limit : It is possible to limit the number of rows to be returned by the Gaio API, even if the generated table has millions of rows.

  • Use limit and offset parameters to implement pagination and navigate through large datasets.

  • Retrieve data in pages using the limit and page parameters for better user experience with large datasets.

  • Add custom parameters to filter and customize API responses based on specific criteria. If the query that precedes the API task filters the table with this parameter, only the requested data will be sent in the API result. Example: enter the client code in the API call and Gaio will return the products to offer for that specific client.

circle-exclamation

API Task · Live Requests

The Live Requests tab allows you to monitor API calls in real time after the API Task is executed. It provides visibility into incoming requests, execution behavior, and runtime data, making it an essential tool for debugging and observability.

What You Can See

After the API is called, each request appears in the Live Requests panel with:

  • Incoming request data

  • Parameters and payload

  • Execution context

  • Response or execution result

  • Errors (when applicable)

This information is displayed in real time, without requiring redeployment or restarts.

Typical Use Cases

  • Debugging authentication issues

  • Validating request payloads

  • Monitoring flow execution behavior

  • Verifying custom output responses

  • Observing agent-triggered API calls

  • Troubleshooting external integrations


Best Practices

  • Security: Never share your API Key. Use the Inactive status to temporarily disable access.

  • Versioning: Create new entries for APIs with structural changes.

  • Validation: Test endpoints manually before embedding in automation flows.

Last updated