Skip to main content
All CollectionsAutomations
Best Practice: Send HTTP Request Action
Best Practice: Send HTTP Request Action

Use HTTP requests. Connect systems. Create HTTP connections. Automatically retrieve data.

Fredi avatar
Written by Fredi
Updated over 3 months ago

What is the Send HTTP Request Action used for?

With the Send HTTP Request action, you can send data directly from your automations to your favorite tool or retrieve data via an API call from your tools and use it in Superchat.

For example, you can collect data from applicants via WhatsApp and use the Send HTTP Request action to create a candidate in your HR tool. Similarly, you can retrieve customer or order data from your eCommerce tool or CRM and pass this data to an AI bot so it can handle your customer’s inquiries personally.

Supported Authentication Methods

We support API Keys in headers and queries, Basic Auth, and Bearer Authentication. Please choose your preferred authentication method and enter all required data. Currently, we do not support OAuth flows with token refreshes. Additionally, Basic Authentication requires both a username and password.

Using Variables from Automations

You can use as many variables as you like in the URL and body from your automation. To do so, you first define a placeholder, which you link to a variable. Use the following syntax for placeholders:


{{my-placeholder}}

Example URL with a variable:

https://api.software.com/deals/{{deal_id}}/details

You can link the placeholder {{deal_id}} to a variable, for example, a contact attribute called "Software Deal ID." Once your automation runs, we automatically replace the placeholder with the attribute value of the connected contact attribute. The same applies to JSON in the body.

Using Response Data in Your Automations

You can make the data from your requests available for follow-up actions and logic. First, send a test request by clicking "Test."

Once you send a successful request, you will receive a response. Now, click on Add Output Variables. In the opened menu, click on the data field and then "Add" to save this data field in your automation. Name the value so you can easily find it in later actions.

Building an HTTP Request

First, add the HTTP Request node to your automation. In the sidebar, you can configure all the settings for your HTTP Request.

Here’s a quick overview of the input elements for your HTTP Request. The values you need to enter can be found in the API documentation of the software you want to connect with Superchat.

Method

Specify the HTTP method you want to use for your request.

URL

Enter the URL from the API documentation required for your request.

Authentication

Choose from our 3 authentication methods—Basic Auth, API Key, or Bearer Token—and add them to your request.

Header

Enter header keys and values needed for your request. We automatically send 4 standard headers (Host, Content-Length, Content-Type, Accept), so you don’t need to enter these.

Body

Here, you can enter your JSON or plain text body. We offer a simple table view where you can input nested objects using dot notation. For more complex request bodies, you can switch to the code view and write your JSON body there. Click on the enlarge button to edit the body in a larger window.

Response

We display the response of your request here. You can make individual fields of your response available as output variables in follow-up actions and logic nodes.

Limitations

We are continuously improving the Send HTTP Request action. Currently, there are a few limitations and peculiarities you should be aware of.

Null and undefined values

If an output variable is null or missing in the response, the automation will fail at the point where you use the output variable. Currently, our automations do not support null or undefined values.

Error Handling

If a request fails or terminates during an automation run, the entire automation will fail with an error.

Superchat API via HTTP Request Action

You cannot use our own API with the HTTP Request action to avoid loops and unwanted side effects.


Paid Consultation

Would you like us to help you plan your process and set everything up for you? Feel free to contact our support team (question mark in Superchat, top right --> Contact support) to inquire about a paid consultation.

Did this answer your question?