While creating ads, you can run messenger. Below are steps on how to connect facebook messenger ads with chatbot.
Open ad manager and edit the ad. Go to "message template" section and click on "Create new" in the dropdown to create a new message template, as shown below in the image.
Click on "Start conversations" and Create button below that, as shown below
Choose desired message type among "text only", "text and image" or "text and video" and configure text/image/video.
In the custom action section select "Quick Replies". Add as many Quick reply options as needed.
For each quick reply option, in the automated response section, select "connect your bot" in dropdown. In bot payload fill PLAYBOOK_<playbook id> as shown below in the image. You can get playbook id from AI builder(in left bar hover over playbook name, click on 3 dots and select "copy id")
In the customer action, instead of Quick Replies, you can also use Buttons and in button payload user PLAYBOOK_<playbook id>.
In the 2nd step, instead of "Start conversations" you can click on "Advanced setup", define your own JSON payload as required and use PLAYBOOK<playbook id> wherever bot payload is required.