Start your Flow whenever someone sends a direct message to your bot in Work Chat. After adding the New Bot Message card to your Flow and authenticating it, you will need to follow these steps to manually configure the webhook in Workplace:
- Save your Flow and turn it on (you do not need to have other cards in your Flow yet, you can come back and add them later).
At the bottom of the New Bot Message card, select the “Webhook Settings” icon.
This brings up a dialog with the webhook URL. Click copy.
Inside Workplace by Facebook, find and open the custom integration that you created during the authentication step.
Inside the “Configure Webhooks” panel, select the “Page” tab. Paste in the webhook URL from Azuqua, and select the “messages” subscription field. You do not need to provide a “Verify Token.”
Select “Save” to save your webhook. If you receive an error, it is possible that your Flow is not turned on.
Return to Azuqua and finish building your Flow. You will see one empty execution in your Flow history. This is a test sent by Workplace when you saved your webhook to check that the URL was valid. All future executions will contain data sent to your webhook.
NOTE: Because Workplace only allows you to configure one bot webhook URL, you will only be able to have one active Flow that uses either New Bot Message or New Bot Mention. After configuring New Bot Message you cannot make a different Flow that begins with New Bot Mention and vice versa. You may also not have multiple Flows that begin with New Bot Message. Creating a new Flow that begins with New Bot Message the will invalidate the previous URL and cause your existing Flow to break.
- Message ID (text): The ID of the message to the bot.
- Message Text(text): The text of the message.
- From Member ID(text): The ID of the user who sent the message.
- Created At (number): When the message was sent.