Zapier integrations
Last updated
Last updated
Zapier chatbot integration allows you to connect Activechat to hundreds of other applications supported by Zapier with a single JSON block.
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 it 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 the “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.
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!
Trigger the skill in the chatbot, answer the questions that you’ve built there – but WAIT until you send the last answer, preceding the JSON block. We do not want to trigger that block yet!
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 of 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.
Sample data sent by your JSON block to Zapier’s webhook endpoint
Voila! Now you can proceed to the rest of your Zap set up, 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 we’ve chosen the “Find person” action in Pipedrive instead of “Create person” due to the fact that the “Find person” can automatically create a new person if none was found, and if a person with that email already exists in my Pipedrive CRM, it would be better 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.
🛑 IMPORTANT! Please note that if you are using multiple Zaps in your chatbot, Webhook URLs will be different for each of them! Pay attention to this when copying and pasting JSON blocks in the visual chatbot builder.