HTTP Requests
The HTTP Request step allows your workflows to communicate with external APIs, enabling powerful integrations with CRMs, analytics platforms, notification services, and custom backends.
Overview
HTTP Request steps can:
- Call external APIs with any HTTP method
- Send survey data to your systems
- Receive responses and map them to workflow parameters
- Chain requests using data from previous responses
Configuration
HTTP Methods
- GET
- POST
- PUT
- PATCH
- DELETE
Use for: Retrieving data
GET https://api.example.com/customers/{{contact.id}}
Example: Fetch customer tier before survey
Use for: Creating records, sending data
POST https://api.example.com/surveys
Example: Send survey response to CRM
Use for: Updating/replacing records
PUT https://api.example.com/customers/{{contact.id}}
Example: Update customer profile
Use for: Partial updates
PATCH https://api.example.com/customers/{{contact.id}}
Example: Update specific fields
Use for: Removing records
DELETE https://api.example.com/records/{{params.recordId}}
Example: Remove temporary data
URL Configuration
Enter the full endpoint URL. Variables are supported:
https://api.example.com/customers/{{contact.id}}
https://crm.company.com/surveys/{{survey.id}}/responses
https://hooks.slack.com/services/T00/B00/XXXX
Headers
Add custom HTTP headers for authentication and content types:
| Header | Example | Purpose |
|---|---|---|
Authorization | Bearer {{params.apiToken}} | API authentication |
Content-Type | application/json | Request body format |
X-API-Key | your-api-key | API key authentication |
Accept | application/json | Expected response format |
Adding Headers:
- Click Add Header
- Enter the header name (key)
- Enter the header value (supports variables)
Request Body
For POST, PUT, and PATCH requests, configure the request body:
{
"surveyId": "{{survey.id}}",
"score": {{survey.score}},
"respondent": {
"email": "{{contact.email}}",
"name": "{{contact.name}}"
},
"completedAt": "{{survey.completed_at}}",
"customTier": "{{params.customerTier}}"
}
- Strings must be quoted:
"{{contact.email}}" - Numbers should not be quoted:
{{survey.score}} - Booleans should not be quoted:
{{params.isActive}}
Response Mapping
Extract values from the API response and store them as workflow parameters:
Mapping Configuration
| JSON Path | Parameter Name | Description |
|---|---|---|
$.data.customerId | customerId | Extract customer ID |
$.status | apiStatus | Extract response status |
$.data.tier | customerTier | Extract tier value |
JSON Path Syntax
$ → Root object
$.property → Direct property access
$.data.nested → Nested property access
$.items[0] → Array index access
$.items[*].id → All IDs from array
Example Response:
{
"customer": {
"tier": "gold",
"points": 1500
}
}
Mapping:
| JSON Path | Parameter | Result |
|---|---|---|
$.customer.tier | customerTier | "gold" |
$.customer.points | loyaltyPoints | 1500 |
Common Integrations
- CRM Integration
- Slack
- Analytics
- Your Backend
Send to CRM
// POST https://api.crm.com/contacts/{{contact.id}}/surveys
{
"surveyId": "{{survey.id}}",
"score": {{survey.score}},
"completedAt": "{{survey.completed_at}}",
"feedback": "{{survey.responses.feedback}}"
}
Response Mapping:
$.contactId → params.crmContactId
$.status → params.syncStatus
Send Slack Notification
// POST https://hooks.slack.com/services/T00/B00/XXX
{
"text": "New survey response!",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Score:* {{survey.score}}\n*From:* {{contact.email}}"
}
}
]
}
Track Analytics Event
// POST https://api.analytics.com/events
{
"eventName": "survey_completed",
"userId": "{{contact.id}}",
"properties": {
"surveyId": "{{survey.id}}",
"score": {{survey.score}},
"channel": "email"
}
}
Webhook to Backend
// POST https://api.yourcompany.com/webhooks/survey
{
"event": "survey.completed",
"data": {
"surveyId": "{{survey.id}}",
"collectorId": "{{survey.collector_id}}",
"respondent": {
"id": "{{contact.id}}",
"email": "{{contact.email}}"
},
"score": {{survey.score}},
"timestamp": "{{survey.completed_at}}"
}
}
Advanced Patterns
Chaining Requests
Use response from one request in subsequent requests:
- Step 1: Get Customer
- Step 2: Apply Discount
GET https://api.example.com/customers/{{contact.email}}
Response Mapping:
$.tier → params.customerTier
$.id → params.customerId
POST https://api.example.com/customers/{{params.customerId}}/discount
{
"tier": "{{params.customerTier}}",
"surveyScore": {{survey.score}}
}
Conditional API Calls
Use conditions to call different APIs based on data:
Error Handling
Check API response status in conditions:
Authentication Patterns
- Bearer Token
- API Key
- Basic Auth
- OAuth (Dynamic)
Headers:
Authorization: Bearer YOUR_API_TOKEN
Best for: Most REST APIs, OAuth tokens
In Header:
Headers:
X-API-Key: YOUR_API_KEY
In Query String:
URL: https://api.example.com/endpoint?api_key=YOUR_KEY
Headers:
Authorization: Basic BASE64_ENCODED_CREDENTIALS
Note: Encode username:password in Base64
Step 1: Get token
POST https://auth.example.com/oauth/token
Response Mapping:
$.access_token → params.accessToken
Step 2: Use token
Headers:
Authorization: Bearer {{params.accessToken}}
Integration Examples
Salesforce Integration
POST https://yourinstance.salesforce.com/services/data/v57.0/sobjects/SurveyResponse__c
Headers:
Authorization: Bearer {{params.salesforceToken}}
Content-Type: application/json
Body:
{
"Contact__c": "{{params.salesforceContactId}}",
"Survey_Score__c": {{survey.score}},
"Survey_Date__c": "{{survey.completed_at}}"
}
HubSpot Contact Update
PATCH https://api.hubapi.com/crm/v3/objects/contacts/{{params.hubspotContactId}}
Headers:
Authorization: Bearer {{params.hubspotToken}}
Body:
{
"properties": {
"last_nps_score": "{{survey.score}}",
"last_survey_date": "{{survey.completed_at}}"
}
}
Zendesk Ticket Creation
POST https://yoursubdomain.zendesk.com/api/v2/tickets.json
Headers:
Authorization: Basic {{params.zendeskAuth}}
Body:
{
"ticket": {
"subject": "Survey Feedback - Score: {{survey.score}}",
"requester": {
"email": "{{contact.email}}"
},
"comment": {
"body": "Customer submitted survey with score {{survey.score}}"
}
}
}
Microsoft Teams Notification
POST https://outlook.office.com/webhook/YOUR_WEBHOOK_URL
Body:
{
"@type": "MessageCard",
"themeColor": "0076D7",
"summary": "New Survey Response",
"sections": [{
"activityTitle": "Survey Completed",
"facts": [
{ "name": "Score", "value": "{{survey.score}}" },
{ "name": "Email", "value": "{{contact.email}}" }
]
}]
}
Best Practices
Security
| Practice | Description |
|---|---|
| Never hardcode secrets | Use parameters for API tokens |
| Use HTTPS | Always use encrypted connections |
| Validate responses | Check status before using data |
Performance
| Practice | Description |
|---|---|
| Keep requests minimal | Only send required data |
| Set timeouts | Configure for slow APIs |
| Handle errors | Use condition steps for error paths |
Debugging
- Check execution logs for request/response details
- Verify URL variables are resolving correctly
- Test endpoints independently first
- Validate JSON syntax before saving
Troubleshooting
Request Failed
| Error | Cause | Solution |
|---|---|---|
Connection refused | Invalid URL or server down | Verify endpoint URL |
401 Unauthorized | Missing/invalid auth | Check authentication headers |
403 Forbidden | Insufficient permissions | Verify API credentials |
404 Not Found | Wrong endpoint | Check URL path |
500 Server Error | Target API error | Check API server logs |
Response Mapping Failed
- Verify JSON path syntax
- Check response structure matches expected format
- Use
$for root access - Test JSON path in online validator
Variable Not Resolving
- Check variable exists and has value
- Verify spelling and case
- Ensure previous step completed successfully
Timeout Errors
- External API may be slow
- Consider async processing
- Check API rate limits
Next Steps
- Parameters - Store and use API response data
- Automations Overview - Full automation capabilities