Skip to main content

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

Use for: Retrieving data

GET https://api.example.com/customers/{{contact.id}}

Example: Fetch customer tier before survey

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:

HeaderExamplePurpose
AuthorizationBearer {{params.apiToken}}API authentication
Content-Typeapplication/jsonRequest body format
X-API-Keyyour-api-keyAPI key authentication
Acceptapplication/jsonExpected response format

Adding Headers:

  1. Click Add Header
  2. Enter the header name (key)
  3. 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}}"
}
JSON Syntax
  • 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 PathParameter NameDescription
$.data.customerIdcustomerIdExtract customer ID
$.statusapiStatusExtract response status
$.data.tiercustomerTierExtract 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 PathParameterResult
$.customer.tiercustomerTier"gold"
$.customer.pointsloyaltyPoints1500

Common Integrations

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

Advanced Patterns

Chaining Requests

Use response from one request in subsequent requests:

GET https://api.example.com/customers/{{contact.email}}

Response Mapping:
$.tier → params.customerTier
$.id → params.customerId

Conditional API Calls

Use conditions to call different APIs based on data:

Error Handling

Check API response status in conditions:


Authentication Patterns

Headers:
Authorization: Bearer YOUR_API_TOKEN

Best for: Most REST APIs, OAuth tokens


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

PracticeDescription
Never hardcode secretsUse parameters for API tokens
Use HTTPSAlways use encrypted connections
Validate responsesCheck status before using data

Performance

PracticeDescription
Keep requests minimalOnly send required data
Set timeoutsConfigure for slow APIs
Handle errorsUse condition steps for error paths

Debugging

  1. Check execution logs for request/response details
  2. Verify URL variables are resolving correctly
  3. Test endpoints independently first
  4. Validate JSON syntax before saving

Troubleshooting

Request Failed
ErrorCauseSolution
Connection refusedInvalid URL or server downVerify endpoint URL
401 UnauthorizedMissing/invalid authCheck authentication headers
403 ForbiddenInsufficient permissionsVerify API credentials
404 Not FoundWrong endpointCheck URL path
500 Server ErrorTarget API errorCheck 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

Was this page helpful?