{
  "updatedAt": "2025-06-16T12:20:51.000Z",
  "createdAt": "2025-06-13T14:22:57.632Z",
  "id": "sEjePinSl8GBy5yN",
  "name": "01 - Modelo Disparo (Nome e Imagem)",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {},
      "id": "86e047cb-0133-4780-b21a-cf31c5ad6f9b",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        1360,
        380
      ]
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1ovG3gkqWLcZi7cO91-gtrtPItF0HY05QTtz097q7Yqc",
          "mode": "list",
          "cachedResultName": "Planilha HD - Teste",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ovG3gkqWLcZi7cO91-gtrtPItF0HY05QTtz097q7Yqc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "pg1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ovG3gkqWLcZi7cO91-gtrtPItF0HY05QTtz097q7Yqc/edit#gid=0"
        },
        "options": {}
      },
      "id": "669925fe-e403-4d38-826f-824c5a8031ff",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1600,
        380
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "92c40de5-5787-4417-b049-07e4aab4e96a",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        1880,
        240
      ]
    },
    {
      "parameters": {},
      "id": "3cf28a09-27d3-48fc-a779-ebdf53ec979f",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        2920,
        380
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1ovG3gkqWLcZi7cO91-gtrtPItF0HY05QTtz097q7Yqc",
          "mode": "list",
          "cachedResultName": "Planilha HD - Teste",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ovG3gkqWLcZi7cO91-gtrtPItF0HY05QTtz097q7Yqc/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "pg1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jk-yWMnM96Xx22dIVsG8kPpyuCiHLsj3QCVB3P9K884/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "row_number": "={{ $('Google Sheets').item.json.row_number }}",
            "Enviado": "SIM",
            "Sa\u00edda": "=+551151989942"
          },
          "matchingColumns": [
            "row_number"
          ],
          "schema": [
            {
              "id": "Nome",
              "displayName": "Nome",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "email",
              "displayName": "email",
              "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": "CPF",
              "displayName": "CPF",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Existe",
              "displayName": "Existe",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Enviado",
              "displayName": "Enviado",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Sa\u00edda",
              "displayName": "Sa\u00edda",
              "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": "b03ee5df-e72a-4ad7-89ce-b3e48d514305",
      "name": "Google Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        2700,
        100
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "00fe3841-bebd-4679-91b3-f37d994eba91",
              "leftValue": "={{ $('Google Sheets').item.json.Enviado }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            },
            {
              "id": "3b33695b-8df7-4e6a-bd5f-a7428399c7cd",
              "leftValue": "={{ $('Google Sheets').item.json.Existe }}",
              "rightValue": "N\u00c3O",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "id": "39971a43-5f61-4acf-bf8f-b71fb0b64567",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2100,
        260
      ]
    },
    {
      "parameters": {
        "amount": "=1"
      },
      "id": "8e7fdc71-0da3-4cef-a7fc-465058e79287",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2520,
        100
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://graph.facebook.com/v22.0/576678365532139/messages",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "whatsAppApi",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"messaging_product\": \"whatsapp\",\n    \"recipient_type\": \"individual\",\n    \"to\": \"+55{{ $('Google Sheets').item.json.Telefone }}\",\n    \"type\": \"template\",\n    \"template\": {\n        \"name\": \"2405_slide1\",\n        \"language\": {\n            \"code\": \"pt_BR\"\n        },\n        \"components\": [\n            {\n                \"type\": \"header\",\n                \"parameters\": [\n                    {\n                        \"type\": \"image\",\n                        \"image\": {\n                            \"link\": \"https://mobilevet.blob.core.windows.net/arquivos/disparo_24_05_card.png\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"type\": \"body\",\n                \"parameters\": [\n                    {\n                        \"type\": \"text\",\n                        \"text\": \"{{ $('Google Sheets').item.json.Nome }}\"\n                    }\n                ]\n\n            }\n        ]\n    }\n}",
        "options": {}
      },
      "id": "302a12c5-fb75-4cf0-9a8b-a7515c5d2186",
      "name": "Registrar",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2340,
        100
      ],
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Registrar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Registrar": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "7b839cec-5e5f-48c8-b6d2-40fb76e24be0",
  "triggerCount": 0,
  "shared": [
    {
      "updatedAt": "2025-06-13T14:22:57.638Z",
      "createdAt": "2025-06-13T14:22:57.638Z",
      "role": "workflow:owner",
      "workflowId": "sEjePinSl8GBy5yN",
      "projectId": "5dTxE8vBWJ6kQMrp"
    }
  ],
  "tags": []
}