Création automatique d'abonnés Beehiiv à partir des abonnements aux canaux Systeme.io

Intermédiaire

Ceci est unSocial Mediaworkflow d'automatisation du domainecontenant 11 nœuds.Utilise principalement des nœuds comme If, Set, Gmail, Webhook, HttpRequest. Création automatique d'abonnés Beehiiv à partir des abonnements de canaux Systeme.io

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Point de terminaison HTTP Webhook (généré automatiquement par n8n)
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
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": "FwN3BphNMsHcoKWs",
  "meta": {
    "instanceId": "d0d71f2b19047684364bc40e1849decba4ddefa59c8eafc13c3b9455fdec45b5",
    "templateCredsSetupCompleted": true
  },
  "name": "Create new Beehiiv subscribers from new Systeme.io optins (funnel level)",
  "tags": [],
  "nodes": [
    {
      "id": "6617a5d6-38a5-44e9-a42e-c4b89ebcf2a7",
      "name": "Nettoyer les données",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        0
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"email\": \"{{ $('On New Systeme.io Optin').item.json.body.data.contact.email }}\",\n  \"first_name\": \"{{ $('On New Systeme.io Optin').item.json.body.data.contact.fields.first_name ?? \"\" }}\",\n  \"last_name\" : \"{{ $('On New Systeme.io Optin').item.json.body.data.contact.fields.surname ?? \"\" }}\",\n  \"referring_site\" : \"{{ $('On New Systeme.io Optin').item.json.body.data.source_url.replace(/\\?.*$/, '') }}\",\n  \"utm_source\" : \"{{ $('On New Systeme.io Optin').item.json.body.data.source_url.match(/[?&]utm_source=([^&]*)/)?.[1] ?? \"\" }}\",\n  \"utm_medium\" : \"{{ $('On New Systeme.io Optin').item.json.body.data.source_url.match(/[?&]utm_medium=([^&]*)/)?.[1] ?? \"\" }}\",\n  \"utm_campaign\" : \"{{ $('On New Systeme.io Optin').item.json.body.data.source_url.match(/[?&]utm_campaign=([^&]*)/)?.[1] ?? \"\" }}\"\n}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "dca87621-6a51-4a02-a597-2d53ad59d793",
      "name": "Créer un nouvel abonné Beehiiv",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -460,
        0
      ],
      "parameters": {
        "url": "=https://api.beehiiv.com/v2/publications/{{ $('Configure Workflow').item.json.beehiiv_publication_id }}/subscriptions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "fullResponse": true
            }
          }
        },
        "jsonBody": "={\n  \"email\": \"{{ $json.email }}\",\n  \"utm_source\": \"{{ $json.utm_source }}\",\n  \"utm_medium\": \"{{ $json.utm_medium }}\",\n  \"utm_campaign\": \"{{ $json.utm_campaign }}\",\n  \"referring_site\": \"{{ $json.referring_site }}\",\n  \"custom_fields\": [\n    {\n      \"name\": \"{{ $('Configure Workflow').item.json.beehiiv_firstname_field_name }}\",\n      \"value\": \"{{ $json.first_name }}\"\n    },\n    {\n      \"name\": \"{{ $('Configure Workflow').item.json.beehiiv_lastname_field_name }}\",\n      \"value\": \"{{ $json.last_name }}\"\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bff73db0-e3f8-4760-b2ab-3be9ccc32558",
      "name": "Abonné créé ?",
      "type": "n8n-nodes-base.if",
      "position": [
        -140,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "10a13ffe-eea9-4c39-83fc-82ada98ac937",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.statusCode }}",
              "rightValue": 200
            },
            {
              "id": "8fedd56c-32c2-4b15-994f-c94584d0d263",
              "operator": {
                "type": "number",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.statusCode }}",
              "rightValue": 201
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0c157ba4-1df6-4da9-90e7-073c6d328446",
      "name": "Envoyer une alerte par email (erreur Beehiiv API)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        200,
        -20
      ],
      "webhookId": "b9d07bd0-fb14-43ae-ade4-f546ba6ec44b",
      "parameters": {
        "sendTo": "={{ $('Configure Workflow').item.json.email_alert_recipients }}",
        "message": "=An error occurred while calling the Beehiiv API and the workflow has stopped.\n\nSubscriber affected: {{ $('Clean Data').item.json.email }}\nError status: {{ $json.body.statusText }} ({{ $json.body.status }})\nError message: {{ $json.body.errors[0].message }}",
        "options": {},
        "subject": "Systeme.io > Beehiiv Synchronization Error",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "fabbd076-4a33-4675-bf32-3da4c746b4d5",
      "name": "Configurer le workflow",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8d8477f3-229b-4273-ac12-b849befcc52b",
              "name": "beehiiv_publication_id",
              "type": "string",
              "value": "pub_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
            },
            {
              "id": "f4f80520-c182-45c0-81b2-00cd628e6ccf",
              "name": "beehiiv_firstname_field_name",
              "type": "string",
              "value": "firstname"
            },
            {
              "id": "a01fb97c-9bb9-4430-8fee-eb196d7a58be",
              "name": "beehiiv_lastname_field_name",
              "type": "string",
              "value": "lastname"
            },
            {
              "id": "253d55e0-f557-46cf-a69c-0e7a685bdd8a",
              "name": "email_alert_recipients",
              "type": "string",
              "value": "recipient@example.com"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f92affac-9a1b-4f0e-bf14-877b5fc5719b",
      "name": "Note adhésive 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2200,
        -520
      ],
      "parameters": {
        "width": 540,
        "height": 1360,
        "content": "## Create New Beehiiv Subscribers From New Systeme.io Optins (Funnel Level)\n\n### ℹ️ About\nThis workflow automatically creates a subscriber in a given Beehiiv publication when a new opt-in is registered in a given Systeme.io sales funnel.\n\n**Good to know:** the integration with Systeme.io is done at the sales funnel level, not at the account level. If you have several sales funnels, you can use the same workflow several times.\n\n### ⚡️ Quick Setup\n\n1. Configure your sales funnel in Systeme.io to [create and trigger a webhook after an opt-in](https://help.systeme.io/article/144-how-to-create-and-trigger-a-webhook-after-an-opt-in-or-a-sale)\n    - 1. Open the **“On New Systeme.io Optin”** node to find the webhook URL needed to configure your sales funnel on Systeme.io\n2. Configure the “**Configure Workflow”** node\n    - Add your [Beehiiv publication ID](https://www.beehiiv.com/support/article/13091918395799-how-to-access-your-publication-id-or-api-keys)\n    - If you know the subscriber's first and last name and want to send it to Beehiiv, [configure the custom field names for first and last name](https://www.beehiiv.com/support/article/7712894720023-using-custom-fields-with-your-subscribers)\n    - Add one or more email addresses to which to send alert notifications in the event of a problem (separated by commas).\n3. If you have not already done so :\n    - Connect your Beehiiv account in the **“Create New Beehiiv Subscriber”** node\n    - Connect your Gmail account in the **“Send Email Alert (Beehiiv API error)”** node\n\n### 🔧 How It Works\n\n1. As soon as a new opt-in is registered on your sales funnel, Systeme.io triggers the workflow (via a webhook)\n    - Only requests actually coming from Systeme.io are considered (whitelisting of their IP addresses for security reasons)\n2. A new subscriber is added to your Beehiiv publication (via an API call)\n    - If available in Systeme.io, UTM tags (utm_source, utm_medium and utm_campaign) are transferred to Beehiiv to correctly track where your subscribers are coming from\n3. If an error occurs during the Beehiiv API call, an alert notification is sent to you (via email)\n\n### ⚠️ Requirements\n\n1. A [Systeme.io](https://systeme.io/) account\n2. A [Beehiiv](https://www.beehiiv.com/) account with an active publication\n3. A Gmail account\n\n### 💪 Benefits\n\n- Automate & scale your email marketing efforts seamlessly\n- No more manual tasks to keep your subscriber list always up-to-date\n- Focus on creating a newsletter that stands out, not on the technical side\n\n### 😍 Check Out My Other Templates\n\n👉 https://n8n.io/creators/belmehel/"
      },
      "typeVersion": 1
    },
    {
      "id": "219788ed-5d46-494f-822a-20c7279a0f6a",
      "name": "Note adhésive 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1560,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 380,
        "content": "Automatically triggered with each new opt-in on your sales funnel\n\nOpen the node to find the **webhook URL** needed to configure your sales funnel on Systeme.io"
      },
      "typeVersion": 1
    },
    {
      "id": "09e191c2-2dc6-4d60-aeb2-aacfa794655f",
      "name": "Note adhésive 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 380,
        "content": "## To configure\n\nSet the values to these 4 variables:\n- beehiiv_publication_id\n- beehiiv_firstname_field_name\n- beehiiv_lastname_field_name\n- email_alert_recipients"
      },
      "typeVersion": 1
    },
    {
      "id": "6a600c9d-c6d4-417d-a33a-d9d49b714fb4",
      "name": "Note adhésive 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 380,
        "content": "## To configure\n\nConnect your Beehiiv account ([how to find your API key](https://www.beehiiv.com/support/article/13091918395799-how-to-access-your-publication-id-or-api-keys))."
      },
      "typeVersion": 1
    },
    {
      "id": "0af8282c-9ff8-44fa-a010-b59f6e202dad",
      "name": "Note adhésive 8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 380,
        "content": "## To configure\n\nConnect your Gmail account."
      },
      "typeVersion": 1
    },
    {
      "id": "5f56e65b-c56a-45e6-a7ef-434bb371f221",
      "name": "Sur nouvelle inscription Systeme.io",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1480,
        0
      ],
      "webhookId": "22568356-6d38-46ee-a402-9f0e1f06643a",
      "parameters": {
        "path": "funnel-level",
        "options": {
          "ipWhitelist": "185.236.142.1, 185.236.142.2, 185.236.142.3"
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9e252eb4-eaf3-403b-9f57-3a56bd00e8e1",
  "connections": {
    "6617a5d6-38a5-44e9-a42e-c4b89ebcf2a7": {
      "main": [
        [
          {
            "node": "dca87621-6a51-4a02-a597-2d53ad59d793",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fabbd076-4a33-4675-bf32-3da4c746b4d5": {
      "main": [
        [
          {
            "node": "6617a5d6-38a5-44e9-a42e-c4b89ebcf2a7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bff73db0-e3f8-4760-b2ab-3be9ccc32558": {
      "main": [
        [
          {
            "node": "0c157ba4-1df6-4da9-90e7-073c6d328446",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "5f56e65b-c56a-45e6-a7ef-434bb371f221": {
      "main": [
        [
          {
            "node": "fabbd076-4a33-4675-bf32-3da4c746b4d5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dca87621-6a51-4a02-a597-2d53ad59d793": {
      "main": [
        [
          {
            "node": "bff73db0-e3f8-4760-b2ab-3be9ccc32558",
            "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é ?

Intermédiaire - 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é
Intermédiaire
Nombre de nœuds11
Catégorie1
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34