> For the complete documentation index, see [llms.txt](https://docs.quickreply.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickreply.ai/product-modules/ai-builder/ads-to-dms.md). Agents can also search and read this documentation through its [MCP server](https://docs.quickreply.ai/~gitbook/mcp).

# Ads to DMs

Meta Ad ID Mapping allows you to associate a specific Meta ad with an Instagram DM Playbook in QuickReply.ai. When a user clicks Send Message on the configured ad, the associated Playbook can respond to the user in Instagram DMs.

This helps businesses connect their advertising campaigns with automated conversations, engage potential customers, and respond to product inquiries.

Use cases

* **Lead generation:** Start conversations with users who respond to lead-generation ads.
* **Product inquiries:** Engage users who click messaging ads to learn more about a product.
* **Promotional campaigns:** Share offer details with users interested in a promotion.
* **Customer engagement:** Guide users through an automated conversation after they interact with an ad.

### Prerequisites

Before configuring Meta Ad ID Mapping, ensure that:

* Your Instagram Professional account (Business or Creator) is connected to QuickReply.ai.
* Your Instagram account is linked to a Facebook Page.
* You have access to Meta Ads Manager and the relevant ad account.
* You have created or selected the Instagram DM Playbook you want to associate with the ad.

**Note:** If Instagram is not connected to QuickReply.ai, complete the[ Instagram and Facebook Messenger connection setup](https://docs.quickreply.ai/overview/messaging-channels/instagram-and-messenger/connect) first.

### Set Up Meta Ad ID Mapping

#### Step 1: Find Your Meta Ad ID

1. Log in to[ Meta Ads Manager](https://adsmanager.facebook.com/).
2. Select the relevant ad account.
3. Navigate to the Ads Manager and click on Campaigns.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FAKpmfC5p0Lo4gp1w5tZW%2FPasted%20image%202026-11-16%2012.00.41.png?alt=media\&token=59902654-6b8f-4f46-8bb8-2e292bc3de80)

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2Fjy43V0wN87UuekYa6NLp%2FPasted%20image%202026-11-16%2012.00.49.png?alt=media\&token=003fd2cb-dea8-42fb-b709-cb9eb0c992c0)

4. Click on the campaign name to view a particular Ad.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FCPZZkpq2bszkCC5lWU5g%2FPasted%20image%202026-11-16%2012.00.56.png?alt=media\&token=ae5c4d9b-5ac4-4416-ae63-ddf7b05108f5)

5. Check the browser URL for the 'selected\_ad\_ids= parameter' and copy the numeric value that follows it. That is the required Ad ID.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FpYeB1zDljsvx8M0Zi1ab%2FPasted%20image%202026-11-16%2012.01.00.png?alt=media\&token=d1f09d81-9d21-4c51-8053-ddb3dcbacaf8)

Alternatively, click the three-dot menu next to the ad, select View history, and copy the Ad ID displayed under Item Changed.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FQL5JlaNT0BdGYhXUPRav%2FPasted%20image%202026-11-16%2012.01.07.png?alt=media\&token=527ed0b0-9ecf-4de6-bf8c-b1073f9930dd)

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2F66GGQRdfsqlcH4WPh9Uf%2FPasted%20image%202026-11-16%2012.01.11.png?alt=media\&token=ac6538d7-542f-464b-bb92-46565b096c9d)

**Note:** Make sure you copy the ID of the individual ad, NOT the Campaign ID or Ad Set ID.

#### Step 2: Map the Ad ID in QuickReply.ai

1. Log in to your QuickReply.ai dashboard.
2. Navigate to AI Builder.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FFeBCFCtZfRzk0r6HQb9t%2FPasted%20image%202026-11-16%2012.01.19.png?alt=media\&token=f95ef60d-8bfd-40e4-8a3f-d0156eb9dacb)

3. Under Instagram DM Playbook, select the Playbook you want to associate with the ad.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FH269Vke2YeRiIT3r93IM%2FPasted%20image%202026-11-16%2012.01.23.png?alt=media\&token=c84c8656-b43f-47f3-8639-6b42fe108230)

4. Open the Configure tab.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FeYo07OGjPlArHy3G9rX8%2FPasted%20image%202026-11-16%2012.01.27.png?alt=media\&token=e49d0b8a-d889-47f4-a124-ee6b2ec43797)

5. Locate the section labelled Specify Meta Ad IDs that this bot will interact with.
6. Click + Add Meta Ad ID.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FpSzav8fGjmnJcMP9qjt0%2FPasted%20image%202026-11-16%2012.01.31.png?alt=media\&token=18770f16-1167-4f4e-806b-ccda4748779e)

7. Enter the Ad ID copied from Meta Ads Manager.
8. Confirm the entry and click on the save option alongside to save the configuration.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2FxG860ivZw1McPM5tF08P%2FPasted%20image%202026-11-16%2012.01.35.png?alt=media\&token=167d9cf7-b2ca-4dc8-9c1f-ebc82bd9e9c3)

You can also remove a particular ID by clicking on the delete icon alongside.

The selected Meta Ad ID is now mapped to the Instagram DM Playbook.

#### Step 3: Configure Keyword-Based Triggers (Optional)

You can restrict Comment-to-DM so that it runs only when a comment contains one or more specified keywords.

1. In the Configure tab, expand Advanced options.
2. Locate the setting Trigger Comment-to-DM Only When Comment Matches Following Keywords.
3. Enter the keywords you want to match.
4. Press Enter after each keyword to add it.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2Fp0LYrRGZPCQhHhIPcWOw%2FPasted%20image%202026-11-16%2012.01.38.png?alt=media\&token=3b26c72e-3a73-4d75-94ed-656af2ab0eef)

When keyword-based triggering is enabled, Comment-to-DM runs only if at least one configured keyword matches the Instagram comment.

Example: If you configure price, comments such as “price” or “price please” can match the keyword.

#### Step 4: Configure the Playbook

1. Open the Playbook's Build tab.
2. Configure the initial message you want users to receive.
3. Add quick replies, buttons, or subsequent conversation steps as needed.

![](https://1325107618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FePPO97Ju334NhhCzTEZP%2Fuploads%2Fep23cdw2eezDNnFrTC1e%2FPasted%20image%202026-11-16%2012.01.42.png?alt=media\&token=db23b4ea-b908-431f-a372-993d4b1b18e3)

**Note:** The Playbook defines the automated conversation. Review the message flow to ensure it is appropriate for users arriving from the selected ad.

### How It Works

Once the Meta Ad ID is mapped to the Playbook:

1. A user sees the configured Meta ad.
2. The user clicks Send Message on the ad.
3. The associated Instagram DM Playbook responds in the user's Instagram inbox.
4. The conversation continues according to the configured Playbook flow and applicable Meta messaging rules.

### Important Guidelines

* **Use the correct Ad ID:** Map the ID of the individual ad you want to connect to the Playbook.
* **Ad ID and Post ID are different:** Use the Meta Ad ID field for ad-based messaging. Use the Instagram Post ID field when configuring Comment-to-DM for comments on an Instagram post.
* **Configure the Playbook:** Mapping an Ad ID associates the ad with the Playbook; the Playbook's message flow determines the automated conversation.
* **Check your messaging setup:** Ensure Instagram DM is connected and the ad is configured to support the intended Instagram messaging experience.

### FAQs

<details>

<summary>What is a Meta Ad ID?</summary>

A Meta Ad ID is a unique identifier assigned to an individual ad in Meta Ads Manager. QuickReply uses it to associate the ad with an Instagram DM Playbook.

</details>

<details>

<summary>Can I use a Campaign ID or Ad Set ID instead?</summary>

No. Use the individual ad's Meta Ad ID for this configuration.

</details>

<details>

<summary>What is the difference between Meta Ad ID Mapping and Comment-to-DM?</summary>

Meta Ad ID Mapping associates an ad with an Instagram DM Playbook so the Playbook can respond when a user clicks Send Message on that ad. Comment-to-DM uses an Instagram Post ID to trigger an automated DM when someone comments on a configured post.

</details>

<details>

<summary>Does mapping the Ad ID create the Playbook?</summary>

No. You must create or select the Playbook separately and configure its message flow in AI Builder.

</details>

<br>
