Comment on page
Setting up Zapier’s “Catch webhook” trigger
Copying the webhook URL for the JSON block
A simple lead generation flow asks questions and sets the user attributes
JSON block setup with Zapier webhook URL and a number of parameters from user attributes
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.
Now, go back to Zapier and click the “TEST & REVIEW” button in the “Find Data” part of the Webhook trigger settings.
Testing the connection between Activechat and Zapier
Example chatbot conversation for lead generation purposes
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!)
Sample data sent by your JSON block to Zapier’s webhook endpoint
Adding the ACTION step after the original Webhook trigger
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:
Data sent from the JSON block is available in Zapier
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.