API Call Integration
Connect to any REST API and integrate external services into your workflows.
Overview
The API Call action allows you to make HTTP requests to external APIs, enabling you to integrate with third-party services, fetch data, send information, or trigger actions in other systems as part of your workflow.
How to Configure API Call
- Add Action Node:
- In your workflow, add an Action Node
- Select "API Call" as the action type
- The API Call configuration panel will open with four tabs: Request, Authentication, Headers, and Advanced
- Configure Request Details:
- Select the HTTP Method (GET, POST, PUT, DELETE, PATCH)
- Enter the API URL (e.g.,
https://api.example.com/endpoint) - For POST, PUT, or PATCH requests, add a Request Body in JSON format
- Use dynamic variables from forms or agent responses in your request body
- Set Up Authentication (if required):
- Switch to the "Authentication" tab
- Select your authentication type (see Authentication Methods section below)
- Enter the required credentials
- Click "Validate" to test the connection
- Add Custom Headers (optional):
- Switch to the "Headers" tab
- Add custom headers in JSON format (e.g.,
{ "Content-Type": "application/json" })
- Configure Advanced Options (optional):
- Switch to the "Advanced" tab
- Enable Retry to automatically retry failed requests
- Set Max Attempts (default: 3) and Delay (default: 1000ms)
- Enable Continue On Error to prevent workflow from stopping if the API call fails
- Save Configuration:
- Click "Save Configuration" to apply your settings
- Test your workflow to ensure the API call works as expected
Authentication Methods
Use this for public APIs that don't require authentication.
Required Fields
- Username: Your account username
- Password: Your account password
How It Works
Basic authentication encodes your username and password in Base64 and sends them in theAuthorization header asBasic <credentials>.
Required Fields
- Token: Your bearer token or access token
How It Works
The token is sent in the Authorization header asBearer <token>. This is commonly used with JWT tokens and OAuth 2.0 access tokens.
Required Fields
- Key Name: The name of the API key parameter (e.g.,
X-API-Key,api_key) - Value: Your API key value
- Add To: Where to include the key (Header or Query Parameter)
How It Works
API keys can be sent either as a custom header or as a query parameter in the URL. The location depends on the API's requirements.
Examples
Header: X-API-Key: your_api_key_here
Query Param: ?api_key=your_api_key_here
Required Fields
- Client ID: Your OAuth application client ID
- Client Secret: Your OAuth application client secret
- Access Token: Current access token (if you already have one)
- Token URL: OAuth token endpoint URL
How It Works
Monology uses the Client Credentials flow to obtain an access token from the token URL using your client ID and secret. The access token is then used to authenticate API requests.
HTTP Methods
GETRetrieve Data
Fetch data from an API without modifying anything. No request body required.
POSTCreate Data
Send data to create a new resource. Requires a request body with the data to create.
PUTUpdate/Replace Data
Replace an entire resource with new data. Requires a request body with complete data.
PATCHPartial Update
Update specific fields of a resource. Requires a request body with only the fields to update.
DELETERemove Data
Delete a resource. Usually no request body required.
Using Dynamic Variables
You can use data from previous nodes in your API calls by inserting dynamic variables:
Form Data
Access form field values using {{form.fieldName}}
{
"name": "{{form.name}}",
"email": "{{form.email}}",
"message": "{{form.message}}"
}Agent Response
Access agent outputs using {{agent.fieldName}}
{
"intent": "{{agent.classified_intent}}",
"sentiment": "{{agent.sentiment}}",
"summary": "{{agent.summary}}"
}Previous API Response
Access data from a previous API call using {{action.fieldName}}
{
"user_id": "{{action.id}}",
"status": "{{action.status}}"
}Error Handling & Retry
Retry Configuration
Automatically retry failed API calls to handle temporary network issues or rate limits.
- Enable Retry: Toggle to enable automatic retries
- Max Attempts: Number of retry attempts (default: 3)
- Delay (ms): Wait time between retries in milliseconds (default: 1000ms)
Continue On Error
When enabled, the workflow will continue to the next node even if the API call fails. This is useful for non-critical API calls where you don't want to block the entire workflow.
Common Use Cases
CRM Integration
Create leads or contacts in your CRM (Salesforce, HubSpot) when a form is submitted.
Payment Processing
Process payments through Stripe, PayPal, or other payment gateways.
Data Enrichment
Fetch additional data from external APIs to enrich conversation context.
Webhook Triggers
Trigger webhooks in other systems (Zapier, Make, n8n) to start automation workflows.
Database Operations
Store or retrieve data from your database via REST API endpoints.
SMS/Notifications
Send SMS via Twilio or push notifications through Firebase.
Testing & Validation
Always validate your API configuration before deploying your workflow:
- Configure your API call with URL, method, and authentication
- Click "Validate" in the Authentication tab to test the connection
- Check for success (green checkmark) or error messages (red X)
- Review the test response to ensure the API returns expected data
- Run a test conversation through your workflow to verify end-to-end functionality
Next Steps
Action Nodes
Learn more about Action nodes and other action types