Reply to Instagram DMs with keyword-based affiliate links via Meta Graph API
Ready for 3.0What this workflow does
This workflow has 23 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). It uses only n8n's built-in nodes.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Configure Global Settings (Edit Fields (Set)): sets 2 fields: accessToken, igUserId
- Get Inbox Conversations (HTTP Request): calls an HTTP API
- Get General Conversations (HTTP Request): calls an HTTP API
- Get Pending Conversations (HTTP Request): calls an HTTP API
- Get Message Requests (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- Merge: merges the data from its input branches
- Merge: merges the data from its input branches
- Parse Conversations (Code): runs custom JavaScript code
- Split Conversations (Loop Over Items (Split in Batches)): loops over the items in batches
…plus 10 more steps. See the full node list below.
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Read/Write Files from Disk
n8n-nodes-base.readWriteFile - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp
From the author
This n8n workflow is an automated Instagram DM responder that checks messages and replies with affiliate links based on keywords. It runs on a schedule (every 15 minutes) or can be triggered manually. First, it loads configuration values such as the Meta…