How to Connect External APIs in a Workflow
Why Connect External APIs
Most businesses use multiple software systems that do not talk to each other by default. An API connection inside your workflow bridges that gap automatically. When a new order comes in, the workflow can check inventory in one system, create an invoice in another, and update a CRM record in a third, all without anyone clicking between tabs.
The alternative is manual data entry or building custom integration code. With workflow API nodes, you configure the connection once and it runs every time the workflow executes. No developer needed, no code to maintain.
What You Need Before Connecting
- API endpoint URL from the external service (usually found in their developer docs)
- Authentication credentials such as an API key, bearer token, or OAuth token
- Request format including which HTTP method to use (GET, POST, PUT) and what data fields to send
- Response format so you know which fields to extract from the response for use in later workflow steps
Step-by-Step Setup
In the Chain Commands visual builder, drag a new node onto the canvas. Set its type to an HTTP request or API call. This node will send data to the external service and receive a response.
Enter the full API URL, for example https://api.example.com/v1/contacts. Select the HTTP method: GET to retrieve data, POST to create a record, PUT to update one. Most API integrations use POST for sending data and GET for retrieving it.
Most APIs require an authorization header. Add a header named "Authorization" with the value "Bearer YOUR_API_KEY" or whatever format the service requires. Some APIs use a query parameter instead. Check the service documentation for the exact format.
Use workflow variables to populate the fields the API expects. For example, if you are creating a contact in a CRM, map the customer name, email, and phone number from earlier workflow steps into the JSON body. Variables from previous nodes are available to reference here.
After the API responds, the workflow captures the response body. Map specific fields from the response, like a new record ID or confirmation status, into workflow variables that later nodes can use. This connects the API result to the rest of your automation.
APIs can fail due to network issues, rate limits, or bad data. Add a condition node after the API call to check the response status. Route successful responses to the normal path and errors to a notification or retry path. See How to Handle Errors in Automated Workflows for more details.
Common API Integration Examples
CRM Contact Creation
When a lead is captured through your chatbot or form, the workflow sends the contact data to your CRM via its API. The CRM creates the record and returns an ID, which the workflow stores for future reference. This eliminates the delay and human error of manual CRM data entry.
Payment Verification
After receiving a payment webhook, the workflow calls the payment processor API to verify the transaction details. If confirmed, it triggers the fulfillment steps. If the verification fails, it routes to a manual review path.
Shipping Label Generation
An order processing workflow sends the shipping address and package details to a shipping API like EasyPost or ShipStation. The API returns a tracking number and label URL, which the workflow stores and includes in the customer confirmation email.
Working With Different Response Formats
Most modern APIs return JSON responses. The workflow parser can extract nested fields using dot notation, like "data.customer.id" to get a value three levels deep. Some older APIs return XML, which you may need to parse differently. If the API returns a simple success/failure status code, you can branch on the HTTP status (200 for success, 4xx or 5xx for errors) without parsing the body at all.
Connect your workflows to any external API. Build automations that span your entire tech stack.
Get Started Free