This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"updatedAt": "2024-11-18T15:35:30.080Z",
"createdAt": "2024-11-18T15:19:22.017Z",
"id": "1NGFBcMYaEVOlBg4",
"name": "FLUXO DISPARO DATA E HORA",
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $('Verificar Whatsapp').item.json[\"exists\"] }}",
"value2": true
}
]
}
},
"id": "50a5380c-5f89-4924-8244-af0cc48d3c99",
"name": "\u00e9 Whatsapp?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
920,
1260
]
},
{
"parameters": {
"content": "## Trocando as API",
"height": 270.57506361323146,
"width": 648.192484762412
},
"id": "60e95e38-b5c4-44b5-be6c-7c4eec8dc060",
"name": "Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
20,
1180
]
},
{
"parameters": {
"content": "## Troca de mensagem aleat\u00f3ria",
"height": 742.8325218454739,
"width": 423.91763812454303
},
"id": "cf9e5c78-8c45-4247-bccb-02130594066d",
"name": "Note1",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1680,
480
]
},
{
"parameters": {
"operation": "limit",
"maxItems": "={{ $node['variaveis'].json[\"limite_de_envio\"] }}"
},
"id": "4cdb6462-4823-4aeb-8dff-99f3f094113f",
"name": "Limitar Quantidade de envio",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 1,
"position": [
-760,
1240
]
},
{
"parameters": {
"values": {
"string": [
{
"name": "planilha_id",
"value": "1U4oFLZbpnyWYTSGWNlakjXtg2lo6QjS-Qyqb5d-OjGM"
},
{
"name": "planilha_aba_telefones",
"value": "403461858"
},
{
"name": "planilha_aba_api",
"value": "78068488"
},
{
"name": "evolution_url",
"value": "https://evowhats.agmktonline.com.br"
},
{
"name": "evolution_api_key",
"value": "A4579C33F56D-4323-973C-8DD58842E59E"
},
{
"name": "evolution_instancia",
"value": "agmktonline"
}
],
"number": [
{
"name": "limite_de_envio",
"value": 1000
},
{
"name": "horario_limite",
"value": 20
},
{
"name": "delay entre mensagens",
"value": 10
},
{
"name": "quantidade de mensagem para delay extra",
"value": 50
},
{
"name": "dura\u00e7\u00e3o do delay extra",
"value": 600
}
]
},
"options": {}
},
"id": "dcce9724-5982-41b1-9252-505dbd3de512",
"name": "variaveis",
"type": "n8n-nodes-base.set",
"typeVersion": 1,
"position": [
-1180,
1240
]
},
{
"parameters": {
"content": "## Altere Aqui",
"height": 229.88892407834777,
"width": 198.84997313450503
},
"id": "4602da6d-9eca-496f-9866-0c16158d8f64",
"name": "Note2",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1220,
1160
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_api\"] }}",
"mode": "id"
},
"options": {
"returnAllMatches": "returnAllMatches"
}
},
"id": "bea3897d-a8ee-4650-a8e1-addd164a8f4f",
"name": "Ler API - Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
80,
1260
]
},
{
"parameters": {
"operation": "sort",
"sortFieldsUi": {
"sortField": [
{
"fieldName": "Envios"
}
]
},
"options": {}
},
"id": "a1063e6d-5cef-4a07-84e0-f5b244cd3648",
"name": "Classificar API com Menos Envio",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 3,
"position": [
300,
1260
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $('Escolher API').item.json[\"API endpoint\"] }}/chat/whatsappNumbers/{{ $('Escolher API').item.json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $('Escolher API').item.json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"numbers\": [\n \"{{ $node['Repetir'].json[\"Telefone\"] }}\"\n ]\n}",
"options": {}
},
"id": "5c54aa01-8820-40e3-92c7-563112add35b",
"name": "Verificar Whatsapp",
"type": "n8n-nodes-base.httpRequest",
"position": [
760,
1260
],
"typeVersion": 3
},
{
"parameters": {
"operation": "update",
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_telefones\"] }}",
"mode": "id"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Status": "={{ $node['Verificar Whatsapp'].json[\"exists\"] == false ? 'N\u00daMERO INV\u00c1LIDO' : $json[\"statusCode\"] == '201' ? 'ENVIADO' : 'ERRO' }}",
"row_number": "={{ $node['Repetir'].json[\"row_number\"] }}",
"API": "={{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"Data do envio": "={{new Date().toLocaleDateString(\"pt-BR\", {timeZone: 'America/Sao_Paulo', hour12: false, hour: '2-digit', year: 'numeric', month: '2-digit', day: '2-digit', minute:'2-digit', second: '2-digit'}).replace(',','')}}"
},
"matchingColumns": [
"row_number"
],
"schema": [
{
"id": "Nome",
"displayName": "Nome",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Telefone",
"displayName": "Telefone",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "API",
"displayName": "API",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Data do envio",
"displayName": "Data do envio",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Status",
"displayName": "Status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "row_number",
"displayName": "row_number",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"readOnly": true,
"removed": false
}
]
},
"options": {}
},
"id": "ad178325-7851-43cb-b45f-75a70b6534c0",
"name": "Atualizar planilha com envio",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
1860,
1420
]
},
{
"parameters": {
"content": "## Verificando Whatsapp",
"height": 270.57506361323146,
"width": 362.585508018226
},
"id": "dacee4ef-7430-47a1-b27b-4793e16e2482",
"name": "Note3",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
720,
1180
]
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_api\"] }}",
"mode": "id"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Inst\u00e2ncia": "={{ $('Classificar API com Menos Envio').item.json[\"Inst\u00e2ncia\"] }}",
"Envios": "={{ parseInt($('Classificar API com Menos Envio').item.json[\"Envios\"]) +1 }}",
"API endpoint": "={{ $('Classificar API com Menos Envio').item.json[\"API endpoint\"] }}",
"API Key": "={{ $('Classificar API com Menos Envio').item.json[\"API Key\"] }}"
},
"matchingColumns": [
"Inst\u00e2ncia"
],
"schema": [
{
"id": "API endpoint",
"displayName": "API endpoint",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Inst\u00e2ncia",
"displayName": "Inst\u00e2ncia",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "API Key",
"displayName": "API Key",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Envios",
"displayName": "Envios",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
}
]
},
"options": {}
},
"id": "b4a6f5b9-440e-4362-b8f9-22c9bef9a845",
"name": "Escolher API",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
520,
1260
],
"executeOnce": true
},
{
"parameters": {
"content": "## Tutorial\n1 - Duplique a [planilha](https://docs.google.com/spreadsheets/d/1B1zIE1FkAmL75hBz1Ssxa3BJcuysohgK8ByyWurX-U0/edit#gid=0) , clicando em **Arquivos** - **Fazer uma c\u00f3pia**\n2 - Preencha corretamente a planilha\n3 - Preencha corretamente o node variaveis\n4 - Personalize as mensagens\n5 - Antes do disparo, sempre fa\u00e7a testes\n\n\n**N\u00c3O FA\u00c7A SPAM**, isso \u00e9 chato \ud83d\ude2a\n**N\u00c3O USE SEU CHIP PRINCIPAL**, voc\u00ea sempre corre risco de ser banido \u2620\ufe0f",
"height": 230.27124646324384,
"width": 507.0557841674701,
"color": 4
},
"id": "5590c5e8-ae33-496b-a913-916b395ba986",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1380,
780
]
},
{
"parameters": {
"amount": "={{ (parseInt($node['Repetir'].context[\"currentRunIndex\"]) + 1) % $node['variaveis'].json[\"quantidade de mensagem para delay extra\"] == 0 ? $node['variaveis'].json[\"dura\u00e7\u00e3o do delay extra\"] : $node['variaveis'].json[\"delay entre mensagens\"] }}",
"unit": "seconds"
},
"id": "90c34648-39b3-41d1-b2e7-c408a28229bf",
"name": "Aguarde o Intervalo",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
1860,
1680
]
},
{
"parameters": {
"operation": "update",
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_telefones\"] }}",
"mode": "id"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"row_number": "={{ $('Repetir').item.json[\"row_number\"] }}",
"Status": "ENVIANDO"
},
"matchingColumns": [
"row_number"
],
"schema": [
{
"id": "Nome",
"displayName": "Nome",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Telefone",
"displayName": "Telefone",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "API",
"displayName": "API",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Data do envio",
"displayName": "Data do envio",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Status",
"displayName": "Status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "row_number",
"displayName": "row_number",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"readOnly": true,
"removed": false
}
]
},
"options": {}
},
"id": "8d8adc16-4aab-4c02-ac0a-30910405c158",
"name": "Atualizar status enviando",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
-120,
1260
]
},
{
"parameters": {
"path": "disparador-whatsapp",
"options": {}
},
"id": "bbcd7c0c-7041-4f15-b5db-1465605ce133",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
-1380,
1420
],
"disabled": true
},
{
"parameters": {
"value1": "={{parseInt(Math.random()*4)}}",
"rules": {
"rules": [
{
"operation": "equal"
},
{
"operation": "equal",
"value2": 1,
"output": 1
},
{
"operation": "equal",
"value2": 2,
"output": 2
},
{
"operation": "equal",
"value2": 3,
"output": 3
}
]
}
},
"id": "6cdf2476-2b02-492a-a629-77f11db400b9",
"name": "Randomizar Mensagem",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
720,
400
]
},
{
"parameters": {
"options": {}
},
"id": "6f8d6227-7adb-4bf4-944c-ecb84e49d426",
"name": "Repetir",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
-560,
1240
]
},
{
"parameters": {},
"id": "9f107ca4-fdb5-460a-b6ea-11d3271c8654",
"name": "Conclu\u00eddo",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
-160,
1020
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "textMessage.text",
"value": "=Ol\u00e1 {{ $node['Repetir'].json.Nome }}\n"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "920b7e93-a45b-4db5-a1e0-8a2f4189dc0e",
"name": "Op\u00e7\u00e3o de Mensagem 1",
"type": "n8n-nodes-base.httpRequest",
"position": [
1820,
580
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "textMessage.text",
"value": "=Como vai {{ $node['Repetir'].json.Nome }}?"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "6913aebf-5493-476d-9de9-1e1771168b96",
"name": "Op\u00e7\u00e3o de Mensagem 2",
"type": "n8n-nodes-base.httpRequest",
"position": [
1820,
740
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "textMessage.text",
"value": "=Eai {{ $node['Repetir'].json.Nome }}"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "0de8dfa0-9be0-45d6-a2de-720887810d1a",
"name": "Op\u00e7\u00e3o de Mensagem 4",
"type": "n8n-nodes-base.httpRequest",
"position": [
1820,
1060
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {},
"id": "6258d0bb-a433-4eca-b385-0022f7ad1ad7",
"name": "Executar",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-1380,
1240
]
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"id": "2e2267f1-e2f1-4157-8091-9a3e5e2da012",
"name": "Temporizador",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.1,
"position": [
-1380,
1060
],
"disabled": true
},
{
"parameters": {
"conditions": {
"number": [
{
"value1": "={{$now.hour}}",
"operation": "largerEqual",
"value2": "={{ $node['variaveis'].json.horario_limite }}"
}
]
}
},
"id": "df1544bf-b348-4ce9-95ce-49a7b4113e25",
"name": "Passou do hor\u00e1rio de envio?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
-340,
1240
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['variaveis'].json[\"evolution_url\"] }}/message/sendText/{{ $node['variaveis'].json[\"evolution_instancia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['variaveis'].json[\"evolution_api_key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['variaveis'].json[\"whatsapp_numero\"] }}"
},
{
"name": "textMessage.text",
"value": "={{ $node['variaveis'].json[\"mensagem_de_texto\"] }}"
},
{
"name": "options.presence",
"value": "composing"
},
{
"name": "options.delay",
"value": "={{ (Math.floor(Math.random() * (6 - 3 + 1)) + 3 ) * 1000}}"
}
]
},
"options": {}
},
"name": "Enviar Mensagem de Texto",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1100,
400
],
"id": "fca8f73b-0281-4705-8cd2-14d760b7a3e2"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_telefones\"] }}",
"mode": "id"
},
"filtersUI": {
"values": [
{
"lookupColumn": "Mensagem",
"lookupValue": "={{ $('Ler telefones').item.json.Mensagem }}"
}
]
},
"options": {
"returnAllMatches": "returnAllMatches"
}
},
"id": "03f21466-afb8-4185-8885-f438e8350251",
"name": "Ler Mensagem",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
260,
560
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_telefones\"] }}",
"mode": "id"
},
"filtersUI": {
"values": [
{
"lookupColumn": "=Status"
}
]
},
"options": {
"returnAllMatches": "returnAllMatches"
}
},
"id": "1b1c72fb-3816-4690-90ba-694d43656c70",
"name": "Ler telefones",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
-960,
1240
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_id\"] }}",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "={{ $node['variaveis'].json[\"planilha_aba_telefones\"] }}",
"mode": "id"
},
"filtersUI": {
"values": [
{
"lookupColumn": "Mensagem",
"lookupValue": "{{ $node('Ler telefones').item.json.Mensagem }}"
}
]
},
"options": {
"returnAllMatches": "returnAllMatches"
}
},
"id": "c860ced1-9e40-4614-bc4f-54a991fb9f97",
"name": "Ver Mensagem",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4,
"position": [
660,
660
]
},
{
"parameters": {
"method": "POST",
"url": "=https://evowhats.agmktonline.com.br/message/sendText/agmktonline",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "=A4579C33F56D-4323-973C-8DD58842E59E"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "text",
"value": "=Temos reuni\u00e3o {{ $node('Ver Mensagem').item.json.Mensagem }}"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "a566807d-5132-4ed2-bca2-c22300ab6331",
"name": "Envio da Mensagem",
"type": "n8n-nodes-base.httpRequest",
"position": [
1060,
660
],
"typeVersion": 4.1,
"disabled": true,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "text",
"value": "=Ol\u00e1 {{ $node['Repetir'].json.Mensagem }}"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "b4b2ddf8-0386-4c91-b265-625073ea3987",
"name": "Op\u00e7\u00e3o de Mensagem ",
"type": "n8n-nodes-base.httpRequest",
"position": [
860,
660
],
"typeVersion": 4.1,
"disabled": true,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "textMessage.text",
"value": "=Oi {{ $node['Repetir'].json.Nome }}"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "c673aa8a-9e3a-4ca2-aea7-a68d1ae0499e",
"name": "Op\u00e7\u00e3o de Mensagem 3",
"type": "n8n-nodes-base.httpRequest",
"position": [
1820,
900
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "text",
"value": "=Ol\u00e1 bom dia {{ $node['Repetir'].json.Nome }} {{ $node['Repetir'].json.Mensagem }}"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "ada73e53-5362-4d9c-9f01-92753d1ce1f2",
"name": "Mensagem B Dia",
"type": "n8n-nodes-base.httpRequest",
"position": [
1400,
1280
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "text",
"value": "=Ol\u00e1 boa tarde {{ $node['Repetir'].json.Nome }} {{ $node['Repetir'].json.Mensagem }}"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "6a0153c5-94e3-4612-9761-faf2ff2d3040",
"name": "Mensagem B Tarde",
"type": "n8n-nodes-base.httpRequest",
"position": [
1400,
1420
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "text",
"value": "=Ol\u00e1 boa noite {{ $node['Repetir'].json.Nome }} {{ $node['Repetir'].json.Mensagem }}"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "76587b6a-daeb-4311-846b-57ea2a8d58d8",
"name": "Mensagem B Noite",
"type": "n8n-nodes-base.httpRequest",
"position": [
1400,
1560
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"value1": "={{ $now.hour }}",
"rules": {
"rules": [
{
"operation": "equal",
"value2": "={{$now.hour >= 12}}",
"output": 1
},
{
"operation": "equal",
"value2": "={{ $now.hour >= 12 && $now.hour < 18 }}",
"output": 2
},
{
"operation": "equal",
"value2": "={{ $now.hour >= 18 && $now.hour <= 23 }}",
"output": 3
}
]
}
},
"id": "62a73ae9-d73f-4467-937d-2e9e82b5b894",
"name": "Randomizar Mensagem1",
"type": "n8n-nodes-base.switch",
"typeVersion": 1,
"position": [
520,
280
]
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"leftValue": "{{parseInt(Math.random()*3)}}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "1"
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 1
},
"conditions": [
{
"id": "370ca223-681d-458f-9253-83dc06a92d24",
"leftValue": "",
"rightValue": "",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
}
}
]
},
"options": {}
},
"id": "283784d3-f323-4a25-9178-e708d5e8ceeb",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
520,
460
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $node['Escolher API'].json[\"API endpoint\"] }}/message/sendText/{{ $node['Escolher API'].json[\"Inst\u00e2ncia\"] }}",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "apikey",
"value": "={{ $node['Escolher API'].json[\"API Key\"] }}"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "number",
"value": "={{ $node['Verificar Whatsapp'].json[\"jid\"] }}"
},
{
"name": "text",
"value": "=Ol\u00e1 {{ $node['Repetir'].json.Nome }} {{ $node['Repetir'].json.Mensagem }}"
},
{
"name": "options.presence",
"value": "composing"
}
]
},
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"id": "013e9ca2-a5f8-4ffd-990f-ceaf272225b7",
"name": "Mensagem \\Ol\u00e1",
"type": "n8n-nodes-base.httpRequest",
"position": [
1400,
1140
],
"typeVersion": 4.1,
"onError": "continueRegularOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "4c2b6a5e-db2f-43ea-a8cf-dfffecb9f430",
"leftValue": "={{$now.hour}}",
"rightValue": 0,
"operator": {
"type": "number",
"operation": "gte"
}
},
{
"id": "a17bea23-2448-4235-8c0f-4477262f92ab",
"leftValue": "={{$now.hour}}",
"rightValue": 12,
"operator": {
"type": "number",
"operation": "lt"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "c3d9e979-b972-4f4e-9221-621615400567",
"name": "If",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1140,
1080
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "4c2b6a5e-db2f-43ea-a8cf-dfffecb9f430",
"leftValue": "={{$now.hour}}",
"rightValue": 12,
"operator": {
"type": "number",
"operation": "gte"
}
},
{
"id": "a17bea23-2448-4235-8c0f-4477262f92ab",
"leftValue": "={{$now.hour}}",
"rightValue": 18,
"operator": {
"type": "number",
"operation": "lt"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "d1e5c939-c4fe-4e8b-b41a-33f1c80951a0",
"name": "If1",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1140,
1340
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "4c2b6a5e-db2f-43ea-a8cf-dfffecb9f430",
"leftValue": "={{$now.hour}}",
"rightValue": 18,
"operator": {
"type": "number",
"operation": "gte"
}
},
{
"id": "a17bea23-2448-4235-8c0f-4477262f92ab",
"leftValue": "={{$now.hour}}",
"rightValue": 23,
"operator": {
"type": "number",
"operation": "lt"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "5fb52548-4bfe-433c-ad18-341e3e0efbcb",
"name": "If2",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
1140,
1580
]
},
{
"parameters": {
"jsCode": "// Obt\u00e9m a data atual\nlet dataAtual = new Date();\n\n// Define os nomes dos dias e meses\nconst diasDaSemana = [\"domingo\", \"segunda-feira\", \"ter\u00e7a-feira\", \"quarta-feira\", \"quinta-feira\", \"sexta-feira\", \"s\u00e1bado\"];\nconst mesesDoAno = [\"janeiro\", \"fevereiro\", \"mar\u00e7o\", \"abril\", \"maio\", \"junho\", \"julho\", \"agosto\", \"setembro\", \"outubro\", \"novembro\", \"dezembro\"];\n\n// Extrai dia, m\u00eas e ano\nlet diaSemana = diasDaSemana[dataAtual.getDay()];\nlet dia = String(dataAtual.getDate()).padStart(2, '0');\nlet mes = String(dataAtual.getMonth() + 1).padStart(2, '0');\nlet ano = dataAtual.getFullYear();\n\n// Formata a data no formato desejado\nlet dataFormatada = `${dia}/${mes}/${ano}`;\n\n// Retorna o resultado\nreturn {\n json: {\n dataFormatada: dataFormatada\n }\n};\n"
},
"id": "093a808f-0a09-4ca6-ae7e-5826c2b8ef34",
"name": "DATA DIA ATUAL",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-1120,
2420
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1y06HLLb4Qf1fhKJSt53BTANc3AOSBoVpzNyT7HIWj2o",
"mode": "list",
"cachedResultName": "FLUXO DIA DA SEMANA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1y06HLLb4Qf1fhKJSt53BTANc3AOSBoVpzNyT7HIWj2o/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "P\u00e1gina1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1y06HLLb4Qf1fhKJSt53BTANc3AOSBoVpzNyT7HIWj2o/edit#gid=0"
},
"options": {}
},
"id": "c6ea6cf8-ad96-4a0b-ac46-dedb3ec33850",
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
-1120,
2240
],
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "// Obt\u00e9m a data e hora atual no fuso hor\u00e1rio de S\u00e3o Paulo\nconst now = new Date().toLocaleString(\"pt-BR\", {\n timeZone: \"America/Sao_Paulo\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: false\n});\n\n// Retorna o hor\u00e1rio formatado como HH:MM\nreturn {\n json: {\n time: now\n }\n};\n"
},
"id": "ab113ef6-7b1f-4010-88e3-9180175570aa",
"name": "HORA ATUAL",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-1120,
2600
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "6a442707-3357-4bac-a481-a59ff9f13a13",
"leftValue": "={{ $('Google Sheets').item.json.DATA }}",
"rightValue": "={{ $json.dataFormatada }}",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "11b9044c-797c-45cd-8b2b-caf13bc44a71",
"name": "VALIDA DATA",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-920,
2420
]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "50a1c35c-5f9b-41e4-8015-592f8687f5cf",
"leftValue": "={{ $json.time }}",
"rightValue": "={{ $('Google Sheets').item.json.HORA }}",
"operator": {
"type": "dateTime",
"operation": "afterOrEquals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "6055fad0-0a0a-4cce-850e-00278a550b12",
"name": "VALIDA HORA",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-900,
2600
]
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "minutes"
}
]
}
},
"id": "ac257856-dd5e-4df5-a314-c9061e225078",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
-1320,
2240
]
},
{
"parameters": {
"content": "## VALIDA\u00c7\u00c3O DE DATA E HORA\n**ESTA CONFIGURADO PARA ENVIAR QUANDO A DATA FOR IGUAL E A HORA IGUAL OU AP\u00d3S (QUANDO SE TEM MUITA MSG)",
"height": 682.2238209925288,
"width": 951.4353503376481
},
"id": "d77cc982-9243-4689-97c9-65c9e6f9925d",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1620,
2140
]
}
],
"connections": {
"\u00e9 Whatsapp?": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
],
[
{
"node": "Atualizar planilha com envio",
"type": "main",
"index": 0
}
]
]
},
"variaveis": {
"main": [
[
{
"node": "Ler telefones",
"type": "main",
"index": 0
}
]
]
},
"Ler API - Google Sheets": {
"main": [
[
{
"node": "Classificar API com Menos Envio",
"type": "main",
"index": 0
}
]
]
},
"Classificar API com Menos Envio": {
"main": [
[
{
"node": "Escolher API",
"type": "main",
"index": 0
}
]
]
},
"Verificar Whatsapp": {
"main": [
[
{
"node": "\u00e9 Whatsapp?",
"type": "main",
"index": 0
}
]
]
},
"Atualizar planilha com envio": {
"main": [
[
{
"node": "Aguarde o Intervalo",
"type": "main",
"index": 0
}
]
]
},
"Escolher API": {
"main": [
[
{
"node": "Verificar Whatsapp",
"type": "main",
"index": 0
}
]
]
},
"Atualizar status enviando": {
"main": [
[
{
"node": "Ler API - Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Randomizar Mensagem": {
"main": [
[],
[
{
"node": "Enviar Mensagem de Texto",
"type": "main",
"index": 0
}
]
]
},
"Repetir": {
"main": [
[
{
"node": "Conclu\u00eddo",
"type": "main",
"index": 0
}
],
[
{
"node": "Passou do hor\u00e1rio de envio?",
"type": "main",
"index": 0
}
]
]
},
"Limitar Quantidade de envio": {
"main": [
[
{
"node": "Repetir",
"type": "main",
"index": 0
}
]
]
},
"Executar": {
"main": [
[
{
"node": "variaveis",
"type": "main",
"index": 0
}
]
]
},
"Aguarde o Intervalo": {
"main": [
[
{
"node": "Repetir",
"type": "main",
"index": 0
}
]
]
},
"Passou do hor\u00e1rio de envio?": {
"main": [
[
{
"node": "Conclu\u00eddo",
"type": "main",
"index": 0
}
],
[
{
"node": "Atualizar status enviando",
"type": "main",
"index": 0
}
]
]
},
"Ler telefones": {
"main": [
[
{
"node": "Limitar Quantidade de envio",
"type": "main",
"index": 0
}
]
]
},
"Mensagem B Dia": {
"main": [
[
{
"node": "Atualizar planilha com envio",
"type": "main",
"index": 0
}
]
]
},
"Mensagem B Tarde": {
"main": [
[
{
"node": "Atualizar planilha com envio",
"type": "main",
"index": 0
}
]
]
},
"Mensagem B Noite": {
"main": [
[
{
"node": "Atualizar planilha com envio",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Mensagem B Dia",
"type": "main",
"index": 0
}
],
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Mensagem B Tarde",
"type": "main",
"index": 0
}
],
[
{
"node": "If2",
"type": "main",
"index": 0
}
]
]
},
"If2": {
"main": [
[
{
"node": "Mensagem B Noite",
"type": "main",
"index": 0
}
]
]
},
"DATA DIA ATUAL": {
"main": [
[
{
"node": "VALIDA DATA",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets": {
"main": [
[
{
"node": "DATA DIA ATUAL",
"type": "main",
"index": 0
}
]
]
},
"HORA ATUAL": {
"main": [
[
{
"node": "VALIDA HORA",
"type": "main",
"index": 0
}
]
]
},
"VALIDA DATA": {
"main": [
[
{
"node": "HORA ATUAL",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": null,
"versionId": "266547d0-270c-4f3f-aee5-052b908107ba",
"activeVersionId": null,
"triggerCount": 0,
"shared": [
{
"updatedAt": "2024-11-18T15:19:22.017Z",
"createdAt": "2024-11-18T15:19:22.017Z",
"role": "workflow:owner",
"workflowId": "1NGFBcMYaEVOlBg4",
"projectId": "86fLtGJ4RKYxddia"
}
],
"activeVersion": null,
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
FLUXO DISPARO DATA E HORA. Uses itemLists, googleSheets, httpRequest. Webhook trigger; 48 nodes.
Source: https://github.com/woakes070048/N8N_2025/blob/95a39dbe988cf5a13eb6234468a54d8639792685/fluxo-disparo-data-e-hora-1NGFBcMYaEVOlBg4.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
TrackCollect_deeper. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 80 nodes.
PCN. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 60 nodes.
[SANTOBET] FLUXO TODO - BACKUP. Uses googleSheets, httpRequest, googleSheetsTrigger. Webhook trigger; 57 nodes.
This workflow allows you to accept online payments via YooKassa and log both orders and transactions in Google Sheets — all without writing a single line of code. It supports full payment flow: produc
Transform your n8n instance management with this advanced automation system featuring artificial intelligence-driven workflow selection. This template provides comprehensive maintenance operations wit