{"product_id":"n8n-instagram-auto-reply-workflow-graph-api-gemini-dms","title":"n8n Instagram Auto Reply Workflow: Graph API + Gemini DMs","description":"\u003ch3\u003eAutomatically reply to Instagram comments (and optional DMs) using n8n + Gemini\u003c\/h3\u003e\n\u003cp\u003eThis n8n Instagram Auto Reply Workflow listens for Instagram webhook events, generates concise replies with \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e, posts them via the \u003cstrong\u003eFacebook Graph API\u003c\/strong\u003e, and logs everything to \u003cstrong\u003eSlack\u003c\/strong\u003e and \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives Meta webhook events\u003c\/strong\u003e for Instagram and responds to the Meta verification challenge during subscription setup.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAcknowledges incoming events\u003c\/strong\u003e and \u003cstrong\u003eignores events created by your own Instagram account\u003c\/strong\u003e to prevent reply loops.\u003c\/li\u003e\n  \u003cli\u003eFor \u003cstrong\u003ecomment events\u003c\/strong\u003e: fetches the related Instagram media caption using the \u003cstrong\u003eFacebook Graph API\u003c\/strong\u003e, then uses \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e to draft a \u003cstrong\u003eone-line public reply\u003c\/strong\u003e (or the workflow result \u003ccode\u003eno_answer\u003c\/code\u003e when no response is needed).\u003c\/li\u003e\n  \u003cli\u003eWhen a reply is needed, it \u003cstrong\u003ewaits a random 3–5 minutes\u003c\/strong\u003e to space out responses, then \u003cstrong\u003eposts the reply\u003c\/strong\u003e back to the original comment via the \u003cstrong\u003eFacebook Graph API\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNotifies a Slack channel\u003c\/strong\u003e and updates a \u003cstrong\u003e“last run” timestamp in Google Sheets\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf the generated public reply includes the keyword \u003cstrong\u003e“DM”\u003c\/strong\u003e, Gemini drafts a \u003cstrong\u003eprivate DM\u003c\/strong\u003e, and the workflow \u003cstrong\u003esends it via the Facebook Graph API\u003c\/strong\u003e and logs the DM content to \u003cstrong\u003eSlack\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eFor \u003cstrong\u003estory mention events\u003c\/strong\u003e, it sends a notification to a \u003cstrong\u003ededicated Slack channel\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eTurn Instagram comment engagement into \u003cstrong\u003eimmediate, on-brand responses\u003c\/strong\u003e while keeping posts natural with a 3–5 minute delay.\u003c\/li\u003e\n  \u003cli\u003eAutomatically trigger a \u003cstrong\u003eprivate DM\u003c\/strong\u003e when your public reply indicates “DM”.\u003c\/li\u003e\n  \u003cli\u003eGive your team visibility with \u003cstrong\u003eSlack alerts\u003c\/strong\u003e and operational tracking via \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMeta Webhooks\u003c\/strong\u003e (Instagram subscription verification + event intake)\u003c\/li\u003e\n  \u003cli\u003eNodes\/logic: \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003ewait\u003c\/strong\u003e, \u003cstrong\u003eslack\u003c\/strong\u003e, \u003cstrong\u003egoogle sheets\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFacebook Graph API\u003c\/strong\u003e for reading Instagram captions, posting comment replies, and sending messages (Graph API permissions required)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e for drafting public replies and optional DM content\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45869873660083,"sku":"N8N-18455","price":72.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/eQT794oFcDNefSkJD0Bi2_Y62xEETM.png?v=1787130066","url":"https:\/\/buyflowscripts.com\/products\/n8n-instagram-auto-reply-workflow-graph-api-gemini-dms","provider":"N8N Commerce","version":"1.0","type":"link"}