Invoke
The Invoke component makes HTTP requests to external services or APIs. Use it to fetch data from third-party services, trigger webhooks, or integrate with any REST endpoint directly from your agent workflow.
Scenarios
Section titled “Scenarios”Use Invoke when your agent needs to:
- Retrieve live data from an external REST API (e.g., marketing asset data, weather, stock prices)
- Trigger a webhook or automation in another system
- Send a POST/PUT request with a dynamically generated payload
Configuration
Section titled “Configuration”| Parameter | Type | Default | Description |
|---|---|---|---|
Url | string | "http://" | The HTTP endpoint to call. |
Method | string | "GET" | The HTTP method: GET, POST, PUT, DELETE, etc. |
Timeout | number | 60 | Request timeout in seconds. |
Headers | string (JSON) | {"Accept": "*/*", "Cache-Control": "no-cache", "Connection": "keep-alive"} | HTTP headers as a JSON string. |
Proxy | string | "http://" | Proxy URL if required. |
Clean HTML | boolean | false | Whether to strip HTML tags from the response body. |
Mimetype | string | "" | Expected response content type (e.g., application/json). If set, the component will attempt to parse the response accordingly. |
API Key Configuration | array[object] | — | Configure API keys for specific URLs. Keys will be automatically added to Authorization headers when matching URLs are detected. |
Path Parameter Configuration | array[object] | — | Configure path parameters to be substituted in URLs. Use {paramKey} placeholders in URLs. E.g., /company/{companyId}/reports with companyId=123 becomes /company/123/reports. |
Query Parameter Configuration | array[object] | — | Configure query parameters to be appended to URLs. Parameters will be merged with existing query parameters when matching URLs are detected. Use {paramKey} placeholders in URLs. E.g., /search?q={query} with query=AI becomes /search?q=AI. |
Whitelist Keys | array | [] | List of response keys to include in the output. If empty, all keys are included. Useful for filtering large API responses. |
-
Add the Invoke component to your canvas.
-
Set the URL to the target endpoint.
-
Select the appropriate HTTP method.
-
Configure custom headers if the API requires authentication (e.g.,
Authorization: Bearer <token>). -
Connect an upstream Generate or Template component to produce the request body dynamically.
-
Connect the Invoke output to a downstream Generate component to interpret and format the API response for the user.