Skip to main content

Send Instagram auto DMs to post commenters using Meta Graph API

Workflow preview

Workflow preview
100%
Send Instagram auto DMs to post commenters using Meta Graph API preview
Open on n8n.io

1. Workflow Overview

Automate the most popular growth hack on Instagram: "Comment 'DM' to get the link!" This workflow listens to your Instagram posts in real time. When a follower comments a specific trigger word (lik...

Best for

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

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.filter, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.if, 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 Salman Mehboob.

Original n8n.io source

1.1 Workflow description

Title
Send Instagram auto DMs to post commenters using Meta Graph API
Workflow name
Send Instagram auto DMs to post commenters using Meta Graph API

Automate the most popular growth hack on Instagram: "Comment 'DM' to get the link!"

This workflow listens to your Instagram posts in real-time. When a follower comments a specific trigger word (like "DM", "Link", or "Guide"), n8n automatically sends them a direct message containing your lead magnet, product link, or document.

Stop replying to hundreds of comments manually. Build your email list, drive traffic to your website, and scale your engagement on autopilot! 🚀

🎯 Use Cases

  • Content Creators: Send exclusive PDF guides or templates to followers who engage with your reels/posts.
  • E-commerce Brands: Send discount codes or hidden product links directly to interested buyers.
  • Course Creators & Coaches: Deliver webinar registration links instantly when someone comments on your promotional post.

✨ Workflow Features

  • Smart Filtering: Ignores your own replies so it doesn't trigger an infinite loop.
  • Post-Specific: Only triggers for the exact Post ID you define (won't misfire on your older posts).
  • Case-Insensitive: Catches both "DM" and "dm" seamlessly.
  • Instant Delivery: Uses the official Meta Graph API to deliver messages the second the comment is posted.

🛠️ Prerequisites

To use this workflow, you will need:

  1. An Instagram Professional/Business Account linked to a Facebook Page.
  2. A Meta Developer App with the instagram_manage_comments and instagram_manage_messages permissions.
  3. Your Meta App configured to send Webhooks to this n8n instance.

🎥 Setup Instructions & Video Guide

If you're new to setting up Meta Webhooks and generating Graph API Access Tokens, don't worry! I have recorded a complete walkthrough:

👉 Watch the Step-by-Step Video Setup Guide Here

Quick Start Steps:

  1. Webhook Configuration: Copy your n8n Webhook URL and paste it into your Meta Developer App (Webhooks -> Instagram -> comments).
  2. Set Target Post: Open the Match Post ID node. Replace Your-Instagram-Post-ID with the ID of your reel/post. Replace Your-Instagram-Account-ID with your own IG ID.
  3. Set Trigger Word: Open the Match Comment Text node and type the exact keyword you want your audience to comment (e.g., "DM").
  4. Draft Your Message: Open the Data node and replace Your-Message-Here with your customized message and link!
  5. Add Credentials: Add your Facebook Graph API Access Token in the Send DM HTTP node.
  6. Activate: Toggle the workflow to Active and watch the DMs roll in!

📞 Support & Custom Workflows

Running into issues setting up the Meta App, or need a custom AI workflow built for your business? I am an n8n Verified Creator and I'm here to help!

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 - Trigger on Instagram Comment

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

Block 2 - Match Comment Text

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.3

Block 3 - Data

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

Block 4 - Send DM

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

Block 5 - Match Post ID

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

Block 6 - Sticky Note

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

Block 7 - Sticky Note1

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

Block 8 - Sticky Note2

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

Block 9 - Sticky Note3

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

3. Summary Table

Workflow Send Instagram auto DMs to post commenters using Meta Graph API
Complexity intermediate
Nodes 9
Categories Social Media
Author Salman Mehboob
Published 21 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15206/15206.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 Send Instagram auto DMs to post commenters using Meta Graph API do?

Automate the most popular growth hack on Instagram: "Comment 'DM' to get the link!" This workflow listens to your Instagram posts in real time. When a follower comments a specific trigger word (lik...

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.