Automate Instagram Comments to Leads with n8n + RapidDM
Use RapidDM to detect keywords in IG comments, send DMs with follow gate and form link; n8n builds form, stores in Notion, personalizes templates with JS, downloads files via HTTP, and emails attachments instantly—capturing leads 24/7 without manual replies.
Keyword-Triggered DMs Boost Lead Capture by 24/7 Response
RapidDM monitors Instagram posts for specific comment keywords (e.g., "interested", "guide") and auto-sends DMs, preventing lost sales from delayed replies like the author's $500 client miss. Key setup: Connect IG account, select "Comments with specific words" trigger, add unlimited keywords (pro tip: use obvious ones like "Type GUIDE for free guide"), enable "Ask to Follow" gate for non-followers with message like "One quick thing: Follow for exclusive content" and button "I'm Following". Post-follow message builds excitement (template: "Thank you... Click below for your template") and adds one button linking to n8n form URL (leave empty initially). Costs: 5-day free trial. This turns midnight comments into instant engagements, outperforming manual 9AM replies.
n8n Form Captures and Routes Leads to Notion
n8n workflow starts with Form Trigger node for submissions: fields Name (text), Email (text), Comment Word (dropdown matching keywords). Test by executing node, pin data to persist for workflow building, copy Production URL to RapidDM button. Add Notion node: Create database with template row (columns: Name, Body with First Name placeholder/HTML, File via S3 URLs, Subject e.g. "Here's the Resource Requested", Tags e.g. "BMW"). Connect via API (video guide referenced). Retrieves matching database page based on form's Comment Word, storing leads organized and free. 14-day free trial.
JS Personalization + File Download Enables Automated Delivery
Code Node (JS): Replaces First Name in Notion body with form's Name value—paste exact script:
const items = $input.all();
const formSubmission = $("On form submission").all()[0];
const updatedItems = items.map((item) => {
item.json.property_body = item.json.property_body.replace("[First Name]", formSubmission.json["Name"]);
return item;
});
return updatedItems;
Outputs personalized body. HTTP Request Node (GET, URL {{ $json.property_file[1] }} from Notion, no auth, include response headers): Downloads S3 file as binary "data" (e.g., bmw_m4.avif), converting URL to attachable file.
Gmail Node Delivers Personalized Resource Emails
Final Gmail node: Connect Google account, To: form email, Subject: Notion subject, HTML Message: Code node's personalizedBody, Attachment: HTTP data property. Executes in seconds, sending e.g. "Hi Name 😊 Here's your resource" with scanned attachment. Full flow: Comment → DM → Form → Notion → Personalize → Download → Email. Activates RapidDM last. Result: Businesses get agency-level lead gen cheap, growing lists passively as "creators winning on Instagram capture every engager".