ControlC
· Pastebin
Login
Register
ControlC
/
Create paste
Paste content
Up to 100 KB of text. BBCode formatting is supported.
Title
- optional
Content
B
I
U
S
</>
Colors ↓
Sizes ↓
Size 1
Size 2
Size 3
Size 4
Size 5
Size 6
Size 7
{\r\n \"meta\": {\r\n \"instanceId\": \"7350ad64699d4a716bb17e2ac4a1abdc5dd751423501ba26d218b248995d24d7\"\r\n },\r\n \"nodes\": [\r\n {\r\n \"parameters\": {},\r\n \"id\": \"a91519bb-c58f-4dda-a056-84a9768ff149\",\r\n \"name\": \"Start\",\r\n \"type\": \"n8n-nodes-base.start\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 220,\r\n 980\r\n ]\r\n },\r\n {\r\n \"parameters\": {\r\n \"sheetId\": \"1K3Due-xPhv0s6_k7mv7FFKM79gyR3tTwtAVu0hK95y8\",\r\n \"options\": {}\r\n },\r\n \"id\": \"a3fe0f38-5564-4dc3-b1ff-bd7afea8559e\",\r\n \"name\": \"Google Sheets1\",\r\n \"type\": \"n8n-nodes-base.googleSheets\",\r\n \"typeVersion\": 2,\r\n \"position\": [\r\n 480,\r\n 980\r\n ],\r\n \"credentials\": {\r\n \"googleSheetsOAuth2Api\": {\r\n \"id\": \"2\",\r\n \"name\": \"Jean - BotConversa\"\r\n }\r\n }\r\n },\r\n {\r\n \"parameters\": {\r\n \"batchSize\": 1,\r\n \"options\": {}\r\n },\r\n \"id\": \"c4432761-a670-4d73-a8ea-ef1b3bdc4a43\",\r\n \"name\": \"SplitInBatches1\",\r\n \"type\": \"n8n-nodes-base.splitInBatches\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 760,\r\n 980\r\n ]\r\n },\r\n {\r\n \"parameters\": {\r\n \"values\": {\r\n \"string\": [\r\n {\r\n \"name\": \"Data atual\",\r\n \"value\": \"={{$now}}\"\r\n },\r\n {\r\n \"name\": \"Data aniversário\",\r\n \"value\": \"={{ $json[\\"Data nascimento\\"] }}\"\r\n }\r\n ]\r\n },\r\n \"options\": {}\r\n },\r\n \"id\": \"6d602d60-3cea-44a6-aba4-bc9dd7a19f93\",\r\n \"name\": \"Datas\",\r\n \"type\": \"n8n-nodes-base.set\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 980,\r\n 980\r\n ]\r\n },\r\n {\r\n \"parameters\": {\r\n \"conditions\": {\r\n \"string\": [\r\n {\r\n \"value1\": \"={{ $json[\\"Data atual\\"].split('T')[0].split('-').reverse().join('/').slice(0,5)}}\",\r\n \"value2\": \"={{ $json[\\"Data aniversário\\"].slice(0,5)}}\"\r\n }\r\n ]\r\n }\r\n },\r\n \"id\": \"73fad30f-15fb-48c9-a511-678926a37fca\",\r\n \"name\": \"IF1\",\r\n \"type\": \"n8n-nodes-base.if\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 1200,\r\n 980\r\n ]\r\n },\r\n {\r\n \"parameters\": {},\r\n \"id\": \"d9d19882-caa9-46ec-825a-40792d975ea0\",\r\n \"name\": \"Falso\",\r\n \"type\": \"n8n-nodes-base.noOp\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 1440,\r\n 1120\r\n ]\r\n },\r\n {\r\n \"parameters\": {},\r\n \"id\": \"4d6146a1-5781-473b-8124-88b7cfae60fe\",\r\n \"name\": \"Verdadeiro\",\r\n \"type\": \"n8n-nodes-base.noOp\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 1360,\r\n 720\r\n ]\r\n },\r\n {\r\n \"parameters\": {\r\n \"functionCode\": \"var telefone = items[0].json.telefone.replace(' ','').replace('(','').replace(')','').replace(' ','').replace(' ','').replace('-','').replace(' ','');\nvar ddd = telefone.slice(2,4);\nvar ddi = telefone.charAt(0);\nvar ddx = telefone.slice(0,2);\nvar length = telefone.length;\nif (length >= 12){\n if (ddi == '+'){\n ddi = telefone.slice(0,3);\n telefone = parseInt(telefone.slice(3)).toString();\n } else {\n if (ddx == '55'){\n telefone = parseInt(telefone.slice(2)).toString();\n ddi = \\"+55\\";\n } else {\n telefone = parseInt(telefone).toString();\n ddi = 'não informado';\n }\n }\n} else {\n telefone = parseInt(telefone).toString();\n ddi = 'não informado';\n}\n\nddd = telefone.slice(0,2);\ntelefone = telefone.slice(2);\nif (ddd > 28){\n telefone = telefone.slice(-8);\n} else {\n telefone = '9'+telefone.slice(-8);\n}\nvar whatsapp_formatado = '+55'+ddd+telefone;\n\nreturn [\n {\n json: {\n ddi,\n ddd,\n telefone,\n whatsapp_formatado, \n }\n }\n];\"\r\n },\r\n \"name\": \"Validar Telefone\",\r\n \"type\": \"n8n-nodes-base.function\",\r\n \"position\": [\r\n 1780,\r\n 720\r\n ],\r\n \"typeVersion\": 1,\r\n \"id\": \"ecb2d4ae-aa38-42ce-8fc3-46ddfc859c84\"\r\n },\r\n {\r\n \"parameters\": {\r\n \"values\": {\r\n \"string\": [\r\n {\r\n \"name\": \"telefone\",\r\n \"value\": \"=+{{ $node[\\"SplitInBatches1\\"].json[\\"Telefone\\"].toString()}}\"\r\n }\r\n ]\r\n },\r\n \"options\": {}\r\n },\r\n \"id\": \"41a4d15f-16a9-4280-9bd4-3ee179eb53ca\",\r\n \"name\": \"Telefone\",\r\n \"type\": \"n8n-nodes-base.set\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 1580,\r\n 720\r\n ]\r\n },\r\n {\r\n \"parameters\": {\r\n \"authentication\": \"genericCredentialType\",\r\n \"genericAuthType\": \"httpHeaderAuth\",\r\n \"requestMethod\": \"POST\",\r\n \"url\": \"=https://backend.botconversa.com.br/api/v1/webhook/subscriber/\",\r\n \"options\": {},\r\n \"bodyParametersUi\": {\r\n \"parameter\": [\r\n {\r\n \"name\": \"phone\",\r\n \"value\": \"={{ $json[\\"whatsapp_formatado\\"] }}\"\r\n },\r\n {\r\n \"name\": \"first_name\",\r\n \"value\": \"={{ $node[\\"SplitInBatches1\\"].json[\\"Nome\\"].split(' ')[0]}}\"\r\n },\r\n {\r\n \"name\": \"last_name\",\r\n \"value\": \"={{ $node[\\"SplitInBatches1\\"].json[\\"Nome\\"].split(' ')[1]}} {{ $node[\\"SplitInBatches1\\"].json[\\"Nome\\"].split(' ')[2]}} {{ $node[\\"SplitInBatches1\\"].json[\\"Nome\\"].split(' ')[3]}}\"\r\n }\r\n ]\r\n }\r\n },\r\n \"id\": \"64feb937-57e7-45f1-8876-5b5204e5c3dc\",\r\n \"name\": \"Cadastrar na audiência\",\r\n \"type\": \"n8n-nodes-base.httpRequest\",\r\n \"typeVersion\": 2,\r\n \"position\": [\r\n 2000,\r\n 720\r\n ],\r\n \"credentials\": {\r\n \"httpHeaderAuth\": {\r\n \"id\": \"29\",\r\n \"name\": \"Chave API AULA AVANCADA\"\r\n }\r\n },\r\n \"continueOnFail\": true\r\n },\r\n {\r\n \"parameters\": {\r\n \"authentication\": \"genericCredentialType\",\r\n \"genericAuthType\": \"httpHeaderAuth\",\r\n \"url\": \"=https://backend.botconversa.com.br/api/v1/webhook/subscriber/{{$node[\\"Validar Telefone\\"].json[\\"whatsapp_formatado\\"]}}/\",\r\n \"options\": {}\r\n },\r\n \"id\": \"e29cd653-f228-4753-b8b9-bfae00c248a1\",\r\n \"name\": \"Buscar ID audiência\",\r\n \"type\": \"n8n-nodes-base.httpRequest\",\r\n \"typeVersion\": 2,\r\n \"position\": [\r\n 2240,\r\n 720\r\n ],\r\n \"credentials\": {\r\n \"httpHeaderAuth\": {\r\n \"id\": \"29\",\r\n \"name\": \"Chave API AULA AVANCADA\"\r\n }\r\n },\r\n \"continueOnFail\": true\r\n },\r\n {\r\n \"parameters\": {\r\n \"authentication\": \"genericCredentialType\",\r\n \"genericAuthType\": \"httpHeaderAuth\",\r\n \"requestMethod\": \"POST\",\r\n \"url\": \"=https://backend.botconversa.com.br/api/v1/webhook/subscriber/{{$node[\\"Buscar ID audiência\\"].json[\\"id\\"]}}/send_flow/\",\r\n \"options\": {},\r\n \"bodyParametersUi\": {\r\n \"parameter\": [\r\n {\r\n \"name\": \"flow\",\r\n \"value\": \"513439\"\r\n }\r\n ]\r\n }\r\n },\r\n \"id\": \"fa966ac6-6b2d-490c-a156-73e645d23f2c\",\r\n \"name\": \"Enviar fluxo\",\r\n \"type\": \"n8n-nodes-base.httpRequest\",\r\n \"typeVersion\": 2,\r\n \"position\": [\r\n 2460,\r\n 720\r\n ],\r\n \"credentials\": {\r\n \"httpHeaderAuth\": {\r\n \"id\": \"29\",\r\n \"name\": \"Chave API AULA AVANCADA\"\r\n }\r\n },\r\n \"continueOnFail\": true\r\n },\r\n {\r\n \"parameters\": {\r\n \"amount\": 10,\r\n \"unit\": \"seconds\"\r\n },\r\n \"id\": \"c6d61939-b019-4e79-9709-faea653358c6\",\r\n \"name\": \"Wait\",\r\n \"type\": \"n8n-nodes-base.wait\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 2680,\r\n 720\r\n ],\r\n \"webhookId\": \"e35786b3-63cf-41d5-a5c4-ba631345ad81\"\r\n },\r\n {\r\n \"parameters\": {\r\n \"triggerTimes\": {\r\n \"item\": [\r\n {\r\n \"hour\": 8\r\n }\r\n ]\r\n }\r\n },\r\n \"id\": \"ebb80a39-c028-48b8-b2a7-a947fd816317\",\r\n \"name\": \"Cron\",\r\n \"type\": \"n8n-nodes-base.cron\",\r\n \"typeVersion\": 1,\r\n \"position\": [\r\n 220,\r\n 1160\r\n ]\r\n }\r\n ],\r\n \"connections\": {\r\n \"Start\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Google Sheets1\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Google Sheets1\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"SplitInBatches1\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"SplitInBatches1\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Datas\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Datas\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"IF1\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"IF1\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Verdadeiro\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ],\r\n [\r\n {\r\n \"node\": \"Falso\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Falso\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"SplitInBatches1\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Verdadeiro\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Telefone\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Validar Telefone\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Cadastrar na audiência\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Telefone\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Validar Telefone\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Cadastrar na audiência\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Buscar ID audiência\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Buscar ID audiência\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Enviar fluxo\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Enviar fluxo\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Wait\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Wait\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"SplitInBatches1\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n },\r\n \"Cron\": {\r\n \"main\": [\r\n [\r\n {\r\n \"node\": \"Google Sheets1\",\r\n \"type\": \"main\",\r\n \"index\": 0\r\n }\r\n ]\r\n ]\r\n }\r\n }\r\n}
Password
Anyone with the link will still need this password to view.
Self Destruct
5 minutes
1 hour
3 hours
6 hours
12 hours
24 hours
48 hours
72 hours
Sign in to enable "Never expires".
Create paste
Please verify you are human
Cancel