HTTP Request Integration
Overview
The HTTP Request action allows you to make API calls to any web service, giving you unlimited integration possibilities. Perfect for custom APIs, internal services, and any system with an HTTP endpoint.
What It Enables
Common Use Cases
- Custom APIs: Call your own internal APIs
- Third-Party Services: Integrate with services not in our directory
- REST APIs: Standard GET, POST, PUT, DELETE operations
- Webhooks: Send data to external webhooks
- Data Fetching: Retrieve data from any HTTP endpoint
- Authentication: Support for various auth methods
Prerequisites
- API endpoint URL
- Authentication credentials (if required)
- Understanding of HTTP methods
- API documentation from the service you’re calling
How to Use HTTP Request
Step 1: Add HTTP Request Action
- In your flow, click “Add Step”
- Search for “HTTP”
- Select “HTTP Request” action
Step 2: Configure Request
Method
Choose the HTTP method:
- GET: Retrieve data
- POST: Create new data
- PUT: Update existing data
- PATCH: Partially update data
- DELETE: Remove data
- HEAD: Get headers only
- OPTIONS: Get supported methods
URL
Enter the full API endpoint:
https://api.example.com/v1/users
Tips:
- Include protocol (https://)
- Use data picker for dynamic URLs
- URL encode special characters
Dynamic URL Example:
https://api.example.com/users/
Step 3: Add Headers (Optional)
Common headers:
Content-Type:
Content-Type: application/json
Authorization:
Authorization: Bearer
Custom Headers:
X-API-Key: your-api-key
X-Custom-Header: custom-value
Step 4: Add Query Parameters (Optional)
For GET requests with parameters:
Example:
URL: https://api.example.com/users
Query Params:
- limit: 10
- offset: 0
- status: active
Results in:
https://api.example.com/users?limit=10&offset=0&status=active
Step 5: Add Body (For POST/PUT/PATCH)
JSON Body:
{
"name": "",
"email": "",
"status": "active"
}
Form Data:
name: John Doe
email: john@example.com
Raw Text:
Plain text or XML content
Step 6: Configure Authentication
Choose authentication method:
None
No authentication required
Basic Auth
Username: your-username
Password: your-password
Bearer Token
Token: your-bearer-token
API Key
Add as header or query parameter:
Header: X-API-Key: your-key
OR
Query: ?api_key=your-key
OAuth 2.0
Use OAuth connection (if supported)
Step 7: Advanced Options
Timeout: Maximum wait time (default: 30 seconds)
Timeout: 60
Follow Redirects: Follow 301/302 redirects (default: true)
Follow Redirects: true
Fail on Error: Fail flow if status code is 4xx or 5xx (default: true)
Fail on Error: true
Step 8: Test Request
- Click “Test Step”
- Review response
- Check status code
- Inspect response body
- Verify data structure
Response Data
Success Response
{
"status": 200,
"headers": {
"content-type": "application/json",
"x-rate-limit-remaining": "99"
},
"body": {
"id": "123",
"name": "John Doe",
"email": "john@example.com"
}
}
Using Response Data
Access response in next steps:
Common Errors & Fixes
❌ “Connection timeout”
Cause: API is slow or unreachable
Fix:
- Increase timeout value
- Check API endpoint is correct
- Verify network connectivity
- Check API service status
- Try request in Postman/curl first
❌ “401 Unauthorized”
Cause: Authentication failed
Fix:
- Verify API key/token is correct
- Check authentication method matches API requirements
- Ensure token hasn’t expired
- Check header format (Bearer vs Basic)
- Verify API key has required permissions
Example Fix:
❌ Wrong: Authorization: your-token
✅ Right: Authorization: Bearer your-token
❌ “400 Bad Request”
Cause: Invalid request format
Fix:
- Check request body format (JSON syntax)
- Verify required fields are included
- Check data types match API expectations
- Review API documentation
- Test with API’s example request
Common Issues:
- Missing required fields
- Wrong data types (string vs number)
- Invalid JSON syntax
- Incorrect Content-Type header
❌ “404 Not Found”
Cause: Endpoint doesn’t exist
Fix:
- Verify URL is correct
- Check for typos in endpoint path
- Ensure API version is correct
- Verify resource ID exists
- Check API documentation for correct endpoint
❌ “429 Too Many Requests”
Cause: Rate limit exceeded
Fix:
- Slow down request frequency
- Check rate limit headers
- Implement retry with backoff
- Use batch endpoints if available
- Contact API provider for limit increase
❌ “500 Internal Server Error”
Cause: API server error
Fix:
- Check API service status
- Retry request after delay
- Verify request isn’t causing server error
- Contact API support
- Check API logs if available
❌ “SSL Certificate Error”
Cause: Invalid or self-signed certificate
Fix:
- Verify URL uses https://
- Check certificate is valid
- For development: Use http:// (not recommended for production)
- Contact API provider about certificate
Test Checklist
- URL is correct and accessible
- HTTP method is appropriate
- Headers are properly formatted
- Authentication works
- Request body is valid JSON (if applicable)
- Response status is 2xx
- Response data structure matches expectations
- Error handling is configured
Tips & Best Practices
Security Best Practices
- Never Hardcode Secrets: Use connections or environment variables
- Use HTTPS: Always use secure connections
- Validate Responses: Check status codes before using data
- Rate Limiting: Respect API rate limits
- Error Handling: Handle failures gracefully
Performance Tips
- Timeouts: Set appropriate timeouts for your use case
- Parallel Requests: Use branches for concurrent calls
- Caching: Cache responses when appropriate
- Batch Operations: Use batch endpoints when available
- Compression: Enable gzip if API supports it
Debugging Tips
- Test Externally First: Use Postman or curl to verify API works
- Check Logs: Review response body and headers
- Incremental Testing: Start simple, add complexity gradually
- Save Examples: Keep working examples for reference
- Monitor Rate Limits: Check rate limit headers
API Design Tips
- Idempotency: Design for safe retries
- Versioning: Use versioned API endpoints
- Error Messages: Provide clear error responses
- Documentation: Keep API docs up to date
- Status Codes: Use appropriate HTTP status codes
Advanced Patterns
Retry Logic
Handle transient failures:
1. HTTP Request
2. Branch: Check if status is 5xx
3. If yes: Wait 5 seconds, retry
4. If no: Continue
Pagination
Handle paginated responses:
1. HTTP Request (page 1)
2. Loop: While has_more is true
3. HTTP Request (next page)
4. Combine results
Authentication Refresh
Handle token expiration:
1. HTTP Request with token
2. Branch: Check if 401
3. If yes: Refresh token, retry
4. If no: Continue
Batch Processing
Process multiple items:
1. Loop through items
2. HTTP Request for each
3. Collect responses
4. Handle errors individually
Common API Patterns
REST API
GET /users # List users
GET /users/123 # Get user
POST /users # Create user
PUT /users/123 # Update user
DELETE /users/123 # Delete user
GraphQL API
Method: POST
URL: https://api.example.com/graphql
Body:
{
"query": "{ users { id name email } }"
}
SOAP API
Method: POST
URL: https://api.example.com/soap
Headers:
Content-Type: text/xml
Body:
<?xml version="1.0"?>
<soap:Envelope>
<soap:Body>
<GetUser>
<UserId>123</UserId>
</GetUser>
</soap:Body>
</soap:Envelope>
Example Requests
GET Request with Query Params
Method: GET
URL: https://api.github.com/users/octocat/repos
Headers:
Accept: application/vnd.github.v3+json
Query Params:
type: public
sort: updated
POST Request with JSON
Method: POST
URL: https://api.example.com/users
Headers:
Content-Type: application/json
Authorization: Bearer
Body:
{
"name": "John Doe",
"email": "john@example.com",
"role": "admin"
}
PUT Request with Authentication
Method: PUT
URL: https://api.example.com/users/123
Headers:
Content-Type: application/json
X-API-Key:
Body:
{
"status": "active",
"last_login": ""
}
DELETE Request
Method: DELETE
URL: https://api.example.com/users/123
Headers:
Authorization: Bearer
Limitations
- Timeout: Maximum 300 seconds (5 minutes)
- Response Size: Maximum 10 MB response body
- Redirects: Maximum 10 redirects followed
- Concurrent Requests: Subject to platform limits
- Rate Limits: Respect external API rate limits
Related Documentation
- Core Concepts: Actions
- Core Concepts: Data Mapping
- Troubleshooting: Connection Problems
- Error Reference
- Security & Privacy
Need Help?
- API Testing: Use Postman or curl to test APIs
- JSON Validation: Use JSONLint to validate JSON
- HTTP Status Codes: See HTTP Status Dogs for reference
- Support: Contact Support with your request details and error message