Skip to main content

AI Actions

AI Actions allow the bot to do things, not just respond: by connecting an action to a webhook or an API, the AI calls it during the conversation to check calendar availability, search for an order, book an appointment, create a ticket, or anything reachable via HTTP. The AI decides when to use the action based on the instructions you give it, collects the necessary data from the visitor, calls your endpoint, and inserts the result into the response.

AI Actions — initial screen

Where to find it​

  1. Select a bot from the Select bot menu.
  2. In the sidebar, choose AI Actions.

Actions are available wherever the bot's AI is used: AI chat mode, Advanced AI (knowledge) mode, and the AI Assistant blocks within the Flow Builder. You can limit which actions a single AI Assistant block can use from the block's settings.

Example conversation with two actions (one checks availability, the other books):

Visitor: Can I come tomorrow at 2 PM? (executes Check availability) Bot: Tomorrow at 2 PM is busy, but I have openings at 3:00 PM, 3:30 PM, or 4:15 PM. Does one of these work? Visitor: 3:30 PM works. I'm Sam, sam@example.com (executes Book appointment) Bot: Perfect, you are booked for tomorrow at 3:30 PM. See you soon!

Starting Templates​

When the page is empty, you can start from a pre-configured template to understand how fields are used before creating your own:

  • 🌤️ Weather lookup (demo API) — the simplest example: a single field and a GET call.
  • ⚡ Make / Zapier lookup — to connect a Make or Zapier automation.
  • 🗓️ Background booking (Make / Zapier / n8n) — for long tasks, with delayed response.

How to create an action​

Open the bot's AI Actions page and click New AI Action. The form is divided into four sections.

AI Actions — action creation form

1. What it does​

  • Name — a short label like "Check availability". It also serves to generate the internal key the AI sees (e.g., check_availability).
  • Working indicator text — the text shown in the widget while the action is running, for example "Checking the calendar…". If you leave it empty, the widget shows "Working on it…".
  • When should the AI use this? — the most important field. It is the instruction manual for the action for the AI. Write it as if you were instructing a new colleague: say when to use it, when not to use it, and what to do with the result. Example:

Use this action every time you need to check calendar availability, for example, before booking someone. If the requested time is not available, propose the alternatives you receive in response. Never invent availability.

2. Details the AI collects​

These are the inputs that your destination (webhook/API) receives. The AI collects them from the conversation and asks the visitor for any missing ones. Each field has:

  • Name — preferably lowercase with an underscore (requested_time, order_id). Names are automatically normalized to this format.
  • Type — string, number, boolean, or choice list (the response must be one of the options you define).
  • Description — instructions for the AI on what the value is and how to format it. This is where the heavy lifting happens: you don't need a "data" type, just say exactly the format you want and the AI converts the natural language. Example:

Appointment start time in ISO 8601 with timezone, for example 2026-07-28T14:00:00+01:00. Convert phrases like "tomorrow at 2 PM" into this exact format. Assume Europe/Rome if the visitor does not specify.

  • req — check this if the action cannot proceed without that data. In that case, the AI asks the visitor for it before calling the endpoint.

You can add up to 15 fields with the + Add field button.

3. Connection​

Choose one of the two ways to connect the action:

  • Automation webhook — for Make, Zapier, n8n, Pabbly, or your app. The platform sends a rich JSON payload that includes the collected fields, the conversation context, and a reply URL for background results (see What your endpoint receives, further down). Choose this for automation platforms.
  • Direct API call — calls a REST API directly. Choose the HTTP method; the collected fields are sent as query strings (GET) or JSON body (POST, PUT, PATCH, DELETE). Choose this when an API already returns what you need and doesn't require an intermediary.

For Direct API:

  • URL with placeholder — write {field_name} anywhere in the URL and it will be replaced with the collected value (URL-encoded). Example: https://api.example.com/orders/{order_id}. Fields used as placeholders are not sent again in the body or query.
  • Fixed parameters in the URL are maintained, so https://wttr.in/{city}?format=3 works as is.

Custom headers (up to 15) are used for API keys and other authentications, for both webhooks and API calls. Every request automatically includes:

HeaderContent
X-Aminos-Run-IdUnique execution identifier
X-Aminos-Callback-UrlWhere to POST a background result
X-Aminos-Bot-IdThe bot's ID

Only http and https URLs are allowed; private or local network addresses are blocked.

4. Response handling​

  • Instant — the endpoint responds with the result in the HTTP response body. Great for quick searches and automations. The Timeout field (from 1 to 30 seconds, default 20) indicates how long the bot waits for that response.
  • Background — for longer tasks. The endpoint acknowledges the request, does its work, and then POSTs the result to the callback URL when finished. The bot adds it to the chat automatically, even if the result arrives after it has already responded to the visitor.
  • Include recent conversation transcript in the payload — adds the last 20 messages to the webhook payloads, useful when the automation needs the conversation context.

What your endpoint receives​

Automation webhook payload​

{
"event": "ai_action.invoked",
"action": {
"key": "check_availability",
"name": "Check availability",
"mode": "sync"
},
"run": {
"id": "9c2f1e4a-...",
"callback_url": "https://yourdomain.com/ai-actions/callback/9c2f1e4a-...?token=...",
"expires_at": "2026-07-24T15:30:00+00:00"
},
"params": {
"requested_time": "2026-07-28T14:00:00+01:00",
"duration_minutes": 30
},
"context": {
"bot_id": 123,
"bot_name": "Support Bot",
"session_id": "sess_abc",
"surface": "widget",
"timestamp": "2026-07-24T15:00:00+00:00"
}
}
  • If the transcript option is active, context.conversation contains the last 20 messages.
  • You can preview the exact payload from the action editor, under Preview the payload your webhook receives.

Direct API requests​

  • GET: collected fields are added to the URL as query parameters (placeholders are filled in first).
  • POST / PUT / PATCH / DELETE: collected fields are sent as JSON body.

Returning results​

Instant mode​

What your endpoint returns in the HTTP response body is what the AI sees.

  • JSON is the best choice. If the body is a JSON object with a result or data key, the AI only sees that part; any other JSON is passed through as is.
  • Simple text is also fine: it is automatically wrapped for the AI.
  • A non 2xx status is treated as an error: the AI apologizes and suggests retrying, and it is instructed never to invent a result.
  • Results are limited to 30,000 characters, so return only the data the AI needs, not entire web pages.

Useful trick: include a note field with instructions inside the JSON. The AI reads it as a guide on how to present the data.

{
"result": {
"available": false,
"alternatives": ["15:00", "15:30", "16:15"],
"note": "Propose these alternatives in a conversational tone, in the visitor's local time format."
}
}

Background mode​

  1. Your endpoint responds with any 2xx acknowledgement ("Accepted", empty body, or a small status JSON).
  2. The bot still waits up to your timeout for the result, so quick automations seem instantaneous. If the acknowledgement body already contains significant JSON data, it is treated immediately as a result.
  3. When the work is finished, POST the result as JSON to the run.callback_url received in the payload. The URL already contains the authentication token; you can also send the token in the X-Callback-Token header or in the token field of the body.
  4. If the result arrives after the bot has already responded, the bot automatically sends a follow-up message in chat with the outcome.

Callback body formats:

{ "result": { "whatever": "what you want the AI to see" } }

To report an error:

{ "success": false, "error": "Unable to reach the calendar" }

Details to know:

  • Executions expire 30 minutes after start. Too late callbacks receive HTTP 410.
  • The first result wins: repeated callbacks are confirmed but ignored.
  • Opening the callback URL in the browser (GET) returns a status message, so you can check if an execution is ready.

Testing and monitoring​

  • Test button — executes the action with test values and shows the raw result along with what the AI would see. For background actions, it also indicates if a callback has not yet arrived.
  • Run log — every action saves the last 25 executions with input, output, status, duration, and any follow-up message sent.
  • Enable toggle — temporarily removes an action from the AI toolbox without deleting it.

Example 1 — Weather lookup (Direct API, integrated)​

The simplest action: one field, one GET, no intermediary.

  • Name: Check weather
  • When should the AI use this: "Use this when the visitor asks for the current weather of a city."
  • Field: city — string, req — "The city to check, e.g., London".
  • Connection: Direct API call, method GET, URL https://wttr.in/{city}?format=3.
  • Response handling: Instant, timeout 20.

That's the action. When a visitor asks "what's the weather in Paris?", the AI fills {city} with Paris, the fixed parameter ?format=3 asks wttr.in for a single line response, and the body returns as Paris: ☀️ +24°C. The AI inserts it into its response.

Example 2 — Appointment booking with Make and Google Calendar​

Two actions working together: one checks availability, the other books the slot after visitor confirmation. Each has its own Make scenario.

Action A — Check availability​

In Neolite:

  • Name: Check availability
  • Working indicator: "Checking availability…"
  • When should the AI use this:

Use this every time you need to check calendar availability, for example, before booking someone. If the requested time is not available, propose the alternatives you receive in response. Always check availability before booking.

  • Fields:
FieldTypereqDescription
requested_timestringyesStart time in ISO 8601 with timezone, e.g., 2026-07-28T14:00:00+01:00. Convert phrases like "tomorrow at 2 PM" into this format. Assume Europe/Rome if not specified.
duration_minutesnumbernoDuration in minutes. Default 30 if the visitor does not say so.
  • Connection: Automation webhook (paste the Make webhook URL).
  • Response handling: Instant, timeout 30.

In Make (3 modules, no router):

  1. Webhooks > Custom webhook. Create one, copy the URL into the Neolite action, press "Run once" in Make, then Test in Neolite so Make learns the payload structure. You should see event, action, run, params, context detected.
  2. Google Calendar > Get Free/Busy Information. Select the calendar and set:
    • Minimum time: parseDate(params.requested_time; "YYYY-MM-DDTHH:mm:ssZ")
    • Maximum time: addDays( the same parsed date ; 2)

This way you retrieve all busy blocks in a single call for the 48 hours from the requested time. 3. Webhooks > Webhook response. Status 200, body built with mapped pills:

{
"result": {
"requested_time": "{{params.requested_time}}",
"duration_minutes": "{{params.duration_minutes}}",
"busy_from": "{{join(map(busy; "start"); ", ")}}",
"busy_until": "{{join(map(busy; "end"); ", ")}}",
"note": "The requested time is only available if it does not overlap with any busy block. If not available, propose the next 3 free slots closest to working hours 09:00-17:00, Monday to Friday."
}
}

Map the busy array from the output panel of module 2 instead of typing the paths manually. There is no slot calculation in Make: the AI receives the busy blocks plus the note and calculates the free slots itself.

Action B — Book appointment​

In Neolite:

  • Name: Book appointment
  • Working indicator: "Booking your appointment…"
  • When should the AI use this:

Use this only after the visitor has confirmed a specific time AND you have verified that that time is free with Check availability. Collect first name and email. Never book an unconfirmed or unverified time.

  • Fields:
FieldTypereqDescription
start_timestringyesConfirmed start time in ISO 8601 with timezone, same format as Check availability.
duration_minutesnumbernoDuration in minutes, default 30.
namestringyesVisitor's first and last name for the booking.
emailstringyesVisitor's email for confirmation.
notesstringnoAny notes from the visitor.
  • Connection: Automation webhook with a new webhook URL from the second Make scenario.
  • Response handling: Instant, timeout 30.

In Make:

  1. Webhooks > Custom webhook (a new one). Paste it in Action B, run once, press Test in Neolite.
  2. Google Calendar > Get Free/Busy Information from start_time to start_time + duration_minutes. This re-checks prevents double booking if two visitors aim for the same slot.
  3. Router with two routes:

Route 1, free slot (filter: the busy array is empty):

  • Google Calendar > Create an Event:
    • Event name: Appointment: {{params.name}}
    • Start date: parsed start_time
    • End date: start + duration_minutes
    • Description: Booked via chat. Email: {{params.email}}. Notes: {{params.notes}}
    • Optional: add params.email as an invitee, so they receive the Google Calendar invite.
  • Webhooks > Webhook response:
{
"result": {
"booked": true,
"start_time": "{{params.start_time}}",
"name": "{{params.name}}",
"note": "Confirm the booking warmly and repeat the date and time."
}
}

Route 2, slot busy in the meantime (fallback route):

  • Webhooks > Webhook response:
{
"result": {
"booked": false,
"reason": "That slot was just taken.",
"note": "Sorry and run Check availability again to propose new alternatives."
}
}

Test the entire flow​

Open the bot and have the conversation from the beginning of this page: ask for a busy time, accept an alternative, provide name and email, and watch the event appear in Google Calendar. Check the run log of each action to see the exact input and output of each call.

If something doesn't work​

SymptomProbable Cause
The bot responds "Accepted" instead of the resultDefault response from the Make webhook: add a Webhook response module to every route of the scenario.
"The external service took too long to respond"The endpoint exceeded the timeout: increase it (max 30s) or switch to Background.
The action responds with HTTP 4xx/5xxThe endpoint returned an error: check the logs and required headers/authentication.
The result is truncatedResults are limited to 30,000 characters: return only the data the AI needs, not entire HTML pages.
The background result does not arrive in chatThe callback must be POSTed as JSON to the exact run.callback_url (contains the token) within 30 minutes. Open the URL in the browser to check the status.
The AI uses the action at the wrong time (or not at all)Fine-tune the When should the AI use this? field: explicitly state when to use it and when not to.
The AI sends incorrectly formatted valuesTighten the Description of the field: indicate the exact format and a concrete example value.

Every request is logged. Check the run log first.