You can set up a global webhook to send all incoming and outgoing message data from your WhatsApp chatbot—including connection status, incoming messages, outgoing messages, disconnections, battery level changes, and more—to any third-party application.
This is especially useful for automating workflows. For example, you could send the data to no-code platforms like Make, n8n, Pabbly, or Zapier, and use that data to trigger personalized actions such as sending an email or saving customer info into a Google Sheet.
Setting it up is pretty easy. We will be using Make in this example, but it works pretty much the same with any app.
Login to SocialPoster. Go to WhatsApp > API. Select your account and scroll to the section titled POST – Set Receiving Webhook. Here you will find the Global Webhook URL
Prepare the Webhook URL. To activate this global webhook, you need to open this URL in your browser. This URL tells SocialPoster where to send the data (your other app’s webhook), which instance to use (your WhatsApp session) and your access token.
The URL structure looks like this:
https://socialposter.planifyx.com/api/set_webhook?webhook_url=ENCODED_URL&enable=true&instance_id=YOUR_INSTANCE_ID&access_token=YOUR_TOKEN
Let’s break that down:
- webhook_url: The URL where messages will be sent (from n8n)
- enable=true: Enables the webhook
- instance_id: Your WhatsApp session ID
- access_token: Your personal access token from SocialPoster
In the URL provided by SocialPoster, all the fields are set (when you select your account, the token and instance id are set automatically) except for the webhook_url, we need to replace it with the Test URL provided by your third party app. Let’s see how to obtain it from Make.
Go to Make and create a new scenario. Click the “+” button to add your first module. Search for and select: “Webhooks” → “Custom Webhook”.
Click “Add” to create a new custom webhook. Give it a name.
Make will generate a public webhook URL. Copy it.
You need to encode that URL before inserting it into the SocialPoster webhook URL. You can use an URL encoder like URL Encoder/Decoder or simply ask ChatGPT to do it for you.
In this example, the Make URL looks like this:
https://hook.us1.make.com/3l9hi2h15ggd0auev518rqt3pv2dnke1
And the encoded version would be like this:
https%3A%2F%2Fhook.us1.make.com%2F3l9hi2h15ggd0auev518rqt3pv2dnke1
Now, just insert it into the webhook url section of the SocialPoster link we obtained before to get something like this (with your own access token and instance id):
https://socialposter.planifyx.com/api/set_webhook?webhook_url=https%3A%2F%2Fhook.us1.make.com%2F3l9hi2h15ggd0auev518rqt3pv2dnke1&enable=true&instance_id=673FFC91EE4EA&access_token=645d74db13147
Take the resulting URL and paste it into your browser. You should see a message like this, meaning the webhook has been activated.
In Make, click “Run once” to start listening for data. Send a message from a real phone number to the WhatsApp number connected to your chatbot.
When the message is received, the webhook will be triggered. Make will display the payload (the raw data received). Congrats! Your global webhook is now active and receiving data.
Now, let’s store that information in a Google Sheet. Add a new module in Make by clicking “+”. Search for Google Sheets and select the “Add a Row” action.
Click “Connect with Google”, then “Create a connection”. Authorize your account.
Here, I had previously created an Spreadsheet to collect the data.
Use Make’s Spreadsheet ID tool to find the document by title. Select the Sheet to send the information, and if it applies, indicate it has headers. Then, simply select the values collected from the Webhook and map them to the column where you want to store them.
Set the rest of the values as empty. Then, save the step.
Now, let’s add a filter so only the messages asking for information are actually stored on the Google sheet. Click on the tools icon between the two steps on your Make flow and select “Set up a filter”.
Set a label to identify your filter. As the condition, map the message field. Set the operator to “Contains” and add the keyword on the box below. Save.
Click on Run Once > Wait for new data to test the whole workflow. Once again, send a message to your WhatsApp chatbot. Make sure that it contains the keywords set on your filter.
You should see that the information is received by Make. A new row will be automatically created on your Google Sheet.
And that’s it! Replace Google Sheets with any application you want to create your own, personalized flows attuned to your needs.