HTTP request step in FlowsUpdated 5 months ago
With the HTTP request Flow steps, you can use data and execute actions from third-party apps to make your Flows more powerful and automate a variety of requests, so your team can focus on the more complex issues.
Steps
1. Go to Automate -> your Store -> Flows.
2. You can Create From Template if you want to dedicate the entire Flow to one of featured HTTP requests, or Create Custom Flow if you want to have additional options.
3. Make sure to add the Flow name (for internal use only) and the Trigger button - text that your customers will see as the starting point of the Flow.
4. If you're creating a custom Flow, click the + icon and select the option that you want to add (you can add as many steps as you'd like).
5. When it comes to adding a HTTP Request, a prompt will open in the sidebar, where you can input the information of the request you'd like to perform. We recommend assigning an internal name for easy reference. After that, you can:
- Choose the HTTP method: GET, POST, PUT, DELETE.
- Enter the endpoint URL and any necessary query parameters or headers.
- For POST, PUT, and PATCH methods, specify the request body.
6. Click Test Request to ensure you get a 200 OK status code and then click Publish to set the Flow live in your connected channels.
By default, HTTP step will create two branches:
- Success - triggered when the request is successful, moving to the next step
- Error - activated when the request fails or returns a status code of 400 or above, by default creates a ticket
Supported variables
You can leverage variables created from previous steps to use them in your HTTP request. These are the variables we support:
Step name | Variables you can leverage | Data types |
---|---|---|
Collect text reply | Response from customer | String |
Multiple choice | Option chosen by your customer | String |
Customer login | Customer first name, last name, full name, phone number | String |
Order selection | Order number, total amount, date | Number, date |
HTTP request | Any custom variable you have generated from the HTTP request. | Custom |
Collect file upload (only available in JSON request body) | Attachments provided by the customer. | Array e.g. {\"upload\": [{\"content_type\":\"image/jpeg\", \"url\":\"https://example.com/image.jpg\"}]} |
Access event logs
You can get data about all HTTP requests being made from your step via CSV export, directly in the HTTP request configuration.