# Instagram DMs and comments in n8n with the Facebook Trigger

> Set up n8n's Facebook Trigger Instagram object for messages, comments and mentions, pass Meta's verification, and reply through the Send API.

Published 2026-11-04. Z-API Omni team.

Pick **Instagram** as the object in n8n's Facebook Trigger node, keep the `*` wildcard or narrow it to Messages, Comments and Mentions, and turn on **Include Values**. Run the step so n8n is listening, then paste its Webhook URL into your Meta app and click **Verify and save**. To answer a DM, post to `/<PAGE_ID>/messages` from an HTTP Request node with a Page access token and the sender's Instagram-scoped ID. For Messenger, n8n's Page object lists no messaging fields, so its docs don't show a way to receive Messenger DMs with this node.

## What the Instagram object delivers

n8n's Facebook Trigger page summarizes Instagram as comments on your app users' media, @mentions and expired Stories. The Instagram object page lists seven fields ([n8n Facebook Trigger Instagram object, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.facebooktrigger/instagram/)).

| Field | n8n's description |
|---|---|
| Comments | "Notifies you when anyone comments on an IG Media owned by your app's Instagram user." |
| Mentions | "Notifies you whenever an Instagram user @mentions an Instagram Business or Creator Account" |
| Messages | "Notifies you when anyone messages your app's Instagram user." |
| Messaging Seen | "Notifies you when someone sees a message sent by your app's Instagram user." |
| Messaging Handover | No description |
| Standby | No description |
| Story Insights | Metrics on a story, one hour after it expires |

By default the node triggers on every field through the `*` wildcard. To narrow it, remove the star with the `X` and pick fields "using the dropdown or an expression."

## Why this setup doesn't cover Messenger

The Page object lists Feed, Leadgen, Live Videos, Mention, Merchant Review and Page Change Proposal ([n8n Facebook Trigger Page object, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.facebooktrigger/page/)). It also lists Page Upcoming Change, Product Review, Ratings, Videos and some unnamed profile fields. None of them is a messaging field. Meta's Messenger webhook needs the `messages` field subscribed on the Page's `subscribed_apps`, with the `pages_messaging` and `pages_manage_metadata` permissions ([Meta Messenger webhooks, accessed 2026-11-04](https://developers.facebook.com/documentation/business-messaging/messenger-platform/webhooks)). n8n's docs don't say whether typing `messages` into the Page object works, so treat it as untested and check an execution before you build on it.

## Create the Meta app and the credential

The Facebook App credential has two fields: **Access Token**, required, and **App Secret**, optional ([n8n Facebook App credentials, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/credentials/facebookapp/)).

1. Create a Meta app of the Business type and add the Webhooks product.
2. In Graph API Explorer, choose the app, select **Get App Token** and then **Generate Access Token**. Save the token, because the webhook step needs it again.
3. Paste it into the credential's **Access Token** field.
4. For **App Secret**, open App settings > Basic and select **Show**.

n8n says the App Secret verifies the integrity and origin of the payload. It doesn't say whether the node checks the `X-Hub-Signature-256` header with it. Meta signs each delivery with SHA256 in that header, "preceded with 'sha256='", and strongly recommends checking it. [Signature verification](/academy/articles/whatsapp-webhook-signature-verification-x-hub-signature-256/) shows the same check in an n8n Webhook node.

## Configure the trigger and pass verification

The node has to be listening when Meta sends its verification request.

1. In the Facebook Trigger, choose the credential, enter the App ID of the same app and select **Instagram** as the object.
2. Under Options, turn on **Include Values**. n8n says this object type "fails without the option enabled."
3. Select **Execute step** so n8n is listening.
4. In the Meta app's Webhooks settings, paste n8n's **Webhook URL** as the **Callback URL** and the access token from the credential as the **Verify token**.
5. Select **Verify and save**, then subscribe to the Instagram fields you need and send a test event from Meta.

Meta's verification is a GET with `hub.mode` set to `subscribe`, a `hub.verify_token` and a `hub.challenge` that your endpoint must echo back. n8n answers it itself, which is why step 5 fails when the node isn't listening.

## Documented gotchas

docs.n8n.io has no common issues page for the Facebook Trigger. The URL where one would sit returns Page Not Found (checked 2026-11-04). The pages that do exist name these traps.

Include Values must be on for the Instagram and Page objects. Verify and save fails unless n8n is listening. In Development mode, only people with a role on the app can authenticate. To open it up, add a Privacy Policy URL and switch the app to Live. "App Review requires Business Verification", and you may also need Advanced Access for webhook subscriptions. Meta also caps you at a developer or administrator role on 15 apps that aren't linked to a Meta Verified Business Account.

If test events arrive but the published workflow stays silent, the n8n Webhook node docs describe the split. A test webhook is registered when you listen or execute, and a production one when you publish ([n8n Webhook node, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/)). The Facebook Trigger pages don't discuss test and production URLs. [Fixing an n8n webhook that only works in test](/academy/articles/n8n-webhook-not-receiving-production-url/) covers the Webhook node side.

Meta's Messenger webhooks page sets the delivery rules. Answer "with a `200 OK HTTPS` response" within 5 seconds. After an hour of failed deliveries, Meta disables the webhook and unsubscribes the app. Messages sent while your endpoint was failing "may not be delivered in the order they were sent." The Instagram pages read for this post don't restate them.

## Reply to a DM with the Send API

For an Instagram account linked to a Facebook Page, "You send messages using the same `/<PAGE_ID>/messages` endpoint as Messenger" ([Meta Messenger send messages, accessed 2026-11-04](https://developers.facebook.com/documentation/business-messaging/messenger-platform/send-messages)). The recipient is the IGSID, the Instagram-scoped ID of the person who wrote.

This path needs the `instagram_basic`, `instagram_manage_messages` and `pages_manage_metadata` permissions and a Page access token ([Meta Instagram Messaging get started, accessed 2026-11-04](https://developers.facebook.com/documentation/business-messaging/instagram-messaging/get-started)). A Page token obtained from a short-lived User token is valid for only one hour. In the Instagram app, turn on **Allow Access to Messages** under Settings > Messages and story replies > Message controls > Connected Tools. [Getting a Page access token for the Send API](/academy/articles/messenger-platform-send-api-setup-page-token/) walks through the token.

Meta's Messenger sample shows the request:

```shell
curl -X POST -H "Content-Type: application/json" -d '{
  "recipient":{
    "id":"<PSID>"
  },
  "messaging_type": "RESPONSE",
  "message":{
    "text":"Hello, world!"
  }
}' "https://graph.facebook.com/v26.0/{PAGE-ID}/messages?access_token={PAGE-ACCESS-TOKEN}"
```

For Instagram, put the IGSID where Meta's sample has `<PSID>`. A successful call returns `recipient_id` and `message_id`. They confirm Meta accepted the message. Delivery to the person is a separate event.

In n8n, add an HTTP Request node with Method POST and the URL above. Turn on **Send Body** and choose **Using JSON** ([n8n HTTP Request node, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)). You can paste Meta's command through **Import cURL**, but imported values become strings, so switch the body to Using JSON afterwards.

The mapping below is our assembly, not an n8n or Meta sample. n8n's docs don't show the trigger's output, so this path assumes the node passes Meta's `entry[].messaging[]` envelope through unchanged. Open one execution and correct the path to match what you see.

```json
{
  "recipient": { "id": "{{ $json.entry[0].messaging[0].sender.id }}" },
  "messaging_type": "RESPONSE",
  "message": { "text": "Thanks, we got your message." }
}
```

Instagram has no separate echo subscription. Meta says "the message echo notifications are included with the `message` webhook field subscription", so your own replies come back through the trigger. Inspect one echo in your executions and add an If node that drops it before the reply step, or the workflow answers itself.

## Errors and the reply window

Meta's send messages page lists these errors.

| Code | Meaning |
|---|---|
| 10 | Permissions error |
| 100 | Invalid parameter |
| 190 | Access token expired |
| 551 | Person is not available |
| 613 | Rate limit exceeded |
| 1545041 | Person is not available |

On the same page, the reply window "for most user actions" lasts 24 hours, and after a Click-to-Messenger or Click-to-Direct ad it "may last up to 7 days". The [Instagram 24-hour window and human agent tag](/academy/articles/instagram-messaging-api-24-hour-window-human-agent-tag/) covers what you can send after that.

If your Instagram account is connected through Instagram Login instead of a Page, the reply goes to `graph.instagram.com` with an Instagram User access token. That setup is in [the Instagram Login guide](/academy/articles/instagram-messaging-api-setup-instagram-login/). Comments and mentions have their own reply paths: [private replies to comments](/academy/articles/instagram-comment-private-replies-api/), [comment moderation](/academy/articles/instagram-comment-moderation-api-hide-delete-reply/) and [story mentions](/academy/articles/instagram-story-mentions-replies-webhook/).

*Z-API Omni team*
