# Messenger Ads to chatbot

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.

![](https://3241020264-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LV26ZH2qOAtZoupy1GS%2F-MSBTZ2EoCoCvNFN2oXi%2F-MSBUc4HcBB6Ji8F0M_s%2Fimage.png?alt=media\&token=3f13f6d2-def7-4b32-8b12-816909c36f1b)

* Click on "Start conversations" and Create button below that, as shown below

![](https://3241020264-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LV26ZH2qOAtZoupy1GS%2F-MSBTZ2EoCoCvNFN2oXi%2F-MSBWxXZbopn0TKO-OoU%2Fimage.png?alt=media\&token=a0c8ec1f-8b4a-44fb-af8d-1f6d5c6943f2)

* 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")

![](https://3241020264-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LV26ZH2qOAtZoupy1GS%2F-MSBTZ2EoCoCvNFN2oXi%2F-MSBVyr3b1oEPWoz3nNn%2Fimage.png?alt=media\&token=5a6a2d3e-ce2e-4e42-ab74-5c8f5dec3a07)

* 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.
