Skip to main content

Reply to Instagram and Facebook comments via Meta webhooks and DMs

Workflow preview

Workflow preview
100%
Reply to Instagram and Facebook comments via Meta webhooks and DMs preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow receives Meta webhooks for Instagram and Facebook Page comments, verifies the webhook subscription handshake, and then posts an optional public reply and/or sends a pri...

Best for

  • Social Media automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Pawel.

Original n8n.io source

1.1 Workflow description

Title
Reply to Instagram and Facebook comments via Meta webhooks and DMs
Workflow name
Reply to Instagram and Facebook comments via Meta webhooks and DMs

Quick Overview

This workflow receives Meta webhooks for Instagram and Facebook Page comments, verifies the webhook subscription handshake, and then posts an optional public reply and/or sends a private DM to the commenter via the Meta Graph API.

How it works

  1. Receives an incoming webhook request from Meta for either verification (hub.challenge) or comment events.
  2. Validates Meta’s subscription request by checking hub.mode and hub.verify_token, and returns the hub.challenge when verification is requested.
  3. Acknowledges comment event deliveries with a 200 OK response so Meta considers the webhook successfully received.
  4. Parses the webhook payload to extract new Instagram comments or Facebook Page feed comments, skipping self-comments and optionally filtering by a configured keyword.
  5. Builds Meta Graph API requests for a public comment reply and a private reply DM based on your configured messages.
  6. Sends the public reply and/or DM using HTTP requests to the Instagram Graph API or Facebook Graph API with your access token.

Setup

  1. Create a Meta app, enable Webhooks, and ensure you have the required permissions for Instagram (instagram_business_basic, instagram_business_manage_comments, instagram_business_manage_messages) and/or Facebook Pages (pages_manage_engagement, pages_read_engagement, pages_messaging).
  2. In the Configuration (EDIT ME) step, set your access_token, choose a verify_token, and optionally set keyword, comment_reply, dm_message, and the Graph api_version.
  3. Copy the Production webhook URL from the Webhook (Meta) trigger into the Meta Webhooks configuration, set the same verify_token, and subscribe to Instagram comments and/or Facebook Page feed comment events.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Webhook (Meta)

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 2 - Configuration (EDIT ME)

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Meta Verification?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 4 - Respond hub.challenge

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 5 - Respond 200 OK

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.4

Block 6 - Extract Comment

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Send Public Reply?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Send DM?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Reply to Comment

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 10 - Send DM (private reply)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Reply to Instagram and Facebook comments via Meta webhooks and DMs
Complexity intermediate
Nodes 13
Categories Social Media
Author Pawel
Published 12 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16300/16300.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Reply to Instagram and Facebook comments via Meta webhooks and DMs do?

Quick Overview This workflow receives Meta webhooks for Instagram and Facebook Page comments, verifies the webhook subscription handshake, and then posts an optional public reply and/or sends a pri...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media use case.