Skip to main content

How to connect a tool(http request)

S
Written by Support Team
Updated over 3 weeks ago

1) Open the toolbox

• Go to Workforce → select the Worker → Toolbox → Create tool.

────────────────────────────────────────

2) Choose the type

• Tool Type: HTTP Request.

────────────────────────────────────────

3) Fill in the basic details

• Name: short and descriptive (e.g., crm_find_client).

• Description: one sentence describing its purpose.

• URL: paste the base or full endpoint URL (https).

• Method: GET, POST, PUT, DELETE, PATCH.

• Endpoint (if your URL is split): complete the path.

• Include response: check Body and/or Status depending on what you need the AI to interpret.

────────────────────────────────────────

4) Headers (optional but common)

• Add Header → insert key/value pairs (e.g., Authorization: Bearer <TOKEN>, Content-Type: application/json).

────────────────────────────────────────

5) Body — how to create objects, arrays, and reference Inputs

• Add Body Fields → define the field Name.

• Each field has:

- {} button: turns the field into an **object** or **array** (nested).

- Tt button: inserts **Inputs** (dynamic values the AI extracts from the conversation).

A) Simple object

1) Create a parent field (e.g., branch).

2) Click {} to convert it into an object.

3) Inside, add new values for child keys:

- branch_name = "BSAS"

- branch_id = 12

Conceptual result:

{

"branch": {

"branch_name": "BSAS",

"branch_id": 12

}

}

B) Array (list)

1) Create a field (e.g., branches) and click {} to convert it into an array.

2) Inside the array, Add new value creates items.

3) Each item can be simple or an object (click {} on the item).

Example:

{

"branches": [

{ "branch_name": "BSAS", "branch_id": 12 },

{ "branch_name": "Rosario", "branch_id": 22 }

]

}

C) Using Inputs inside the Body

• To reference an Input in the field value, use:

{input:input_name}

Examples:

Inputs (extracted by the AI from the conversation)

- name → “Person’s name”

- client_id

- city

- sku_1, sku_2

Body

- name → {input:name}

- client ({} object)

• id → {input:client_id}

• city → {input:city}

- items ({} array)

• item 1 ({} object): sku → {input:sku_1}, qty → 1

• item 2 ({} object): sku → {input:sku_2}, qty → 2

{

"name": "Sofía",

"client": { "id": 123, "city": "Córdoba" },

"items": [

{ "sku": "ABC", "qty": 1 },

{ "sku": "XYZ", "qty": 2 }

]

}

Body Tips

• Clearly name fields/items; avoid spaces.

• If the API expects JSON, add Content-Type: application/json in Headers.

• Use Tt to insert Inputs and avoid syntax errors.

────────────────────────────────────────

6) Inputs (dynamic parameters extracted by the AI from the chat)

• Add Input → define name and description (e.g., email, document, city).

• Reminder: within Body/Query/Headers, reference with {input:name}.

────────────────────────────────────────

7) Save and test

• Save.

• In Stage Automations, define when to use the tool.

• Test now:

- Check the Status (200/4xx/5xx).

- Review the returned Body (keys the AI will use).

- Adjust Headers/Body/Inputs if it doesn’t match the API documentation.

• In the conversation, you can see when the AI uses the tool and what the HTTP response was (status and body). This lets you easily audit and debug each call.

Did this answer your question?