API Request

API Request is a type of block that allows you to perform actions in third-party apps when the chatbot flow reaches the block. It works through a Zapier account and its configuration is easy-peasy! 

The most common use of the API Request is sending Lead information straight to your inbox or updating some Google Sheet as you gather the information from a new Lead. 

Here's the step by step guide to configure your very own request:

  1. Create an API Request block

Click on Add block, select Other actions and then API REQUEST and Save.

Now, you need to configure the content of the block like in the image below:

HEADERS

Copy and paste this Snippet there:
{
    "Content-Type": "application/json"
}

METHOD

Introduce "post" here:

POST

DATA

Here you need to introduce, as shown in the screenshot, all the data you have picked during the flow in that format: the name you want the variable to have when sending somwhere else's the data and the name set to the Field (@).

{
   "Output_name_1": "@field_name_on_builder_1",
   "Output_name_2": "@field_name_on_builder_2"
}

URL

Introduce anything and Save the block. We'll get back to this field once we got the URL from Zapier.

2. Sign in your Zapier account and select Make a zap!

3. Select Webhooks by Zapier as the trigger app by typing its name:

4. Select the trigger Catch hook (second option) and click Save + Continue:

5. Skip the Pick off a child key (optional) by clicking Continue:

6. Copy the custom webhook URL and paste it into the URL field of the Zapier block inside the Chatbot Builder we'd left blank at the beginning of the article.  

Now, Save the chatbot and test it. To test it, start a conversation with the chatbot and follow the flow until you reach the API Request block. Once done, come back to Zapier and click OK, I did this. The app will tell you that the test has been successful.

7. Now you need to configure the Action app or the app you want to receive information in when a visitor reaches the API Request block. In this example, we'll configure a Gmail notification with the information of the Lead.

We select Send email action:

And choose the account we want to send the email from (note you need to log in your Gmail account to see it here):

Finally, we configure the basics: who do we want to receive the email, if we want to CC or BCC anyone and the subject and body of the email:

In the body, we need to introduce the variables / dynamic fields we had configured in the DATA field of the API Request block on the builder, just like this:

All you have to do now is click Continue and do a final Test. If everything's OK, you'll receive an email with the information provided by yourself when testing the Trigger app on step 6. 


Your API Request 
integration is ready!

Still need help? Contact Us Contact Us