Automatización de mensajes directos e interacciones en Instagram con Hojas de Cálculo de Google y Puppeteer
Este es unLead Nurturingflujo de automatización del dominio deautomatización que contiene 43 nodos.Utiliza principalmente nodos como If, Code, Wait, Limit, Filter. Automatizar mensajes privados e interacciones en Instagram con Google Sheets y Puppeteer
- •Punto final de HTTP Webhook (n8n generará automáticamente)
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Credenciales de API de Google Sheets
Nodos utilizados (43)
Categoría
{
"meta": {
"instanceId": "bae91d9fd2fc59568657e329a7acafce827a5e83337ea795ba08c6589321900f"
},
"nodes": [
{
"id": "1c02bf82-9e11-42ce-a2bd-2f003c01f0e8",
"name": "Esperar2",
"type": "n8n-nodes-base.wait",
"position": [
496,
208
],
"webhookId": "1f2864af-8b9b-419f-9098-0260745d0d9f",
"parameters": {
"amount": 2
},
"typeVersion": 1.1
},
{
"id": "377f7600-363e-4aad-8097-2bb274643682",
"name": "Agregar o actualizar fila en sheet1",
"type": "n8n-nodes-base.googleSheets",
"position": [
272,
208
],
"parameters": {
"columns": {
"value": {
"Active": "=TRUE",
"username": "={{ $json.user }}"
},
"schema": [
{
"id": "username",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "username",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "password",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "password",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "proxy",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "proxy",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Active",
"type": "string",
"display": true,
"required": false,
"displayName": "Active",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"username"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1434077398,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit#gid=1434077398",
"cachedResultName": "acc"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit?usp=drivesdk",
"cachedResultName": "next-task"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cqlGJZJdttZJP57A",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "d993d7e3-d356-4bf4-bf5f-ee5a64eefb06",
"name": "Recorrer elementos2",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-400,
304
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "669710b2-a3d4-4d51-ad13-9d67b766cc83",
"name": "Solicitud HTTP1",
"type": "n8n-nodes-base.httpRequest",
"position": [
-176,
304
],
"parameters": {
"url": "http://host.docker.internal:3001/login",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "username",
"value": "={{ $json.username }}"
},
{
"name": "password",
"value": "={{ $json.password }}"
},
{
"name": "proxy",
"value": "={{ $json.proxy }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "861616b3-236b-49f0-9386-cec32ff0d253",
"name": "Obtener fila(s) en sheet2",
"type": "n8n-nodes-base.googleSheets",
"position": [
-624,
304
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1434077398,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit#gid=1434077398",
"cachedResultName": "acc"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit?usp=drivesdk",
"cachedResultName": "next-task"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cqlGJZJdttZJP57A",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "7674e75b-ee5c-4d8c-b4cd-66c4521fc502",
"name": "Recorrer elementos3",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-880,
-480
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "5513f903-2bc6-486c-9ca0-9a296f4647cc",
"name": "Filtrar1",
"type": "n8n-nodes-base.filter",
"position": [
-1328,
-480
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1f33fb41-ca94-4dd6-8303-b099d518b915",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.Status }}",
"rightValue": "s"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "91395ea6-306d-4af7-8fe2-ab6c4961ce09",
"name": "Limitar1",
"type": "n8n-nodes-base.limit",
"position": [
-1104,
-480
],
"parameters": {
"maxItems": 100
},
"typeVersion": 1
},
{
"id": "5ec859af-480e-4f23-bae1-9baf9d19061c",
"name": "Obtener fila(s) en sheet3",
"type": "n8n-nodes-base.googleSheets",
"position": [
-1552,
-480
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit#gid=0",
"cachedResultName": "leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit?usp=drivesdk",
"cachedResultName": "next-task"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cqlGJZJdttZJP57A",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "87c9ec8e-263f-4a02-af79-3b18acfd66a0",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
144
],
"parameters": {
"color": 3,
"width": 2528,
"height": 384,
"content": "## Login with an instagram account"
},
"typeVersion": 1
},
{
"id": "de2e47a4-70e5-47e1-8bb2-a5f52ee05cd8",
"name": "Solicitud HTTP5",
"type": "n8n-nodes-base.httpRequest",
"position": [
-656,
-848
],
"parameters": {
"url": "http://host.docker.internal:3001/instagram",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "to",
"value": "={{ $json['username '] }}"
},
{
"name": "message",
"value": "={{ $json.message }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "bd720946-8b7a-45b1-9f99-460c876dd3f1",
"name": "start-viewing-storeies",
"type": "n8n-nodes-base.httpRequest",
"position": [
16,
-1040
],
"parameters": {
"url": "http://host.docker.internal:3001/viewstory",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "status",
"value": "start"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "6eeeeb17-6b55-43da-b548-9d0dfa3c7fa7",
"name": "Código in JavaScript3",
"type": "n8n-nodes-base.code",
"position": [
240,
-1040
],
"parameters": {
"jsCode": "// n8n Function Node code\n\n// Generate random delay between min and max seconds\nfunction randomDelaySeconds(minSec = 0.2, maxSec = 0.5) {\n return Math.floor(Math.random() * (maxSec - minSec + 1) + minSec);\n}\n\n// Example: get current message (from previous node)\nconst messages = items.map(item => item.json.message);\n\n// Output array\nconst output = [];\n\nfor (let i = 0; i < messages.length; i++) {\n output.push({\n json: {\n message: messages[i],\n delaySeconds: randomDelaySeconds(20, 30), // random 20–25 sec delay\n }\n });\n}\n\nreturn output;\n"
},
"typeVersion": 2
},
{
"id": "1be9b1d3-c190-4d40-86e8-4aed3b0cbeb5",
"name": "Esperar5",
"type": "n8n-nodes-base.wait",
"position": [
688,
-1040
],
"webhookId": "7dc4be61-a5f8-4345-b67f-d1ea9366969f",
"parameters": {
"amount": "={{ $('Code in JavaScript3').item.json.delaySeconds }}"
},
"typeVersion": 1.1
},
{
"id": "e06d8545-f63e-4eb2-93bb-63cc14a9cbd8",
"name": "start-viewing-storeies1",
"type": "n8n-nodes-base.httpRequest",
"position": [
912,
-1040
],
"parameters": {
"url": "http://host.docker.internal:3001/viewstory",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "status",
"value": "stop"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "f66656c8-d966-491f-914c-1e165523d87a",
"name": "Código in JavaScript4",
"type": "n8n-nodes-base.code",
"position": [
1136,
-1040
],
"parameters": {
"jsCode": "// n8n Function Node code\n\n// Generate random delay between min and max seconds\nfunction randomDelaySeconds(minSec = 0.2, maxSec = 0.5) {\n return Math.floor(Math.random() * (maxSec - minSec + 1) + minSec);\n}\n\n// Example: get current message (from previous node)\nconst messages = items.map(item => item.json.message);\n\n// Output array\nconst output = [];\n\nfor (let i = 0; i < messages.length; i++) {\n output.push({\n json: {\n message: messages[i],\n delaySeconds: randomDelaySeconds(10, 20), // random 20–25 sec delay\n }\n });\n}\n\nreturn output;\n"
},
"typeVersion": 2
},
{
"id": "133b62ba-976c-4ccb-a9fb-6fb2e17a6161",
"name": "Esperar6",
"type": "n8n-nodes-base.wait",
"position": [
1584,
-672
],
"webhookId": "7dc4be61-a5f8-4345-b67f-d1ea9366969f",
"parameters": {
"amount": "={{ $('Code in JavaScript4').item.json.delaySeconds }}"
},
"typeVersion": 1.1
},
{
"id": "3386ddd7-4762-4882-9294-9cf5a9474cdd",
"name": "Actualizar fila en sheet6",
"type": "n8n-nodes-base.googleSheets",
"position": [
-208,
-1040
],
"parameters": {
"columns": {
"value": {
"Status": "send",
"username ": "={{ $('Loop Over Items3').item.json['username '] }}",
"Time Stamp": "= {{ $now.format('hh:mm a') }} / {{ $now.format('yyyy-MM-dd') }}\n"
},
"schema": [
{
"id": "username ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "username ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Time Stamp",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Time Stamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"username "
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit#gid=0",
"cachedResultName": "leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit?usp=drivesdk",
"cachedResultName": "next-task"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cqlGJZJdttZJP57A",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "451acdd9-036b-4214-95fb-764a9d79ed5b",
"name": "If3",
"type": "n8n-nodes-base.if",
"position": [
-432,
-848
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "54987f58-a3ac-499b-b114-27b2364a6c5e",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.success }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7f3b39ed-41e7-4bc3-8349-2dbc00fc9e00",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
48,
304
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ba487652-ef4d-4d00-8423-e826224ba7aa",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.success }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1e96c3e5-badd-425a-8ef7-86ee6dfd2cb4",
"name": "Detener y error",
"type": "n8n-nodes-base.stopAndError",
"position": [
272,
400
],
"parameters": {
"errorMessage": "Try again login with the account"
},
"typeVersion": 1
},
{
"id": "78cd6011-7119-44a9-9118-c752f77fddb7",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
-800,
-992
],
"parameters": {
"color": 7,
"content": "## Sending Messge to the username from google sheet"
},
"typeVersion": 1
},
{
"id": "d47a8301-3f04-4bba-bbad-5f334f8a3f74",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1600,
-320
],
"parameters": {
"color": 7,
"content": "## Getting the leads information"
},
"typeVersion": 1
},
{
"id": "f1abd827-e986-4147-babb-e037fd7f1584",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1296,
-672
],
"parameters": {
"color": 7,
"content": "## Filtering based onthe send status that is avaliable on google sheet"
},
"typeVersion": 1
},
{
"id": "a7515f90-f95a-4ce5-b46f-b65d28345467",
"name": "Nota adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
-1216
],
"parameters": {
"color": 7,
"content": "## If message is send then updating it on google sheet"
},
"typeVersion": 1
},
{
"id": "2a4d7a4f-d5b2-4289-81a5-66af8b232f8b",
"name": "Nota adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-912
],
"parameters": {
"color": 7,
"content": "## Waiting 15 -20 seconds , before running the story views"
},
"typeVersion": 1
},
{
"id": "1a3d96c8-70a1-4537-9c2e-ba8b7287664f",
"name": "Nota adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-880
],
"parameters": {
"color": 7,
"content": "## Starting the stories views and scroll interactions"
},
"typeVersion": 1
},
{
"id": "2dd2a338-8e0d-48a1-8d4e-0bad64108cf5",
"name": "Nota adhesiva7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1280,
-1104
],
"parameters": {
"color": 7,
"height": 128,
"content": "## Stoping the stories views and scroll interactions"
},
"typeVersion": 1
},
{
"id": "e7cd0cc9-6ad2-4325-8356-63c5d4a08af6",
"name": "Nota adhesiva8",
"type": "n8n-nodes-base.stickyNote",
"position": [
352,
-1264
],
"parameters": {
"color": 7,
"content": "## Waiting 4.5 to 5.5 minutes for this story views and stuff"
},
"typeVersion": 1
},
{
"id": "6fe6d696-984a-4e2e-9ed0-db427d9b13dc",
"name": "Nota adhesiva9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
-768
],
"parameters": {
"color": 7,
"content": "## Waiting for 2 to 3 minutes before sending the next message "
},
"typeVersion": 1
},
{
"id": "f5bdf1cb-d4a0-4629-a274-0496f0abe5bc",
"name": "Nota adhesiva10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2032,
-464
],
"parameters": {
"color": 7,
"content": "## run the below workflow first ,before running this "
},
"typeVersion": 1
},
{
"id": "9b0172e1-6818-4ade-9afa-0e8d75571832",
"name": "If4",
"type": "n8n-nodes-base.if",
"position": [
-208,
-752
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "54987f58-a3ac-499b-b114-27b2364a6c5e",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.requestExceeded }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d05a438a-62ae-4cbd-8037-b2749196bf76",
"name": "Detener y error1",
"type": "n8n-nodes-base.stopAndError",
"position": [
16,
-848
],
"parameters": {
"errorMessage": "={{ $json.error }}"
},
"typeVersion": 1
},
{
"id": "882b350f-c63b-4abb-82d6-589cc3023162",
"name": "Nota adhesiva11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
-688
],
"parameters": {
"color": 7,
"content": "## Checking for the rate limit if exceed , it will stop"
},
"typeVersion": 1
},
{
"id": "41afbdb4-abe3-472c-8fa7-cb53531ab00d",
"name": "Disparador Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-848,
304
],
"webhookId": "3cb5f159-4fc0-426e-8b16-8da1049fa7f1",
"parameters": {
"path": "3cb5f159-4fc0-426e-8b16-8da1049fa7f1",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2.1
},
{
"id": "212a64c7-a5f8-4467-b1c4-70c0d891b490",
"name": "Respond to Disparador Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
720,
208
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "={\n \"success\": {{ $('HTTP Request1').item.json.success }} ,\n \"message\": \"{{ $('HTTP Request1').item.json.message }}\",\n \"user\": \"{{ $('HTTP Request1').item.json.user }}\"\n} "
},
"typeVersion": 1.4
},
{
"id": "484d9c0d-7079-4ecf-ab52-ec73da08b950",
"name": "Disparador Webhook1",
"type": "n8n-nodes-base.webhook",
"position": [
-1776,
-480
],
"webhookId": "cdf1fb17-2208-4676-bc41-70e5fa0a2ecc",
"parameters": {
"path": "cdf1fb17-2208-4676-bc41-70e5fa0a2ecc",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2.1
},
{
"id": "785f23e0-56ce-4fbc-a3c5-432c5265512a",
"name": "Actualizar fila en sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
16,
-656
],
"parameters": {
"columns": {
"value": {
"Status": "=not-send ( Error : {{ $json.error }} ) ",
"username ": "={{ $('Loop Over Items3').item.json['username '] }}",
"Time Stamp": "= {{ $now.format('hh:mm a') }} / {{ $now.format('yyyy-MM-dd') }}\n"
},
"schema": [
{
"id": "username ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "username ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Time Stamp",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Time Stamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"username "
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit#gid=0",
"cachedResultName": "leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ZNX9fypcwyObMT5tXV6U7iQ7lth2xYul-q8diaiohlo/edit?usp=drivesdk",
"cachedResultName": "next-task"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cqlGJZJdttZJP57A",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "7b98d241-28f9-47cf-bf8e-2389aea05984",
"name": "Solicitud HTTP2",
"type": "n8n-nodes-base.httpRequest",
"position": [
464,
-1040
],
"parameters": {
"url": "http://host.docker.internal:3001/logthis",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "message",
"value": "=🧠 Simulating user actions | Delay {{ $json.delaySeconds }}s\n"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "d04dd361-a343-4c42-913b-9e324edca763",
"name": "Solicitud HTTP4",
"type": "n8n-nodes-base.httpRequest",
"position": [
1360,
-1040
],
"parameters": {
"url": "http://host.docker.internal:3001/logthis",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "message",
"value": "=⏳ Waiting {{ $json.delaySeconds }}s before next user\n"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "2ece54c4-6bd2-4b4e-a8d9-0287e323b46e",
"name": "Respond to Disparador Webhook1",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
-656,
-560
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"myField\": \"done man \"\n}"
},
"typeVersion": 1.4
},
{
"id": "fa1d0ba2-6548-4cea-a6dc-0f82c94e4b24",
"name": "Nota adhesiva12",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2544,
-1584
],
"parameters": {
"width": 1040,
"height": 1008,
"content": "### **🤖 Instagram DM Automation Workflow**\n\n---\n\n## **How It Works**\n\nThis workflow automates **Instagram direct messages and engagement tasks** using a **Puppeteer-powered backend**.\nIt connects with **Google Sheets** to fetch leads (Instagram usernames and custom messages) and sends **personalized DMs** automatically — while also simulating real human actions like scrolling, liking posts, and viewing stories.\n\nThe automation helps marketers and creators **nurture leads**, **maintain engagement**, and **save hours of manual effort** by running safe, human-like interactions on Instagram. It also logs all activity and updates your Google Sheets with the latest DM status for transparent tracking.\n\n---\n\n## **Setup Steps**\n\n1. **Google Sheets:** Connect with OAuth2 and add Sheet IDs for `leads` and `acc` tracking.\n2. **Backend Service:** Host a Puppeteer service (Node.js) handling `/login`, `/instagram`, `/viewstory`, and `/logthis`.\n3. **Webhook:** Use your n8n Webhook URL to trigger the workflow manually or through API calls.\n4. **Timing:** Adjust DM or story-view delays in “Code (JavaScript)” nodes for safety.\n5. **Test Run:** Try with 1–2 leads before deployment to confirm messages, logging, and updates.\n\n🕐 **Setup time:** ~10–15 minutes\n💡 Once connected, just trigger the workflow — it’ll do the rest automatically.\n"
},
"typeVersion": 1
},
{
"id": "9a3b41f6-9c3c-44c0-b457-223368b26728",
"name": "Nota adhesiva13",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1440,
288
],
"parameters": {
"color": 7,
"content": "## This isthe Flow of login with an instagram account "
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"7f3b39ed-41e7-4bc3-8349-2dbc00fc9e00": {
"main": [
[
{
"node": "377f7600-363e-4aad-8097-2bb274643682",
"type": "main",
"index": 0
}
],
[
{
"node": "Stop and Error",
"type": "main",
"index": 0
}
]
]
},
"451acdd9-036b-4214-95fb-764a9d79ed5b": {
"main": [
[
{
"node": "3386ddd7-4762-4882-9294-9cf5a9474cdd",
"type": "main",
"index": 0
}
],
[
{
"node": "9b0172e1-6818-4ade-9afa-0e8d75571832",
"type": "main",
"index": 0
}
]
]
},
"9b0172e1-6818-4ade-9afa-0e8d75571832": {
"main": [
[
{
"node": "Stop and Error1",
"type": "main",
"index": 0
}
],
[
{
"node": "785f23e0-56ce-4fbc-a3c5-432c5265512a",
"type": "main",
"index": 0
}
]
]
},
"Wait2": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Wait5": {
"main": [
[
{
"node": "e06d8545-f63e-4eb2-93bb-63cc14a9cbd8",
"type": "main",
"index": 0
}
]
]
},
"Wait6": {
"main": [
[
{
"node": "Loop Over Items3",
"type": "main",
"index": 0
}
]
]
},
"Limit1": {
"main": [
[
{
"node": "Loop Over Items3",
"type": "main",
"index": 0
}
]
]
},
"Filter1": {
"main": [
[
{
"node": "Limit1",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "861616b3-236b-49f0-9386-cec32ff0d253",
"type": "main",
"index": 0
}
]
]
},
"Webhook1": {
"main": [
[
{
"node": "5ec859af-480e-4f23-bae1-9baf9d19061c",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "7f3b39ed-41e7-4bc3-8349-2dbc00fc9e00",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request2": {
"main": [
[
{
"node": "Wait5",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request4": {
"main": [
[
{
"node": "Wait6",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request5": {
"main": [
[
{
"node": "451acdd9-036b-4214-95fb-764a9d79ed5b",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items2": {
"main": [
[],
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items3": {
"main": [
[
{
"node": "Respond to Webhook1",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request5",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript3": {
"main": [
[
{
"node": "HTTP Request2",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript4": {
"main": [
[
{
"node": "HTTP Request4",
"type": "main",
"index": 0
}
]
]
},
"785f23e0-56ce-4fbc-a3c5-432c5265512a": {
"main": [
[
{
"node": "Loop Over Items3",
"type": "main",
"index": 0
}
]
]
},
"861616b3-236b-49f0-9386-cec32ff0d253": {
"main": [
[
{
"node": "Loop Over Items2",
"type": "main",
"index": 0
}
]
]
},
"5ec859af-480e-4f23-bae1-9baf9d19061c": {
"main": [
[
{
"node": "Filter1",
"type": "main",
"index": 0
}
]
]
},
"3386ddd7-4762-4882-9294-9cf5a9474cdd": {
"main": [
[
{
"node": "bd720946-8b7a-45b1-9f99-460c876dd3f1",
"type": "main",
"index": 0
}
]
]
},
"bd720946-8b7a-45b1-9f99-460c876dd3f1": {
"main": [
[
{
"node": "Code in JavaScript3",
"type": "main",
"index": 0
}
]
]
},
"e06d8545-f63e-4eb2-93bb-63cc14a9cbd8": {
"main": [
[
{
"node": "Code in JavaScript4",
"type": "main",
"index": 0
}
]
]
},
"377f7600-363e-4aad-8097-2bb274643682": {
"main": [
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Nutrición de leads
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Nitesh
@niteshdk11AI Automation Consultant & Founder @ Brezix Studio, helping service businesses streamline operations with custom AI assistants, CRMs, and workflow automation. Skilled in MERN, Next.js, and Python, I design solutions that save time and boost efficiency. Open to collaborations and automation projects that drive growth.
Compartir este flujo de trabajo