📱 Send Instagram auto DMs to post commenters using Meta Graph API
⚡ 1,167 views · 📱 Social Media & Email Marketing
💡 Pro Tip — Heads up — if this workflow’s Instagram scraping breaks (it happens whenever Meta updates their frontend), ScraperNode is a community node that handles profiles, posts, reels, and comments without any HTML parsing.
Description
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:
- An Instagram Professional/Business Account linked to a Facebook Page.
- A Meta Developer App with the
instagram_manage_commentsandinstagram_manage_messagespermissions. - 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:
- Webhook Configuration: Copy your n8n Webhook URL and paste it into your Meta Developer App (Webhooks -> Instagram ->
comments). - Set Target Post: Open the
Match Post IDnode. ReplaceYour-Instagram-Post-IDwith the ID of your reel/post. ReplaceYour-Instagram-Account-IDwith your own IG ID. - Set Trigger Word: Open the
Match Comment Textnode and type the exact keyword you want your audience to comment (e.g., “DM”). - Draft Your Message: Open the
Datanode and replaceYour-Message-Herewith your customized message and link! - Add Credentials: Add your Facebook Graph API Access Token in the
Send DMHTTP node. - 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!
- 📧 Email: salmanmehboob1947@gmail.com
- 💼 LinkedIn:Let’s connect!
🔗 Nodes Used
HTTP Request, Webhook, Filter
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File