Buscar

Modelo_LP

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

{
 "name": "Modelo Lançamento Perpétuo",
 "nodes": [
 {
 "parameters": {},
 "name": "Start",
 "type": "n8n-nodes-base.start",
 "typeVersion": 1,
 "position": [
 240,
 320
 ]
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"body\"][\"entry\"][0][\"id\"]}}",
 "operation": "isEmpty"
 },
 {
 "value1": "={{$json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"messages\"][0][\"id\"]}}",
 "operation": "isEmpty"
 },
 {
 "value1": "={{$json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"messages\"][0][\"text\"][\"body\"]}}",
 "operation": "contains",
 "value2": "http"
 },
 {
 "value1": "={{$json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"messages\"][0][\"type\"]}}",
 "value2": "system"
 }
 ]
 },
 "combineOperation": "any"
 },
 "name": "IF",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 580,
 320
 ],
 "notesInFlow": true,
 "notes": "Checa post"
 },
 {
 "parameters": {},
 "name": "NoOp",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 760,
 220
 ],
 "notesInFlow": true,
 "notes": "Descarta"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select * from users where id = '{{$json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}'",
 "additionalFields": {}
 },
 "name": "Postgres",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 760,
 440
 ],
 "alwaysOutputData": true,
 "notesInFlow": true,
 "retryOnFail": false,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Consulta usuário"
 },
 {
 "parameters": {},
 "name": "NoOp1",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 780,
 960
 ],
 "notesInFlow": true,
 "notes": "Descarta msg"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF1",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 940,
 440
 ],
 "notesInFlow": true,
 "notes": "Novo usuário?"
 },
 {
 "parameters": {
 "conditions": {
 "number": [
 {
 "value1": "={{$node[\"Postgres\"].json[\"messages\"]}}",
 "operation": "larger",
 "value2": 10
 }
 ]
 }
 },
 "name": "IF2",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 600,
 1140
 ],
 "notesInFlow": true,
 "notes": "Checa limite 10 msgs"
 },
 {
 "parameters": {
 "value1": "={{parseFloat($node[\"Postgres\"].json[\"status\"])}}",
 "rules": {
 "rules": [
 {
 "operation": "equal",
 "value2": 1,
 "output": 1
 },
 {
 "operation": "equal",
 "value2": 2,
 "output": 2
 },
 {
 "operation": "equal",
 "value2": 3,
 "output": 3
 }
 ]
 },
 "fallbackOutput": 0
 },
 "name": "Switch",
 "type": "n8n-nodes-base.switch",
 "typeVersion": 1,
 "position": [
 1100,
 1160
 ],
 "alwaysOutputData": false
 },
 {
 "parameters": {},
 "name": "NoOp2",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 1380,
 860
 ],
 "notesInFlow": true,
 "notes": "Post inválido"
 },
 {
 "parameters": {
 "keepOnlySet": true,
 "values": {
 "number": [
 {
 "name": "messages",
 "value": "={{$node[\"Postgres\"].json[\"messages\"]+1}}"
 },
 {
 "name": "id",
 "value": "={{$json[\"id\"]}}"
 }
 ]
 },
 "options": {}
 },
 "name": "Set",
 "type": "n8n-nodes-base.set",
 "typeVersion": 1,
 "position": [
 780,
 1160
 ],
 "notesInFlow": true,
 "notes": "Msg+1"
 },
 {
 "parameters": {
 "operation": "update",
 "table": "users",
 "updateKey": "id:bigint",
 "columns": "messages",
 "additionalFields": {}
 },
 "name": "Postgres1",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 940,
 1160
 ],
 "alwaysOutputData": true,
 "retryOnFail": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 }
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Postgres\"].json[\"id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": false, \"body\": \"🤖 Eu sou um robô programado para enviar os links.\\n\\n👩🏻 Para falar com a gente envie mensagem para https://wa.me/55XXXXXXXXXXX\" }\n}"
 },
 "name": "HTTP Request",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 1380,
 1040
 ],
 "notesInFlow": true,
 "retryOnFail": false,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Eu sou um robô"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Postgres\"].json[\"id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": false, \"body\": \"‼️ As inscrições com o *SUPER DESCONTO* estão abertas por pouco tempo!\\n\\n👩🏻 Para falar com a gente envie mensagem para https://wa.me/55XXXXXXXXXXX\\n\\nEstamos de prontidão para tirar suas dúvidas!\" }\n}"
 },
 "name": "HTTP Request1",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 1380,
 1240
 ],
 "notesInFlow": true,
 "retryOnFail": false,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Inscrições abertas"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
"jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Postgres\"].json[\"id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": true, \"body\": \"As inscrições estão encerradas.\\n\\nVocê pode preencher a aplicação e solicitar uma vaga👇\\nhttps://link-google-form\\n\\nA aplicação não garante a vaga.\" }\n}"
 },
 "name": "HTTP Request2",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 1380,
 1440
 ],
 "notesInFlow": true,
 "retryOnFail": false,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Inscrições encerradas"
 },
 {
 "parameters": {
 "table": "users",
 "columns": "id,created_at,status,messages",
 "additionalFields": {}
 },
 "name": "Postgres2",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 1460,
 320
 ],
 "alwaysOutputData": false,
 "notesInFlow": true,
 "retryOnFail": false,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Novo usuário"
 },
 {
 "parameters": {
 "value": "={{Date()}}",
 "custom": true,
 "toFormat": "YYYY-MM-DD HH:mm:ssZ",
 "options": {}
 },
 "name": "Date & Time",
 "type": "n8n-nodes-base.dateTime",
 "typeVersion": 1,
 "position": [
 1140,
 320
 ],
 "notesInFlow": true,
 "notes": "data hoje"
 },
 {
 "parameters": {
 "action": "calculate",
 "value": "={{Date()}}",
 "duration": 4,
 "options": {}
 },
 "name": "Date & Time1",
 "type": "n8n-nodes-base.dateTime",
 "typeVersion": 1,
 "position": [
 1620,
 320
 ],
 "notesInFlow": true,
 "notes": "4 dias de carrinho aberto"
 },
 {
 "parameters": {
 "value": "={{$json[\"data\"]}}",
 "dataPropertyName": "valid",
 "custom": true,
 "toFormat": "YYYY-MM-DD HH:mm:ssZ",
 "options": {}
 },
 "name": "Date & Time2",
 "type": "n8n-nodes-base.dateTime",
 "typeVersion": 1,
 "position": [
 1780,
 320
 ],
 "notesInFlow": true,
 "notes": "data expira"
 },
 {
 "parameters": {
 "value": "={{Date()}}",
 "dataPropertyName": "created_at",
 "custom": true,
 "toFormat": "YYYY-MM-DD HH:mm:ssZ",
 "options": {}
 },
 "name": "Date & Time3",
 "type": "n8n-nodes-base.dateTime",
 "typeVersion": 1,
 "position": [
 1940,
 320
 ],
 "notesInFlow": true,
 "notes": "data criada"
 },
 {
 "parameters": {
 "action": "generate",
 "dataPropertyName": "code",
 "encodingType": "hex",
 "stringLength": 6
 },
 "name": "Crypto",
 "type": "n8n-nodes-base.crypto",
 "typeVersion": 1,
 "position": [
 2100,
 320
 ],
 "notesInFlow": true,
 "notes": "Link checkout"
 },
 {
 "parameters": {
 "value": "={{$node[\"Date & Time1\"].json[\"data\"]}}",
 "dataPropertyName": "expira",
 "custom": true,
 "toFormat": "DD/MM",
 "options": {
 "toTimezone": "America/Sao_Paulo"
 }
 },
 "name": "Date & Time4",
 "type": "n8n-nodes-base.dateTime",
 "typeVersion": 1,
 "position": [
 3060,
 320
 ],
 "notesInFlow": true,
 "notes": "formata data"
 },
 {
 "parameters": {
 "action": "generate",
 "dataPropertyName": "code2",
 "encodingType": "hex",
 "stringLength": 6
 },
 "name": "Crypto1",
 "type": "n8n-nodes-base.crypto",
 "typeVersion": 1,
 "position": [
 2580,
 320
 ],
 "notesInFlow": true,
 "notes": "Link aula"
 },
 {
 "parameters": {
 "keepOnlySet": true,
 "values": {
 "string": [
 {
 "name": "id",
 "value": "={{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}"
 },
 {
 "name": "created_at",
 "value": "={{$json[\"data\"]}}"
 }
 ],
 "number": [
 {
 "name": "status",
 "value": 1
 },
 {
 "name": "messages"
 }
 ]
 },
 "options": {}
 },
 "name": "Set1",
 "type": "n8n-nodes-base.set",
 "typeVersion": 1,
 "position": [
 1300,
 320
 ],
 "notesInFlow": true,
 "notes": "Status 1"
 },
 {
 "parameters": {
 "keepOnlySet": true,
 "values": {
 "string": [
 {
 "name": "created_at",
 "value": "={{$json[\"created_at\"]}}"
 },
 {
 "name": "code",
 "value": "={{$json[\"code\"]}}"
 },
 {
 "name": "valid",
 "value": "={{$json[\"valid\"]}}"
 },
 {
 "name": "link",
 "value": "https://link-checkout"
 },
 {
 "name": "expired",
 "value": "https://seudominio.com.br/aplicacao/"
 }
 ],
 "number": [
 {
 "name": "user",
 "value": "={{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}"
 },
 {
 "name": "clicks"
 }
 ]
 },
 "options": {}
 },
 "name": "Set2",
 "type": "n8n-nodes-base.set",
 "typeVersion": 1,
 "position": [
 2260,
 320
 ],
 "notesInFlow": true,
 "notes": "Link checkout"
 },
 {
 "parameters": {
 "table": "links",
 "columns": "created_at,code,user,valid,expired,clicks,link",
 "additionalFields": {}
 },
 "name": "Postgres3",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 2420,
 320
 ],
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Insere link checkout"
 },
 {
 "parameters": {
 "keepOnlySet": true,
 "values": {
 "string": [
 {
 "name": "created_at",
 "value": "={{$node[\"Set2\"].json[\"created_at\"]}}"
 },
 {
 "name": "code",
 "value": "={{$json[\"code2\"]}}"
 },
 {
 "name": "valid",
 "value": "={{$node[\"Set2\"].json[\"valid\"]}}"
 },
 {
 "name": "link",
 "value": "https://seudominio.com.br/masterclass/"
 },
 {
 "name": "expired",
 "value": "https://seudominio.com.br/aplicacao/"
 }
 ],
 "number": [
 {
 "name": "user",
 "value": "={{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}"
 },
 {
 "name": "clicks"
 }
 ]
 },
 "options": {}
},
 "name": "Set3",
 "type": "n8n-nodes-base.set",
 "typeVersion": 1,
 "position": [
 2740,
 320
 ],
 "notesInFlow": true,
 "notes": "Link aula"
 },
 {
 "parameters": {
 "table": "links",
 "columns": "created_at,code,user,valid,expired,clicks,link",
 "additionalFields": {}
 },
 "name": "Postgres4",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 2900,
 320
 ],
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Insere link aula"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": true, \"body\": \"*TÍTULO DA MASTERCLASS*\\n\\n😀 Nesta super aula você aprenderá:\\n✔️ Benefício 1\\n✔️ Benefício 2\\n✔️ Benefício 3\\n✔️ Benefício 4\\n✔️ Curso XYZ\\n\\n🎁 Baixe o (coloque aqui um material importante para baixar na masterclass).\\n\\n⚠️ A aula ficará disponível somente até *{{$json[\"expira\"]}}*.\\n\\n*Assista agora*👇\\nhttps://go.seudominio.com.br/{{$node[\"Set3\"].json[\"code\"]}}\" }\n}"
 },
 "name": "HTTP Request3",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 3220,
 320
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg 1"
 },
 {
 "parameters": {
 "amount": 2
 },
 "name": "Wait",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 1780,
 660
 ],
 "webhookId": "8482928c-02d6-4470-9e1d-80f11b665541",
 "notesInFlow": true,
 "notes": "2h"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": false, \"body\": \"*NOME DO CURSO*\\n\\n📲 Amanhã você terá acesso ao curso para (benefícios do seu curso).\\n\\nAcesse o link e conheça os detalhes👇\\nhttps://seudominio.com.br/curso/\\n\\n🕗 As inscrições abrem amanhã!\\n\\nEnquanto isso, assista e aproveite a *MASTERCLASS*.\\n\\nSe não quiser mais receber digite: parar\" }\n}"
 },
 "name": "HTTP Request4",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 2260,
 760
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg 2"
 },
 {
 "parameters": {
 "amount": 18
 },
 "name": "Wait1",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 2420,
 760
 ],
 "webhookId": "46edd559-d873-4f20-aaa8-f017cf0fe607",
 "notesInFlow": true,
 "notes": "18h"
 },
 {
 "parameters": {
 "keepOnlySet": true,
 "values": {
 "number": [
 {
 "name": "status",
 "value": 2
 },
 {
 "name": "id",
 "value": "={{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}"
 }
 ]
 },
 "options": {}
 },
 "name": "Set4",
 "type": "n8n-nodes-base.set",
 "typeVersion": 1,
 "position": [
 2900,
 860
 ],
 "notesInFlow": true,
 "notes": "Status 2"
 },
 {
 "parameters": {
 "operation": "update",
 "table": "users",
 "updateKey": "id:bigint",
 "columns": "status",
 "additionalFields": {}
 },
 "name": "Postgres5",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 3060,
 860
 ],
 "alwaysOutputData": false,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Atualiza status"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n\"messaging_product\": \"whatsapp\",\n\"recipient_type\": \"individual\",\n\"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n\"type\": \"text\",\n\"text\": { \"preview_url\": false, \"body\": \"🏆 *INSCRIÇÕES ABERTAS!!*\\n\\n🤩 Somente através deste link você tem acesso ao *NOME DO CURSO* com o super desconto de *R$ XXX,00*.\\n\\nAs inscrições ficam abertas até *{{$node[\"Date & Time4\"].json[\"expira\"]}}*, após esse prazo não será possível se inscrever.\\n\\n*Acesse aqui*👇\\nhttps://go.seudominio.com.br/{{$node[\"Set2\"].json[\"code\"]}}\" }\n}"
 },
 "name": "HTTP Request5",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 3220,
 860
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Inscrições abertas!"
 },
 {
 "parameters": {
 "amount": 2
 },
 "name": "Wait2",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 1780,
 1200
 ],
 "webhookId": "0d42dad6-b003-4c1f-bd24-cc6bb981afb6",
 "notesInFlow": true,
 "notes": "2h"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": false, \"body\": \"*GARANTIA DE SATISFAÇÃO*\\n\\n🤝 Você tem X dias para experimentar!\\n\\nSe nesse período você não gostar, você pode solicitar o cancelamento e receber 100% o seu dinheiro de volta.\\n\\n👩🏻 Para falar com a gente envie mensagem
para https://wa.me/55XXXXXXXXXXX.\\n\\nSe não quiser mais receber digite: parar\\n\\n*Faça sua inscrição*👇\\nhttps://go.seudominio.com.br/{{$node[\"Set2\"].json[\"code\"]}}\"}\n}"
 },
 "name": "HTTP Request6",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 2260,
 1320
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg 3"
 },
 {
 "parameters": {
 "unit": "days"
 },
 "name": "Wait3",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 2420,
 1320
 ],
 "webhookId": "5c01c9c1-5f9c-4a02-94bb-e1ed1c1fd000",
 "notesInFlow": true,
 "notes": "1d"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"template\",\n \"template\": {\n \"name\": \"video\",\n \"language\": {\n \"code\": \"pt_BR\",\n \"policy\": \"deterministic\"\n },\n \"components\": [\n {\n \"type\" : \"header\",\n \"parameters\": [\n {\n \"type\": \"video\",\n \"video\": {\n \"link\": \"https://seudominio.com.br/downloads/video.mp4\"\n }\n } ]\n },\n { \n \"type\": \"button\",\n \"parameters\": [\n {\n \"type\": \"payload\",\n \"payload\": \"{{$node[\"Set2\"].json[\"code\"]}}\"\n }\n ],\n \"sub_type\": \"url\",\n \"index\": 0\n },\n {\n \"type\": \"body\",\n \"parameters\": [\n {\n \"type\": \"text\",\n \"text\": \"{{$node[\"Date & Time4\"].json[\"expira\"]}}\"\n }\n ]\n }\n ]\n }\n }"
 },
 "name": "HTTP Request7",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 2900,
 1400
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg Template 1"
 },
 {
 "parameters": {
 "unit": "days"
 },
 "name": "Wait4",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 3060,
 1400
 ],
 "webhookId": "9e6de110-5909-49b2-9f50-7d9049ac6306",
 "notesInFlow": true,
 "notes": "1d"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"template\",\n \"template\": {\n \"name\": \"image\",\n \"language\": {\n \"code\": \"pt_BR\",\n \"policy\": \"deterministic\"\n },\n \"components\": [\n {\n \"type\": \"header\",\n \"parameters\": [\n {\n \"type\": \"image\",\n \"image\": {\n \"link\": \"https://seudominio.com.br/downloads/image.jpg\"\n }\n }\n ]\n },\n {\n \"type\": \"button\",\n \"parameters\": [\n {\n \"type\": \"payload\",\n \"payload\": \"{{$node[\"Set2\"].json[\"code\"]}}\"\n }\n ],\n \"sub_type\": \"url\",\n \"index\": 0\n }\n ]\n }\n}"
 },
 "name": "HTTP Request8",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 3540,
 1480
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg Template 2"
 },
 {
 "parameters": {
 "amount": 19
 },
 "name": "Wait5",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 1780,
 1800
 ],
 "webhookId": "54ee23f0-645e-47eb-a648-3020c3db3d8e",
 "notesInFlow": true,
 "notes": "19h"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"template\",\n \"template\": {\n \"name\": \"acaba_hoje\",\n \"language\": {\n \"code\": \"pt_BR\",\n \"policy\": \"deterministic\"\n },\n \"components\": [\n {\n \"type\": \"button\",\n \"parameters\": [\n {\n \"type\": \"payload\",\n \"payload\": \"{{$node[\"Set2\"].json[\"code\"]}}\"\n }\n ],\n \"sub_type\": \"url\",\n \"index\": 0\n }\n ]\n }\n}"
 },
 "name": "HTTP Request9",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 2260,
 1880
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg Template 3"
 },
 {
 "parameters": {
 "amount": 4
 },
 "name": "Wait6",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 2420,
 1880
 ],
 "webhookId": "3e13a77c-c6bd-4088-b5d7-dc3bb49b6225",
 "notesInFlow": true,
 "notes": "4h"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n\"messaging_product\": \"whatsapp\",\n\"recipient_type\": \"individual\",\n\"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n\"type\": \"template\",\n\"template\": {\n\"name\": \"ultimo_aviso\",\n\"language\": {\n\"code\": \"pt_BR\",\n\"policy\": \"deterministic\"\n},\n\"components\": [\n{\n\"type\": \"button\",\n\"parameters\": [\n{\n\"type\": \"payload\",\n\"payload\": \"{{$node[\"Set2\"].json[\"code\"]}}\"\n}\n],\n\"sub_type\": \"url\",\n\"index\": 0\n}\n]\n}\n}"
 },
 "name": "HTTP Request10",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 2900,
1980
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Msg Template 4"
 },
 {
 "parameters": {
 "amount": 3
 },
 "name": "Wait7",
 "type": "n8n-nodes-base.wait",
 "typeVersion": 1,
 "position": [
 3060,
 1980
 ],
 "webhookId": "73c2b9f8-3e03-49ca-a9ab-6e99a9031617",
 "notesInFlow": true,
 "notes": "3h"
 },
 {
 "parameters": {
 "keepOnlySet": true,
 "values": {
 "number": [
 {
 "name": "status",
 "value": 3
 },
 {
 "name": "id",
 "value": "={{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}"
 }
 ]
 },
 "options": {}
 },
 "name": "Set5",
 "type": "n8n-nodes-base.set",
 "typeVersion": 1,
 "position": [
 3540,
 2080
 ],
 "notesInFlow": true,
 "notes": "Status 3"
 },
 {
 "parameters": {
 "operation": "update",
 "table": "users",
 "updateKey": "id:bigint",
 "columns": "status",
 "additionalFields": {}
 },
 "name": "Postgres6",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 3700,
 2080
 ],
 "alwaysOutputData": false,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Fecha inscrições"
 },
 {
 "parameters": {
 "path": "whatsapp",
 "responseMode": "responseNode",
 "options": {}
 },
 "name": "Webhook1",
 "type": "n8n-nodes-base.webhook",
 "typeVersion": 1,
 "position": [
 420,
 580
 ],
 "webhookId": "98584c0e-255a-4223-bb85-007dd7762590",
 "notesInFlow": true,
 "notes": "Config inicial"
 },
 {
 "parameters": {
 "respondWith": "text",
 "responseBody": "={{$json[\"query\"][\"hub.challenge\"]}}",
 "options": {}
 },
 "name": "Respond to Webhook",
 "type": "n8n-nodes-base.respondToWebhook",
 "typeVersion": 1,
 "position": [
 600,
 580
 ],
 "notesInFlow": true,
 "notes": "Responde"
 },
 {
 "parameters": {
 "httpMethod": "POST",
 "path": "whatsapp",
 "options": {
 "responseData": "OK"
 }
 },
 "name": "Webhook",
 "type": "n8n-nodes-base.webhook",
 "typeVersion": 1,
 "position": [
 420,
 320
 ],
 "webhookId": "863978de-0bd5-4267-b4b1-64d791fb7926"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"messages\"][0][\"text\"][\"body\"].toLowerCase()}}",
 "operation": "contains",
 "value2": "parar"
 }
 ]
 }
 },
 "name": "IF3",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 1140,
 560
 ],
 "notesInFlow": true,
 "notes": "Parar de receber?"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=delete from links where \"user\" = '{{$node[\"Postgres\"].json[\"id\"]}}';\ndelete from users where id = '{{$node[\"Postgres\"].json[\"id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres7",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 1380,
 540
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Apaga número"
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Postgres\"].json[\"id\"]}}\",\n \"type\": \"text\",\n \"text\": { \"preview_url\": false, \"body\": \"Seu número foi apagado.\\n\\nFeche a conversa e não envie mensagens para o robô.\" }\n}"
 },
 "name": "HTTP Request11",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 1540,
 540
 ],
 "notesInFlow": true,
 "retryOnFail": false,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Número apagado!"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres8",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 2580,
 1320
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF4",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 2740,
 1320
 ]
 },
 {
 "parameters": {},
 "name": "NoOp3",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 2900,
 1220
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres9",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 3220,
 1400
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF5",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 3380,
 1400
 ]
 },
 {
 "parameters": {},
 "name": "NoOp4",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 3540,
 1300
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
"query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres10",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 1940,
 1800
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF6",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 2100,
 1800
 ]
 },
 {
 "parameters": {},
 "name": "NoOp5",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 2260,
 1700
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres11",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 2580,
 1880
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF7",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 2740,
 1880
 ]
 },
 {
 "parameters": {},
 "name": "NoOp6",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 2900,
 1780
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres12",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 3220,
 1980
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF8",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 3380,
 1980
 ]
 },
 {
 "parameters": {},
 "name": "NoOp7",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 3540,
 1880
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres13",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 1940,
 660
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF9",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 2100,
 660
 ]
 },
 {
 "parameters": {},
 "name": "NoOp8",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 2260,
 560
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres14",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 2580,
 760
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF10",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 2740,
 760
 ]
 },
 {
 "parameters": {},
 "name": "NoOp9",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 2900,
 640
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "operation": "executeQuery",
 "query": "=select id from users where id = '{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}';",
 "additionalFields": {}
 },
 "name": "Postgres15",
 "type": "n8n-nodes-base.postgres",
 "typeVersion": 1,
 "position": [
 1940,
 1200
 ],
 "alwaysOutputData": true,
 "retryOnFail": false,
 "notesInFlow": true,
 "credentials": {
 "postgres": {
 "id": "46",
 "name": "Postgres LP"
 }
 },
 "notes": "Checa número"
 },
 {
 "parameters": {
 "conditions": {
 "string": [
 {
 "value1": "={{$json[\"id\"]}}",
 "operation": "isEmpty"
 }
 ]
 }
 },
 "name": "IF11",
 "type": "n8n-nodes-base.if",
 "typeVersion": 1,
 "position": [
 2100,
 1200
 ]
 },
 {
 "parameters": {},
 "name": "NoOp10",
 "type": "n8n-nodes-base.noOp",
 "typeVersion": 1,
 "position": [
 2260,
 1080
 ],
 "notesInFlow": true,
 "notes": "Finaliza fluxo"
 },
 {
 "parameters": {
 "content": "## AJUSTAR \n**Links das aulas**",
 "height": 100,
 "width": 220
 },
 "name": "Note",
 "type": "n8n-nodes-base.stickyNote",
 "typeVersion": 1,
 "position": [
 2700,
200
 ]
 },
 {
 "parameters": {
 "content": "## AJUSTAR \n**Linka de checkout**",
 "height": 100
 },
 "name": "Note1",
 "type": "n8n-nodes-base.stickyNote",
 "typeVersion": 1,
 "position": [
 2220,
 200
 ]
 },
 {
 "parameters": {
 "content": "## OPCIONAL \n**Convite para o grupo** ",
 "height": 120
 },
 "name": "Note2",
 "type": "n8n-nodes-base.stickyNote",
 "typeVersion": 1,
 "position": [
 3880,
 1920
 ]
 },
 {
 "parameters": {
 "authentication": "headerAuth",
 "requestMethod": "POST",
 "url": "=https://graph.facebook.com/v14.0/{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"metadata\"][\"phone_number_id\"]}}/messages",
 "jsonParameters": true,
 "options": {},
 "bodyParametersJson": "={\n \"messaging_product\": \"whatsapp\",\n \"recipient_type\": \"individual\",\n \"to\": \"{{$node[\"Webhook\"].json[\"body\"][\"entry\"][0][\"changes\"][0][\"value\"][\"contacts\"][0][\"wa_id\"]}}\",\n \"type\": \"template\",\n \"template\": {\n \"name\": \"convite\",\n \"language\": {\n \"code\": \"pt_BR\",\n \"policy\": \"deterministic\"\n }\n }\n}"
 },
 "name": "HTTP Request12",
 "type": "n8n-nodes-base.httpRequest",
 "typeVersion": 1,
 "position": [
 3880,
 2080
 ],
 "notesInFlow": true,
 "retryOnFail": true,
 "credentials": {
 "httpHeaderAuth": {
 "id": "45",
 "name": "Header Auth FB LP"
 }
 },
 "notes": "Convite para grupo WhatsApp"
 }
 ],
 "connections": {
 "IF": {
 "main": [
 [
 {
 "node": "NoOp",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "Postgres",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres": {
 "main": [
 [
 {
 "node": "IF1",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF1": {
 "main": [
 [
 {
 "node": "Date & Time",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "IF3",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Switch": {
 "main": [
 [
 {
 "node": "NoOp2",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request1",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request2",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF2": {
 "main": [
 [
 {
 "node": "NoOp1",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "Set",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Set": {
 "main": [
 [
 {
 "node": "Postgres1",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres1": {
 "main": [
 [
 {
 "node": "Switch",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres2": {
 "main": [
 [
 {
 "node": "Date & Time1",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Date & Time": {
 "main": [
 [
 {
 "node": "Set1",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Date & Time1": {
 "main": [
 [
 {
 "node": "Date & Time2",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Date & Time2": {
 "main": [
 [
 {
 "node": "Date & Time3",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Date & Time3": {
 "main": [
 [
 {
 "node": "Crypto",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Crypto": {
 "main": [
 [
 {
 "node": "Set2",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Crypto1": {
 "main": [
 [
 {
 "node": "Set3",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Set1": {
 "main": [
 [
 {
 "node": "Postgres2",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Set2": {
 "main": [
 [
 {
 "node": "Postgres3",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres3": {
 "main": [
 [
 {
 "node": "Crypto1",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Set3": {
 "main": [
 [
 {
 "node": "Postgres4",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres4": {
 "main": [
 [
 {
 "node": "Date & Time4",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Date & Time4": {
 "main": [
 [
 {
 "node": "HTTP Request3",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request3": {
 "main": [
 [
 {
 "node": "Wait",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait": {
 "main": [
 [
 {
 "node": "Postgres13",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request4": {
 "main": [
 [
 {
 "node": "Wait1",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait1": {
 "main": [
 [
 {
 "node": "Postgres14",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Set4": {
 "main": [
 [
 {
 "node": "Postgres5",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres5": {
 "main": [
 [
 {
 "node": "HTTP Request5",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request5": {
 "main": [
 [
 {
 "node": "Wait2",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait2": {
 "main": [
 [
 {
 "node": "Postgres15",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request6": {
 "main": [
 [
 {
 "node": "Wait3",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait3": {
 "main": [
[
 {
 "node": "Postgres8",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request7": {
 "main": [
 [
 {
 "node": "Wait4",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait4": {
 "main": [
 [
 {
 "node": "Postgres9",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request8": {
 "main": [
 [
 {
 "node": "Wait5",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait5": {
 "main": [
 [
 {
 "node": "Postgres10",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request9": {
 "main": [
 [
 {
 "node": "Wait6",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait6": {
 "main": [
 [
 {
 "node": "Postgres11",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "HTTP Request10": {
 "main": [
 [
 {
 "node": "Wait7",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Wait7": {
 "main": [
 [
 {
 "node": "Postgres12",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Set5": {
 "main": [
 [
 {
 "node": "Postgres6",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Webhook1": {
 "main": [
 [
 {
 "node": "Respond to Webhook",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Webhook": {
 "main": [
 [
 {
 "node": "IF",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF3": {
 "main": [
 [
 {
 "node": "Postgres7",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "IF2",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres7": {
 "main": [
 [
 {
 "node": "HTTP Request11",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres8": {
 "main": [
 [
 {
 "node": "IF4",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF4": {
 "main": [
 [
 {
 "node": "NoOp3",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request7",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres9": {
 "main": [
 [
 {
 "node": "IF5",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF5": {
 "main": [
 [
 {
 "node": "NoOp4",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request8",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres10": {
 "main": [
 [
 {
 "node": "IF6",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF6": {
 "main": [
 [
 {
 "node": "NoOp5",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request9",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres11": {
 "main": [
 [
 {
 "node": "IF7",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF7": {
 "main": [
 [
 {
 "node": "NoOp6",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request10",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres12": {
 "main": [
 [
 {
 "node": "IF8",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF8": {
 "main": [
 [
 {
 "node": "NoOp7",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "Set5",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres13": {
 "main": [
 [
 {
 "node": "IF9",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF9": {
 "main": [
 [
 {
 "node": "NoOp8",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request4",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres14": {
 "main": [
 [
 {
 "node": "IF10",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF10": {
 "main": [
 [
 {
 "node": "NoOp9",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "Set4",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "Postgres15": {
 "main": [
 [
 {
 "node": "IF11",
 "type": "main",
 "index": 0
 }
 ]
 ]
 },
 "IF11": {
 "main": [
 [
 {
 "node": "NoOp10",
 "type": "main",
 "index": 0
 }
 ],
 [
 {
 "node": "HTTP Request6",
 "type": "main",
 "index": 0
 }
 ]
 ]
 }
 },
 "active": false,
 "settings": {},
 "id": 103,
 "tags": []
}

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Outros materiais