Even when you can use our Zapier integration to connect WhatsApp with other apps, you may want to connect your 2Chat flows with Zapier directly to trigger integrations and use the thousands of apps available on the platform using dynamic data.
How to create the zap in Zapier
In Zapier you must create a new Zap and add a "Webhooks by Zapier" component as the trigger.
Now in the configuration, you must select Catch Hook as the event. This will allow the zap to run when any external request is received.
Go to the Test section, you will find the webhook URL we will use in 2Chat
How to send data to a Zapier webhook from 2Chat
In 2Chat you have to create a new flow and after the trigger, you can use some Message and Wait for Reply components to ask the customer for any information to send it to Zapier
In this example, we will ask for the name and email
The last part is to add a HTTP Request component to send the data to Zapier.
Add the following data:
Request type: POST
Request URL: The API or webhook URL
Body: We will send the data to Zapier in JSON format. You can click on the buttonto add dynamic data, including the variables asked in the previous steps.
Now you must publish the 2Chat Flow to test the integration.
Testing the integration and using the data
You must go to the test section in the Zapier webhook component and click on the Test button, Zapiert will recover the requests received in the webhook.
As you can see, the data sent in JSON format is recovered by Zapier, now you can use this data as parameter in other Zapier integrations.