Zapier chatbot integration allows you to connect Activechat to hundreds of other applications supported by Zapier with the JSON block.
Until we release the native Zapier integration, your Activechat chatbots can communicate to Zapier through the JSON block, using Zapier’s native Webhooks trigger.
Let’s look into a simple example – it will add new leads from your chatbot to Pipedrive CRM. To make it work, we’ll first create a new Zap that will be triggered by the webhook.
In the “Customize webhook” section you will find the URL of the webhook (it’s in the “Custom Webhook URL” field) – copy it and save to use later in the JSON block settings in Activechat.
Now, you are ready to get sample webhook data into Zapier to use it in the remaining part of the setup. Let’s switch to Activechat and prepare the JSON block.
First, we’ll need some data to send to Pipedrive through Zapier. It can be system attributes like $_first_name and $_last_name, or any number of user attributes that you can collect with LISTEN blocks or calculate with DATA blocks.
After your chatbot receives from the user all the info it needs to send, let’s connect the JSON block to trigger the webhook in Zapier.
Paste the Webhook URL that you got from Zapier into the “URL” field in the JSON block editor and choose the “POST” method. (You can choose the “GET” method too, but it will append “querystring_” prefix to every parameter name that you’re sending to Zapier.)
Now add data that you want to send to your third-party app through Zapier as “parameters” of the JSON block. Notice that Activechat allows you to change the name of the user attribute when sending it as a parameter – this can be crucial for the number of applications. In the example above we’re sending user attributes $user_name (as “name”), $user_phone (as “phone”), $user_email (as “email”), $user_company (as “company”) and a couple of other attributes. Notice the use of the $_last_page_visit_url system attribute to send data about the page on your website where the conversation started. (You can read more about Activechat’s website tracking feature.)
Once you complete the setup of the JSON block and the lead generation chatbot skill is ready, build your bot and let’s send some test data to Zapier!
Now, go back to Zapier and click the “TEST & REVIEW” button in the “Find Data” part of the Webhook trigger settings.
When you click it, you will have approximately 3 minutes to send test data to Zapier (by triggering your JSON block).
So, answer the last question in your lead generation skill and let the JSON block execute. (Don’t forget to add some kind or confirmation after this block in your skill so that the user knows his data was sent successfully!)
If you go back to Zapier now, you will notice that the JSON block has sent some data to the webhook endpoint, and you can click the sample to check that data.
Voila! Now you can proceed to the rest of your Zap setup, and send that data anywhere – to hundreds of apps supported by Zapier.
As promised, let’s add that data as a new lead to the Pipedrive CRM.
Notice that I’ve chosen “Find person” action in Pipedrive instead of “Create person” due to the fact that “Find person” can automatically create new person if none was found, and if a person with that email already exists in my Pipedrive CRM, I would like to append existing data instead of getting a broken Zap.
You can use every attribute that you’ve sent with the JSON block in the Action setup fields:
Once you complete the Action step setup, send test data to your app (Pipedrive in our case) and don’t forget to switch your Zap ON. Once it’s ON, the webhook endpoint will constantly listen to new requests from the JSON block and send data to the connected apps on every new lead.