Auto-reply to Instagram DMs with an AI chatbot and Google Gemini history
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs when an HTTP GET request hits its webhook URL. Along the way it connects Google Gemini Chat Model.
How it runs
Trigger: When an HTTP GET request hits its webhook URL.
- Webhook Verification (Respond to Webhook): sends the response back to the webhook caller
- Is Message? (If): checks a condition and branches into true / false
- Set Context (Edit Fields (Set)): sets 5 fields: message, ig_id, is_from_bot…
- Is from page? (If): checks a condition and branches into true / false
- User is Sender (Edit Fields (Set)): sets 1 field: user_id
- Insert To Unprocessed (Data table): uses Data table
- Seen (HTTP Request): calls an HTTP API (POST)
- Get MaxID and Merged Mess (Code): runs custom JavaScript code
- Get history message (Data table): get
- Get 15 newest rows (Code): runs custom JavaScript code
…plus 10 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - Edit Fields (Set)
n8n-nodes-base.set - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code - Wait
n8n-nodes-base.wait - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Data table
n8n-nodes-base.dataTable - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
Auto-reply Instagram DM with AI Chatbot, Conversation History using Google Gemini and n8n Data Table This workflow turns your Instagram Business or Creator account into an AI-powered customer support chatbot using Google Gemini and n8n Data Table for…