Mon workflow 79

Avancé

Ceci est unSocial Mediaworkflow d'automatisation du domainecontenant 34 nœuds.Utilise principalement des nœuds comme If, Set, Wait, Filter, HttpRequest. Utiliser Google Sheets et MailerSend pour construire un système CRM complet par e-mail

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "rzzP4NRN7TiPJkMJ",
  "meta": {
    "instanceId": "c24388df44432e8ff2c4acecd7ab0dd2faec628bd83c70beb384cea105f7a50a"
  },
  "name": "My workflow 79",
  "tags": [],
  "nodes": [
    {
      "id": "956055e1-996a-4adc-9b04-933c0f8adfac",
      "name": "Déclencheur planifié",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -200,
        160
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a7964cef-e8bc-4b59-8f4e-47a7396c5877",
      "name": "Configuration du flux",
      "type": "n8n-nodes-base.set",
      "position": [
        20,
        160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d309aa70-6566-4caf-b195-343a439005a8",
              "name": "flow_id",
              "type": "number",
              "value": 3
            }
          ]
        }
      },
      "retryOnFail": false,
      "typeVersion": 3.4
    },
    {
      "id": "bdcdfb37-6e24-4b08-b665-570575a7770a",
      "name": "Mapper les données",
      "type": "n8n-nodes-base.set",
      "position": [
        -140,
        460
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a859ab5d-72db-499b-916f-c86056d2e8e5",
              "name": "user_id",
              "type": "string",
              "value": "={{ $json.user_id }}"
            },
            {
              "id": "a08c6a8f-d449-419c-8137-97ff7da25eb9",
              "name": "database_id",
              "type": "string",
              "value": "={{ $('IF Template Parameters OK').item.json.database_id }}"
            },
            {
              "id": "68feb703-6295-4181-a9d4-f30891a5ea1d",
              "name": "type",
              "type": "string",
              "value": "={{ $('Filter Template').item.json.type }}"
            },
            {
              "id": "82eaab08-abd6-45a2-a1f0-a1f4388064c1",
              "name": "template_name",
              "type": "string",
              "value": "={{ $('IF Template Parameters OK').item.json.template_name }}"
            },
            {
              "id": "c598ef15-d75d-48d6-aa95-9ca9d951293c",
              "name": "type_template_id",
              "type": "string",
              "value": "={{ $('Filter Template').item.json.type_template_id }}"
            },
            {
              "id": "82a53708-84f8-4ef1-a97a-421ca0926f38",
              "name": "template_id",
              "type": "string",
              "value": "={{ $('Filter Template').item.json.Id }}"
            },
            {
              "id": "1ca0c8d6-0b7f-4786-9deb-c154d624e691",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email }}"
            },
            {
              "id": "ccab5936-05fc-48c8-8b2c-fa33becb3983",
              "name": "first_name",
              "type": "string",
              "value": "={{ $json.first_name }}"
            },
            {
              "id": "598822c7-e5f5-4317-8e89-5ba751347dbd",
              "name": "discount_code",
              "type": "string",
              "value": "={{ $('Filter Template').item.json.discount_code }}"
            },
            {
              "id": "a6d160b6-009c-43ce-a0bc-80e6db1691bc",
              "name": "gift_code",
              "type": "string",
              "value": "={{ $('Filter Template').item.json.gift_code }}"
            },
            {
              "id": "3418ee65-fb37-4b7a-a97a-41ed2d62f97c",
              "name": "journey",
              "type": "string",
              "value": "={{ $('Filter Template').item.json.journey }}"
            },
            {
              "id": "bbecf918-f856-4750-96ce-e94c9a6c7dd1",
              "name": "number",
              "type": "string",
              "value": "={{ $json.number }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "18e97315-1c69-420a-9849-589914b40f65",
      "name": "Filtrer le modèle",
      "type": "n8n-nodes-base.filter",
      "position": [
        440,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0ec67f9e-14e1-4581-be9f-1cccf1e07c89",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $('Setup Flow').item.json.flow_id }}",
              "rightValue": "={{ $json.Id }}"
            }
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c0795f4f-7588-422a-b783-f9718ac640df",
      "name": "SI paramètres du modèle OK",
      "type": "n8n-nodes-base.if",
      "position": [
        680,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "cb609e58-4b53-45ce-b8b7-878bb66ec21c",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.template_name }}",
              "rightValue": ""
            },
            {
              "id": "bb59523e-94fb-4db1-9218-5cd1bd95f644",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.database_id }}",
              "rightValue": ""
            },
            {
              "id": "d7d05f35-503a-4211-a343-021462f8a798",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.type }}",
              "rightValue": ""
            },
            {
              "id": "71520d2f-c23f-424b-a6fd-7d84a492d499",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.type_template_id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "7d9fa178-95e5-417d-9321-ebb6f903afaa",
      "name": "SI user_id n'est pas vide",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3807b703-6ebf-46a7-877c-bf7b10c23da8",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.user_id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eea2dd6c-2cec-47a5-ba0e-e49cbeb38280",
      "name": "Attendre",
      "type": "n8n-nodes-base.wait",
      "position": [
        440,
        560
      ],
      "webhookId": "5704f00a-d80d-42d4-a812-4e40eeac8a1e",
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "a07ff8e2-b738-4e2a-9a0b-ac501d03eeda",
      "name": "Supprimer les doublons",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        900,
        660
      ],
      "parameters": {
        "compare": "selectedFields",
        "options": {},
        "fieldsToCompare": "user_id"
      },
      "typeVersion": 2
    },
    {
      "id": "3881117a-f258-4efe-9c81-ac40e9fe9b4a",
      "name": "SI Type E-mail",
      "type": "n8n-nodes-base.if",
      "position": [
        1980,
        460
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "da42108f-7501-4028-8cfe-a91bf73e081d",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.type }}",
              "rightValue": "email"
            },
            {
              "id": "d267dd9d-7695-4093-aea6-8bd93f58c460",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "{{ $json.user_id}}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "aaf86910-cbf0-4abc-9f44-e855930077fe",
      "name": "Déclencheur planifié 1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1580,
        460
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0b5c4da8-a9eb-4b91-8b5d-abdf46553f01",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1760,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 1040,
        "content": "# Description\n\n## ✅ Workflow Overview Summary (Based on Your Description)\n\n### 🔁 **Flow 1: \"Insert user_id\"**\n\n- Triggered manually or on schedule.\n    \n- You **choose a flow** via `Setup Flow` node by setting a `flow_id`.\n    \n- For each `user_id`, you **insert** a record into Google Sheet `transaction` table:\n    \n    - Fields: `user_id`, `phone_number`, `email`, `first_name`, `template_name`, etc.\n        \n    - Status: `0-processing`\n        \n- It checks for **duplicate `user_id`**.\n    \n    - If no duplicate → **update status to `1-sending`**\n\n\n### 📩 **Flow 2: \"Sending Email\"**\n\n- Triggered **every 30 minutes** via schedule.\n    \n- Selects records from Google Sheet where:\n    \n    - Table = `transaction`\n        \n    - `status = 1-sending`\n        \n- Checks:\n    \n    - ❌ If no email → `status = 3-no-email`\n        \n    - 🧪 If email is disposable → `status = 4-disposal-email`\n        \n    - ✅ If valid → Send email via **Brevo**\n        \n        - Params: `email`, `first_name`, `template_name`, `discount_code`\n            \n        - Update:\n            \n            - `sent_result`\n                \n            - `status = 2-sent`\n\n\n### ➕ **To Add Another Flow**\n\n- Duplicate the **\"insert\"** flow.\n    \n- Change only the `Setup Flow` node to a new `template_id`.\n    \n- That `flow_id` corresponds to a record in `templates` (a table in Google Sheet) with all necessary metadata (e.g., template ID, discount code, etc.)."
      },
      "typeVersion": 1
    },
    {
      "id": "f9c24ac3-1218-49c3-a548-76e0d6d97523",
      "name": "Note adhésive 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        880
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 460,
        "content": "## transaction\n[\n  {\n    \"CreatedAt\": \"2025-10-25T13:11:41Z\",\n    \"UpdatedAt\": \"2025-10-25T13:11:41Z\",\n    \"user_id\": \"uid_0001\",\n    \"email\": \"user1@gmail.com\",\n    \"number\": \"9362000000\",\n    \"first_name\": \"Liam\",\n    \"status\": \"1-sending\",\n    \"database_id\": \"segment1\",\n    \"type\": \"email\",\n    \"template_id\": v28xxl2sq8dg785k,\n    \"type_template_id\": 1,\n    \"template_name\": \"Churn-Pro-Plan\",\n    \"journey\": \"Test\",\n    \"sent_result\": \"\",\n    \"discount_code\": \"dis111\",\n    \"gift_code\": \"\"\n  }\n]\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1ed6e59c-b643-4d80-9c00-79f537d3c05a",
      "name": "Note adhésive 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        880
      ],
      "parameters": {
        "color": 4,
        "width": 840,
        "height": 200,
        "content": "## template\n\n\n| ---Id--- | ---template_name---                           | ---journey--- |---type---   | ---type_template_id---   | ---discount_code--- | ---gift_code--- |\n|----|----------------------------------|------------------------------|--------|------------------|---------------|-----------|\n| 1  | Churn-Pro-Plan                    | Pro-Retention                | email  | v28xxl2sq8dg785k              | dis111        | giftA     |\n| 2  | Black-Friday-Deal                 | BF-Sales                     | email  | v28xxl2sq8dg785k              | bf50          | giftB     |\n| 3  | Welcome-Flow                      | Onboarding                   | email  | v28xxl2sq8dg785k              |               |           |\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cf47bec3-465f-4d14-bbdf-683d5cb7f6c2",
      "name": "Note adhésive 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        1100
      ],
      "parameters": {
        "color": 4,
        "width": 440,
        "height": 220,
        "content": "## segment1\n\n\n| user_id        | email                        | number         | first_name        |\n|----------------|------------------------------|----------------|------------------|\n| uid_0001       | user1@gmail.com              | 9362000000     |     Liam              |\n| uid_0002       | user2@gmail.com              | 9362000001     | Noah              |\n| uid_0003       | user3@gmail.com              | 9362000002     | Oliver            |\n| uid_0004       | user4@gmail.com              | 9362000003     | Elijah            |\n| uid_0005       | user5@gmail.com              | 9362000004     | James             |\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c74bf344-3943-4a47-941e-9aa083715cf1",
      "name": "Note adhésive 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        1100
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 220,
        "content": "# Example of Databases📋\n"
      },
      "typeVersion": 1
    },
    {
      "id": "68522da8-5016-443d-9ff7-3fb5b6cb3d6b",
      "name": "Note adhésive 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 720,
        "height": 1300,
        "content": "# 📌 Node-by-Node Description (MailerSend eCRM)\n\n### 🧱 Setup Flow\n• Select campaign by setting `template_id`.\n\n### 📄 Get Templates (Google Sheets)\n• Load all rows from `template` sheet.\n\n### 🎯 Filter Template\n• Keep only the template matching `template_id`.\n\n### 👥 Get Users (CDP Sheet)\n• Read users from `segment` sheet (email + first name required).\n\n### ➕ Add to Transaction (0-processing)\n• Create a record in `transaction` sheet for each user.\n\n### 🔍 Fetch Processing Rows\n• Select rows where `status = 0-processing`.\n\n### 🚫 Remove Duplicates\n• Keep only 1 record per `user_id`.\n\n### 🔁 Update Status (1-sending)\n• Mark users as ready to send: `status = 1-sending`.\n\n### ⏱️ Schedule Trigger\n• Runs every 30 min → continues sending in background.\n\n### 📌 Fetch Sending Rows\n• Select rows where `status = 1-sending`.\n\n### ✉️ Email Exists?\n• If empty → `status = 3-no-email`.\n\n### 🛡️ Disposable Check\n• If disposable → `status = 4-disposal-email`.\n\n### 📬 MailerSend Send Email\n• Sends template email using:\n  - `type_template_id` (MailerSend Template ID, text)\n  - personalization: first_name, discount_code, gift_code\n\n### ✅ Update to 2-sent\n• Save:\n  - status: `2-sent`\n  - sent_at\n  - sent_result (message ID)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fd666783-f039-49cb-9158-e64f0424b0ec",
      "name": "Si l'e-mail n'est pas vide",
      "type": "n8n-nodes-base.if",
      "position": [
        2240,
        380
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3df05c9a-ebe6-4126-9143-2b24066fde58",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.email }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "588eb175-9d20-482a-947b-d49c6b1511ef",
      "name": "Note adhésive 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        20
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 80,
        "content": "# 📝 Insert user_id"
      },
      "typeVersion": 1
    },
    {
      "id": "2359c11c-fecc-4ea4-9d16-14902a3a3cf1",
      "name": "Note adhésive 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        80
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 80,
        "content": "# ✉️ Sending Email"
      },
      "typeVersion": 1
    },
    {
      "id": "9d1dc07c-4f18-4524-923d-a1044bae5faa",
      "name": "Vérification de suppression",
      "type": "n8n-nodes-base.if",
      "position": [
        2460,
        300
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "e5fd1b3e-9575-4bfa-ae7a-fe65943fbebc",
              "operator": {
                "type": "string",
                "operation": "notRegex"
              },
              "leftValue": "{{ $json.email }}",
              "rightValue": ".*(temp|abc|1234|yopmail|protonmail|mailinator|\\.cc|bigbester|fake|spam|gdf|sdf|mr123|passinbox|landininbox|@inbox|random|anony|mymail|mail\\.ru|\\.buzz|asdasd|asf|simplelogin|simplelogin\\.com|silomails\\.com|slmails\\.com|simplelogin\\.fr|aleeas\\.com|slmail\\.me|8shield\\.net|dralias\\.com|passinbox\\.com|passfwd\\.com|passmail\\.com|passmail\\.net|simplelogin\\.co|simplelogin\\.io|duck\\.com|mozmail\\.com|anonaddy\\.com|anonaddy\\.me|trash|guerrilla|getnada|owly|mvrht|sharklasers|anonbox).*"
            }
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "acbdbe02-1f83-4d34-97f1-d9fdf66c0652",
      "name": "Obtenir user_id depuis cdp",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        920,
        240
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "={{ $json.database_id }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "17KqltP-NqchPhZV7gk6QToqCZX6IiA5EBkDCBNsIX_0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17KqltP-NqchPhZV7gk6QToqCZX6IiA5EBkDCBNsIX_0/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "a3a0ce7f-466d-4f7d-a789-1c2adbf22e30",
      "name": "Ajouter des enregistrements par statut Traitement",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        220,
        560
      ],
      "parameters": {
        "columns": {
          "value": {
            "type": "={{ $json.type }}",
            "email": "={{ $json.email }}",
            "number": "={{ $json.number }}",
            "status": "0-processing",
            "journey": "={{ $json.journey }}",
            "user_id": "={{ $json.user_id }}",
            "CreatedAt": "={{ $('Schedule Trigger').item.json.timestamp }}",
            "UpdatedAt": "={{ $('Schedule Trigger').item.json.timestamp }}",
            "gift_code": "={{ $json.gift_code }}",
            "first_name": "={{ $json.first_name }}",
            "database_id": "={{ $json.database_id }}",
            "template_id": "={{ $json.template_id }}",
            "discount_code": "={{ $json.discount_code }}",
            "template_name": "={{ $json.template_name }}",
            "type_template_id": "={{ $json.type_template_id }}"
          },
          "schema": [
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "user_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "database_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "database_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_template_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "type_template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "template_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "journey",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "journey",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sent_result",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "sent_result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "discount_code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "discount_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gift_code",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "gift_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "7f85d42d-c21d-46d6-a61d-f021ed619153",
      "name": "Insérer des données par statut Traitement",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        640,
        560
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "0-processing",
              "lookupColumn": "status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.6
    },
    {
      "id": "5232fd36-adc4-4a78-bb09-af5e880a82bf",
      "name": "Changer le statut à Envoi",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        660
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "1-sending",
            "user_id": "={{ $json.user_id }}",
            "UpdatedAt": "={{ $('Schedule Trigger').item.json.timestamp }}"
          },
          "schema": [
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "number",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "database_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "database_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type_template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "journey",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "journey",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sent_result",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "sent_result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "discount_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "discount_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gift_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "gift_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "d099864f-5ec0-42a3-b5c8-d443a9606a32",
      "name": "Insérer des données par statut Envoi",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1780,
        460
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "1-sending",
              "lookupColumn": "status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.6
    },
    {
      "id": "af7b1c39-99db-4da7-8210-420347a57503",
      "name": "Pas de mise à jour d'e-mail",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2460,
        560
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "3-no-email",
            "user_id": "={{ $json.user_id }}",
            "UpdatedAt": "={{ $('Schedule Trigger1').item.json.timestamp }}"
          },
          "schema": [
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "number",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "database_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "database_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type_template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "journey",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "journey",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sent_result",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "sent_result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "discount_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "discount_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gift_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "gift_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17KqltP-NqchPhZV7gk6QToqCZX6IiA5EBkDCBNsIX_0/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "f99dae69-12d7-48bf-acd3-4d43defa01c9",
      "name": "Mise à jour d'e-mail supprimé",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2700,
        420
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "4-disposal-email",
            "user_id": "={{ $json.user_id }}",
            "UpdatedAt": "={{ $('Schedule Trigger1').item.json.timestamp }}"
          },
          "schema": [
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "number",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "database_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "database_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type_template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "journey",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "journey",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sent_result",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "sent_result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "discount_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "discount_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gift_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "gift_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17KqltP-NqchPhZV7gk6QToqCZX6IiA5EBkDCBNsIX_0/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "f0fb7eee-caee-4f5c-86b6-882b6390c9bb",
      "name": "Mettre à jour le statut : 2-Envoyé",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3140,
        220
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "2-sent",
            "user_id": "={{ $json.user_id }}",
            "UpdatedAt": "={{ $('Schedule Trigger1').item.json.timestamp }}"
          },
          "schema": [
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "user_id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "user_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "number",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "first_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "first_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "database_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "database_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type_template_id",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "type_template_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "template_name",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "template_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "journey",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "journey",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sent_result",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "sent_result",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "discount_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "discount_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "gift_code",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "gift_code",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1746603725,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/17KqltP-NqchPhZV7gk6QToqCZX6IiA5EBkDCBNsIX_0/edit#gid=1746603725",
          "cachedResultName": "transaction"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "37b87499-d9d8-4274-9fc2-5a7b73384d77",
      "name": "Obtenir tous les modèles de flux depuis Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        220,
        160
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit#gid=0",
          "cachedResultName": "template"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jK0xlp7-_JPDz5uMTUN0Hac7vFxAv8ZEvD10kwnJXrw/edit?usp=drivesdk",
          "cachedResultName": "Automate-Email-Marketing-Campaigns MailerSend | n8n"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "A3ebjIB2M27srsju",
          "name": "Nima40"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "00401910-2157-47ee-a73c-385694db6345",
      "name": "Note adhésive 8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 660,
        "height": 240,
        "content": "# 📄 Transaction Sheet (Copy This)\n\nAll example data for this workflow is already prepared ✅  \nOpen the Google Sheet below and copy the **Transaction** tab:\n\n🔗 Google Sheet:\nhttps://docs.google.com/spreadsheets/d/17KqltP-NqchPhZV7gk6QToqCZX6IiA5EBkDCBNsIX_0/edit?usp=sharing\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ddcaa8e2-5fb8-4953-971c-a2d42bcbe1a0",
      "name": "Envoyer un modèle HTML Mailerlite",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2760,
        220
      ],
      "parameters": {
        "url": "https://api.mailersend.com/v1/email",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"from\": {\n    \"email\": \"info@example.com\"\n  },\n  \"to\": [\n    {\n      \"email\": \"{{ $json.email }}\"\n    }\n  ],\n  \"template_id\": \"{{ $json.type_template_id }}\",\n  \"personalization\": [\n    {\n      \"email\": \"{{ $json.email }}\",\n      \"data\": {\n        \"first_name\": \"{{ $json.first_name }}\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "X-Requested-With",
              "value": "XMLHttpRequest"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "ipwzCWBxUO1BQJhe",
          "name": "MailerSend2 - Test"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d528c926-e075-48d6-aa00-16b1720c7cac",
      "name": "Note adhésive 9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        140
      ],
      "parameters": {
        "color": 5,
        "width": 1780,
        "height": 660,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "be5abdba-ae74-4d43-b6f8-0bea73e1ed03",
      "name": "Note adhésive 10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        80
      ],
      "parameters": {
        "color": 5,
        "width": 1620,
        "height": 760,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b5564b95-2824-4066-be2c-3bf9f815a7bf",
      "name": "Note adhésive 12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2600,
        -380
      ],
      "parameters": {
        "width": 460,
        "height": 780,
        "content": "# ✉️ MailerSend Send Email\n\nThis node sends the campaign email to each valid subscriber.\n\n✅ Uses MailerSend Template ID from:\n• `type_template_id` field in template sheet (string)\n\n✅ Personalization fields:\n• first_name\n• discount_code\n• gift_code\n\n⚠️ Required Setup:\n👉 Edit the \"from\" field inside the JSON:\n\"from\": {\n  \"email\": \"YOUR_SENDER_EMAIL@here.com\"\n}\n\nThis email must be:\n✅ Verified inside MailerSend Dashboard\n✅ Approved by MailerSend to avoid blocked sends\n\n📌 Output values saved:\n• sent_result → MailerSend Message ID\n• sent_at → Timestamp\n• status → `2-sent`\n\nTip 🧠: Test with your own email first before going live."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ed416c60-3f9f-48b3-851a-cc5e19546707",
  "connections": {
    "eea2dd6c-2cec-47a5-ba0e-e49cbeb38280": {
      "main": [
        [
          {
            "node": "7f85d42d-c21d-46d6-a61d-f021ed619153",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bdcdfb37-6e24-4b08-b665-570575a7770a": {
      "main": [
        [
          {
            "node": "a3a0ce7f-466d-4f7d-a789-1c2adbf22e30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a7964cef-e8bc-4b59-8f4e-47a7396c5877": {
      "main": [
        [
          {
            "node": "37b87499-d9d8-4274-9fc2-5a7b73384d77",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3881117a-f258-4efe-9c81-ac40e9fe9b4a": {
      "main": [
        [
          {
            "node": "fd666783-f039-49cb-9158-e64f0424b0ec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9d1dc07c-4f18-4524-923d-a1044bae5faa": {
      "main": [
        [
          {
            "node": "ddcaa8e2-5fb8-4953-971c-a2d42bcbe1a0",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "f99dae69-12d7-48bf-acd3-4d43defa01c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "18e97315-1c69-420a-9849-589914b40f65": {
      "main": [
        [
          {
            "node": "c0795f4f-7588-422a-b783-f9718ac640df",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "956055e1-996a-4adc-9b04-933c0f8adfac": {
      "main": [
        [
          {
            "node": "a7964cef-e8bc-4b59-8f4e-47a7396c5877",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a07ff8e2-b738-4e2a-9a0b-ac501d03eeda": {
      "main": [
        [
          {
            "node": "5232fd36-adc4-4a78-bb09-af5e880a82bf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aaf86910-cbf0-4abc-9f44-e855930077fe": {
      "main": [
        [
          {
            "node": "d099864f-5ec0-42a3-b5c8-d443a9606a32",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "acbdbe02-1f83-4d34-97f1-d9fdf66c0652": {
      "main": [
        [
          {
            "node": "7d9fa178-95e5-417d-9321-ebb6f903afaa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fd666783-f039-49cb-9158-e64f0424b0ec": {
      "main": [
        [
          {
            "node": "9d1dc07c-4f18-4524-923d-a1044bae5faa",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "af7b1c39-99db-4da7-8210-420347a57503",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7d9fa178-95e5-417d-9321-ebb6f903afaa": {
      "main": [
        [
          {
            "node": "bdcdfb37-6e24-4b08-b665-570575a7770a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c0795f4f-7588-422a-b783-f9718ac640df": {
      "main": [
        [
          {
            "node": "acbdbe02-1f83-4d34-97f1-d9fdf66c0652",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d099864f-5ec0-42a3-b5c8-d443a9606a32": {
      "main": [
        [
          {
            "node": "3881117a-f258-4efe-9c81-ac40e9fe9b4a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a3a0ce7f-466d-4f7d-a789-1c2adbf22e30": {
      "main": [
        [
          {
            "node": "eea2dd6c-2cec-47a5-ba0e-e49cbeb38280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7f85d42d-c21d-46d6-a61d-f021ed619153": {
      "main": [
        [
          {
            "node": "a07ff8e2-b738-4e2a-9a0b-ac501d03eeda",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ddcaa8e2-5fb8-4953-971c-a2d42bcbe1a0": {
      "main": [
        [
          {
            "node": "f0fb7eee-caee-4f5c-86b6-882b6390c9bb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "37b87499-d9d8-4274-9fc2-5a7b73384d77": {
      "main": [
        [
          {
            "node": "18e97315-1c69-420a-9849-589914b40f65",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Réseaux sociaux

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds34
Catégorie1
Types de nœuds9
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Nima Salimi

Nima Salimi

@salimi

- Marketing Automation Specialist - Marketing Workflow Architect - Optimizing Marketing Processes

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34