{"product_id":"whatsapp-instagram-dm-auto-reply-with-openai-google-sheets","title":"WhatsApp \u0026 Instagram DM Auto-Reply with OpenAI + Google Sheets","description":"\u003ch3\u003eTurn WhatsApp \u0026amp; Instagram DMs into instant AI replies—while automatically handing off to your team\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow connects to \u003cstrong\u003eMeta webhooks\u003c\/strong\u003e for \u003cstrong\u003eWhatsApp\u003c\/strong\u003e and \u003cstrong\u003eInstagram\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to generate short support\/booking responses, and logs every conversation to \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e. For corporate or group inquiries, it captures leads and alerts staff—then switches to a timed human handoff mode to pause the bot when needed.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives messages\u003c\/strong\u003e via Meta webhook endpoints (including separate \u003cstrong\u003eGET verification handling\u003c\/strong\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes each event\u003c\/strong\u003e into a common format: platform, sender ID, message type, and message text.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLooks up the sender\u003c\/strong\u003e in a Google Sheets \u003cstrong\u003eContacts\u003c\/strong\u003e tab.\u003c\/li\u003e\n  \u003cli\u003eIf the sender is new, \u003cstrong\u003estores the contact\u003c\/strong\u003e and sends a predefined \u003cstrong\u003ewelcome message\u003c\/strong\u003e back on the originating platform (WhatsApp or Instagram).\u003c\/li\u003e\n  \u003cli\u003eIf the contact is marked as \u003cstrong\u003ehanded off\u003c\/strong\u003e within the defined time window, the workflow \u003cstrong\u003estops without replying\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eOtherwise, it sends the user message to \u003cstrong\u003eOpenAI\u003c\/strong\u003e, then \u003cstrong\u003eparses returned JSON\u003c\/strong\u003e for intent and reply text, routing the conversation accordingly.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCorporate\/group lead handling:\u003c\/strong\u003e when required details are present, it saves the lead to a \u003cstrong\u003eLeads\u003c\/strong\u003e tab and \u003cstrong\u003eemails staff\u003c\/strong\u003e, then replies to the customer on the originating platform.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHuman handoff:\u003c\/strong\u003e marks the contact as handed off in Google Sheets, emails staff with the customer message, replies to the customer, and logs the exchange to a \u003cstrong\u003eConversations\u003c\/strong\u003e tab.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAuto-replying to WhatsApp\/Instagram inquiries with OpenAI while keeping a clean conversation history in Google Sheets.\u003c\/li\u003e\n  \u003cli\u003eCapturing corporate or group booking requests into a Leads sheet and alerting your team immediately.\u003c\/li\u003e\n  \u003cli\u003eTimed “pause bot” behavior so staff can take over without conflicting responses.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Meta webhooks (WhatsApp Business Cloud API \u0026amp; Instagram DM), \u003cstrong\u003eOpenAI\u003c\/strong\u003e, \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, staff email alerts.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes used:\u003c\/strong\u003e \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003eno op\u003c\/code\u003e, \u003ccode\u003eswitch\u003c\/code\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46159503458483,"sku":"N8N-20386","price":16.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/6QvPeTHDZNAfgqGDbY_1c_8tPYmMtO.png?v=1791104824","url":"https:\/\/buyflowscripts.com\/products\/whatsapp-instagram-dm-auto-reply-with-openai-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}