Bots that cannot connect to external APIs and integrate into business frameworks probably will stay nothing but a toy. To make your bot really useful for your customers weāve developed an integration system through the JSON module.Ā
You can also use this block to call external API endpoints (Zapier is a perfect example) and fetch data from these endpoints to your bot.
Paste external script address to the “URL” field in block settings and choose the calling method (GETĀ orĀ POST). Add parameters that youād like to send with the call (either hard-coded or from user attributes). If necessary, you can also add headers to JSON request (for example, for authorization).
As a result, this block will save key-value pairs received in JSON response to user attributes and move on to the block that is connected toĀ the SUCCESSĀ tab. On any error blocks connected toĀ the ERRORĀ button will be triggered.
Example
In the example above bot is collecting user’s name, email address and phone number and sends this information to Zapier webhook listener, so that it can be added to CRM or Google Sheets.
Letās suppose that external script returns JSON of this structure (hereās an example from Zapier Webhooks integration):

After this call you will have new attributes in your chatbot:Ā $status,Ā $attempt,Ā $idĀ andĀ $request_id. Their values can be used in any other block since thenĀ (TEXT, DATA, SWITCH, etc).
Currently, Activechat supports plain JSON output with no nested objects. Objects and arrays will be supported soon.
Using with Zapier / Integromat
One of the most common use cases for the JSON block is Zapier or Integromat integration. Use Webhooks by Zapier to trigger Zaps that will be able to achieve multiple tasks:
- send data to Google Drive
- send e-mails
- push data to CRM
- publish Twitter and Facebook posts
- create tasks in Google Tasks
- send conversion data to Facebook
- make requests to Firebase and PostgresSQL
- send SMS
- ā¦and do a thousand things more withĀ Zapier.com