{
  "name": "Automate marketing campaigns with Airtable CRM & Brevo email tracking",
  "nodes": [
    {
      "id": "210abf6c-eb2f-4bc2-9b72-95855961bb37",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -160,
        -80
      ]
    },
    {
      "id": "505840ce-982f-432b-8b3f-8c33087379e8",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        288,
        -80
      ]
    },
    {
      "id": "9d66fbd6-6d7b-41c8-95e6-fba126e9f447",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1072,
        -64
      ]
    },
    {
      "id": "244ab1e8-7626-4580-911a-a86d51ef6bd2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -320
      ],
      "parameters": {
        "width": 396,
        "height": 200,
        "content": "## Email Sending Workflow \n### 🛠️ Prerequisites :\n* Credentials : Airtable, Brevo\n* CRM Tables : Compagny, Interaction, [Campaign]\n* Email Template defined in Brevo\n* Search Conditions : AND({Opt-in} "
      }
    },
    {
      "id": "af8f6f63-10aa-47e5-b631-63171d6a6767",
      "name": "Send an email with an existing Template",
      "type": "n8n-nodes-base.sendInBlue",
      "position": [
        512,
        -64
      ]
    },
    {
      "id": "a85ae7c1-cba1-4cfa-9a4f-4e6d8d37bec7",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        704,
        -64
      ]
    },
    {
      "id": "e0a41139-df0a-4c79-ba10-838c1d1cffe8",
      "name": "Create Interaction",
      "type": "n8n-nodes-base.airtable",
      "position": [
        896,
        -64
      ]
    },
    {
      "id": "4ef43cb4-9e4b-458f-8108-a3a1b51a4cb9",
      "name": "Search Company",
      "type": "n8n-nodes-base.airtable",
      "position": [
        64,
        -80
      ]
    },
    {
      "id": "d520cced-8037-4e1d-87dc-fadeadeec378",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        208
      ],
      "parameters": {
        "width": 396,
        "height": 200,
        "content": "## Email Event Tracking Workflow \n### 🛠️ Prerequisites :\n* Brevo configuration for calling the n8n Webhook\n* Brevo configuration sending email events"
      }
    },
    {
      "id": "808ce229-b3c8-4c07-a40f-8b37fbcf61b7",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -160,
        544
      ]
    },
    {
      "id": "02d02732-9eec-402a-8351-8d003056d265",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        464,
        512
      ]
    },
    {
      "id": "6824bcdc-381d-4143-9081-f28450640202",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        544
      ]
    },
    {
      "id": "30306b08-dff4-4c02-b101-0856e30d8a4e",
      "name": "Search Interaction",
      "type": "n8n-nodes-base.airtable",
      "position": [
        272,
        544
      ]
    },
    {
      "id": "60aae98a-2ecd-40b4-af40-5fa4705acae1",
      "name": "Update Delivred",
      "type": "n8n-nodes-base.airtable",
      "position": [
        736,
        256
      ]
    },
    {
      "id": "3d512b07-91f6-4cb8-a262-1aae02f0fa86",
      "name": "Update Opened",
      "type": "n8n-nodes-base.airtable",
      "position": [
        736,
        448
      ]
    },
    {
      "id": "5637b700-2b79-43c8-963a-accd06cccf80",
      "name": "Update Clicked",
      "type": "n8n-nodes-base.airtable",
      "position": [
        736,
        624
      ]
    },
    {
      "id": "48fbfe3f-d96b-461c-bdb7-7f2dd283c297",
      "name": "Search Company2",
      "type": "n8n-nodes-base.airtable",
      "position": [
        736,
        816
      ]
    },
    {
      "id": "55f4df06-afe0-4607-8b93-91abda5e4853",
      "name": "Update Company",
      "type": "n8n-nodes-base.airtable",
      "position": [
        944,
        816
      ]
    },
    {
      "id": "d9dcdd1d-4481-46cb-b72c-783642a797c3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        256
      ],
      "parameters": {
        "width": 188,
        "height": 80,
        "content": "### ✉️ Delivred Email"
      }
    },
    {
      "id": "fa23de10-55a7-46c8-b1ca-aca96c8f6310",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        640
      ],
      "parameters": {
        "width": 188,
        "height": 80,
        "content": "### ✉️ Clicked Email"
      }
    },
    {
      "id": "6a47d115-c711-4060-b7f6-12e9dfe0e780",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        448
      ],
      "parameters": {
        "width": 188,
        "height": 80,
        "content": "### ✉️ Opened Email"
      }
    },
    {
      "id": "6930845f-383e-4734-a77a-711a9f5200ed",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        832
      ],
      "parameters": {
        "width": 236,
        "height": 80,
        "content": "### ✉️ Unsubscribed Request\nUpdate of Opt-in Status"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Update Delivred",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Opened",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Clicked",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search Company2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Create Interaction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Search Interaction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Company": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Send an email with an existing Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Company2": {
      "main": [
        [
          {
            "node": "Update Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Interaction": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Interaction": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Search Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send an email with an existing Template": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}