Générer des communiqués de presse et des matériaux rédigés par l'IA pour les contacts HubSpot et SharePoint

Avancé

Ceci est unSocial Media, Multimodal AIworkflow d'automatisation du domainecontenant 49 nœuds.Utilise principalement des nœuds comme If, Set, Code, Wait, Gmail. Créer des communiqués de presse bilingues pour HubSpot et SharePoint avec GPT-4o, images et vidéos IA

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Clé API HubSpot
  • Point de terminaison HTTP Webhook (généré automatiquement par n8n)
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Clé API OpenAI
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": "uDKEstwhHliXI4z5",
  "meta": {
    "instanceId": "2cf742429c2e3ee4e5a20069d3d8a75208519303b864f026a79464efa726bd95"
  },
  "name": "Generate AI-written newsletter and assets to HubSpot contacts and SharePoint",
  "tags": [
    {
      "id": "wpMIpESnBZpdPCpj",
      "name": "Marketing",
      "createdAt": "2025-06-03T11:38:37.020Z",
      "updatedAt": "2025-06-03T11:38:37.020Z"
    }
  ],
  "nodes": [
    {
      "id": "6ed4d301-86cb-4361-99d6-38e9d3dbf9fa",
      "name": "Construire le bulletin",
      "type": "n8n-nodes-base.code",
      "position": [
        3564,
        650
      ],
      "parameters": {
        "jsCode": "// Get the raw AI output (string with possible markdown)\nlet rawOutput = $node[\"AI Agent\"].json.output;\n\n// Strip markdown code block if present (```json ... ```)\nrawOutput = rawOutput.replace(/```json|```/g, '').trim();\n\n// Parse cleaned JSON string\nconst aiContent = JSON.parse(rawOutput);\n\n// Get template and selected topic\nconst templateContent = $node[\"Get Template Content\"].json.data;\nconst selectedTopic = $json.Selected_Topic || 'Thema fehlt';\n\n// Helper for safe replacements\nconst getSafe = (obj, key) => obj?.[key] ?? 'undefined';\n\n// Replace placeholders for German content\nlet newsletterContent = templateContent;\nnewsletterContent = newsletterContent.replace(/\\{\\{INTRODUCTION_DE\\}\\}/g, getSafe(aiContent, 'INTRODUCTION_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TOPIC_DE\\}\\}/g, getSafe(aiContent, 'TOPIC_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{DESCRIPTION_DE\\}\\}/g, getSafe(aiContent, 'DESCRIPTION_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER1_DE\\}\\}/g, getSafe(aiContent, 'TEASER1_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER2_DE\\}\\}/g, getSafe(aiContent, 'TEASER2_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER3_DE\\}\\}/g, getSafe(aiContent, 'TEASER3_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{CTA_DE\\}\\}/g, getSafe(aiContent, 'CTA_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_TEXT_DE\\}\\}/g, getSafe(aiContent, 'FOOTER_TEXT_DE'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_NAME_DE\\}\\}/g, getSafe(aiContent, 'FOOTER_NAME_DE'));\n\n// Replace placeholders for English content\nnewsletterContent = newsletterContent.replace(/\\{\\{TOPIC_TITLE_EN\\}\\}/g, getSafe(aiContent, 'TOPIC_TITLE_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{INTRODUCTION_EN\\}\\}/g, getSafe(aiContent, 'INTRODUCTION_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TOPIC_EN\\}\\}/g, getSafe(aiContent, 'TOPIC_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{DESCRIPTION_EN\\}\\}/g, getSafe(aiContent, 'DESCRIPTION_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER1_EN\\}\\}/g, getSafe(aiContent, 'TEASER1_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER2_EN\\}\\}/g, getSafe(aiContent, 'TEASER2_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{TEASER3_EN\\}\\}/g, getSafe(aiContent, 'TEASER3_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{CTA_EN\\}\\}/g, getSafe(aiContent, 'CTA_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_TEXT_EN\\}\\}/g, getSafe(aiContent, 'FOOTER_TEXT_EN'));\nnewsletterContent = newsletterContent.replace(/\\{\\{FOOTER_NAME_EN\\}\\}/g, getSafe(aiContent, 'FOOTER_NAME_EN'));\n\n// Add date if needed (you can add this to template if required)\nnewsletterContent = newsletterContent.replace(/\\{\\{DATE\\}\\}/g, new Date().toLocaleDateString('de-DE'));\n\n// Return final output\nreturn {\n  json: {\n    newsletter_content: newsletterContent,\n    topic: selectedTopic,\n    topic_de: getSafe(aiContent, 'TOPIC_DE'),\n    topic_en: getSafe(aiContent, 'TOPIC_EN'),\n    generated_date: new Date().toISOString(),\n    // Include all generated content for debugging/reference\n    ai_content: aiContent\n  }\n}; "
      },
      "typeVersion": 1
    },
    {
      "id": "1fc3146e-600b-4d86-8ef7-9b319af09994",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2748,
        650
      ],
      "parameters": {
        "text": "=You are a marketing copywriter tasked with creating content for a B2B newsletter on newly released features of plemeo.ai.\nplemeo.ai is an AI-powered business automation platform designed for SMEs and enterprise teams. It combines configurable AI agents with deep system integrations (e.g., email, calendar, CRM, voice, ads) to automate workflows such as meeting scheduling, customer communication, reporting, and document handling. It supports both cloud-based (EU-hosted) and on-premise deployments—offering secure, modular process automation without requiring large IT migrations.\n\n** NEW FEATURES **\n{{ $('Receive Request').first().json.body.text }}\n\nThe newsletter template uses the following structure for BOTH German and English versions:\n\n**German Content:**\n- {INTRODUCTION_DE}: A 2–3 sentence engaging intro that outlines why the topic is relevant now\n- {TOPIC_DE}: The main topic/headline for the section (max. 8 words)\n- {DESCRIPTION_DE}: A detailed description of what's new or important about this topic (3-4 sentences)\n- {TEASER1_DE}, {TEASER2_DE}, {TEASER3_DE}: Three highlight points showcasing key benefits, insights, or developments (1-2 sentences each)\n- {CTA_DE}: A compelling call-to-action encouraging engagement (max. 20 words)\n- {FOOTER_TEXT_DE}: Professional closing message (1-2 sentences)\n- {FOOTER_NAME_DE}: Sender name/signature\n\n**English Content:**\n- {TOPIC_TITLE_EN}: Main newsletter title in English (max. 8 words)\n- {INTRODUCTION_EN}: English version of the engaging intro (2–3 sentences)\n- {TOPIC_EN}: English version of the main topic/headline (max. 8 words)\n- {DESCRIPTION_EN}: English version of the detailed description (3-4 sentences)\n- {TEASER1_EN}, {TEASER2_EN}, {TEASER3_EN}: English versions of the three highlight points (1-2 sentences each)\n- {CTA_EN}: English version of the call-to-action (max. 20 words)\n- {FOOTER_TEXT_EN}: English version of professional closing message (1-2 sentences)\n- {FOOTER_NAME_EN}: English version sender name/signature\n\nTone: professional but accessible, informative, slightly optimistic  \nAudience: decision-makers and professionals in marketing, tech, and innovation roles\n\nPlease return the result as structured JSON in this format:\n\n```json\n{\n  \"INTRODUCTION_DE\": \"\",\n  \"TOPIC_DE\": \"\",\n  \"DESCRIPTION_DE\": \"\",\n  \"TEASER1_DE\": \"\",\n  \"TEASER2_DE\": \"\",\n  \"TEASER3_DE\": \"\",\n  \"CTA_DE\": \"\",\n  \"FOOTER_TEXT_DE\": \"\",\n  \"FOOTER_NAME_DE\": \"\",\n  \"TOPIC_TITLE_EN\": \"\",\n  \"INTRODUCTION_EN\": \"\",\n  \"TOPIC_EN\": \"\",\n  \"DESCRIPTION_EN\": \"\",\n  \"TEASER1_EN\": \"\",\n  \"TEASER2_EN\": \"\",\n  \"TEASER3_EN\": \"\",\n  \"CTA_EN\": \"\",\n  \"FOOTER_TEXT_EN\": \"\",\n  \"FOOTER_NAME_EN\": \"\"\n}\n```",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "0b7429c4-58c7-4b8f-a9df-36c02c65581f",
      "name": "Obtenir le modèle de bulletin",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        3124,
        650
      ],
      "parameters": {
        "file": {
          "__rl": true,
          "mode": "list",
          "value": "01M45PWAZJXIV2AOHITFCL5DPA4QV764XS",
          "cachedResultName": "newsletter_template.html"
        },
        "site": {
          "__rl": true,
          "mode": "list",
          "value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
          "cachedResultName": "plemeo"
        },
        "folder": {
          "__rl": true,
          "mode": "list",
          "value": "01M45PWAZCILJ3WHMIXBGZA2UP2JMQ5CXO",
          "cachedResultName": "Newsletter Workflow"
        },
        "requestOptions": {}
      },
      "credentials": {
        "microsoftSharePointOAuth2Api": {
          "id": "jZkLTQXyVEzxtmp3",
          "name": "Microsoft SharePoint account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c5732faf-550a-43f6-bbc5-6fd5738a6452",
      "name": "Commutateur",
      "type": "n8n-nodes-base.switch",
      "position": [
        680,
        160
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0de41f03-c4cc-45d8-bb11-0458995cdb2d",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Configuration Settings').first().json.ENV_INCLUDE_VIDEO }}",
                    "rightValue": "true"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9ebba67d-70fb-4fcd-b62a-5ea6d97a0a3c",
                    "operator": {
                      "type": "boolean",
                      "operation": "false",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Configuration Settings').first().json.ENV_INCLUDE_VIDEO }}",
                    "rightValue": "false"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "37581dd4-faba-4072-a309-0f9eb1007f25",
      "name": "Obtenir la vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1640,
        -40
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $('Create FAL Video').item.json.request_id }}",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "logs",
              "value": "true"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8fa5043a-8cad-4ba3-9743-ff4bdbda4828",
      "name": "Créer une vidéo FAL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1180,
        -40
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/kling-video/v2/master/image-to-video",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "prompt",
              "value": "={{ $('Parse Fields').item.json.video_prompt }}"
            },
            {
              "name": "image_url",
              "value": "={{ $('Switch').item.json.downloadUrl }}"
            },
            {
              "name": "duration",
              "value": "={{ $('Configuration Settings').first().json.ENV_FALAI_VIDEO_DURATION }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8a24dec5-39b7-4cbc-8158-29db35319700",
      "name": "Créer l'audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2080,
        -20
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/lyria2",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "prompt",
              "value": "={{ $('Parse Fields').item.json.audio_prompt }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "346b2213-7cd1-4373-bc5c-a81a1bcc2f80",
      "name": "Obtenir l'audio",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2520,
        -20
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/lyria2/requests/{{ $('Create Audio').item.json.request_id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6bf8b37e-3ba5-4b5d-8e56-ff4cc44cb956",
      "name": "Créer une demande de fusion",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3000,
        0
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/ffmpeg-api/merge-audio-video",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "video_url",
              "value": "={{ $('Get Video').first().json.video.url }}"
            },
            {
              "name": "audio_url",
              "value": "={{ $json.audio.url }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "da586535-799c-4263-beb8-a053fae68131",
      "name": "Attendre la fusion",
      "type": "n8n-nodes-base.wait",
      "position": [
        3200,
        0
      ],
      "webhookId": "8d754d62-2b9c-43d9-9ef4-bbb63790de28",
      "parameters": {
        "amount": 50
      },
      "typeVersion": 1.1
    },
    {
      "id": "e501013d-1ad6-4399-ba46-b6382c868895",
      "name": "Obtenir la vidéo fusionnée",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        3400,
        0
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/ffmpeg-api/requests/{{ $('Create Merge Request').item.json.request_id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $('Configuration Settings').first().json.ENV_FALAI_APIKEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a5bda77c-13b6-4201-9c45-6df4df522962",
      "name": "Paramètres de configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1620,
        700
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e7c84a97-6018-4a2d-a4fa-e7565c5cd063",
              "name": "ENV_FALAI_VIDEO_DURATION",
              "type": "string",
              "value": "={{ $json.video_duration }}"
            },
            {
              "id": "431d7768-f55f-4ea8-b5db-0ca5f90b87ae",
              "name": "ENV_APPROVER_EMAIL",
              "type": "string",
              "value": "test@mail.de"
            },
            {
              "id": "f59f8ef5-853f-4457-a3e1-458f270d1955",
              "name": "ENV_INCLUDE_VIDEO",
              "type": "boolean",
              "value": "={{ $json.include_video }}"
            },
            {
              "id": "aef0d1ef-731d-4b18-b144-c810e33295fe",
              "name": "ENV_FALAI_APIKEY",
              "type": "string",
              "value": "<YOUR_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ee208f0f-dec1-4291-b8d9-e52bb9f937f3",
      "name": "Générer les prompts vidéo et audio",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1340,
        440
      ],
      "parameters": {
        "text": "=You are a Social Media Content Creator. The goal is to create a video, audio and image that will get posted along with a blog text as a blog post to the website.\nCreate a Prompt for video generation, audio generation and image generation that is in line with the usecase and the topic. The prompt should be maximum 1 sentence (short to medium length). The image should not contain any text or images that have text in it (i.e. computer screen with text). The image prompt should maximum have 110 characters.\nThe audio prompt should not be a negative prompt, the intent is to describe which melody or style of music to pick.\n\n** USER-PROMPT ***\n{{ $('Receive Request').first().json.body.text }}\n\nOutput the 3 fields in a json format with \"video_prompt\" and \"audio_prompt\" and \"image _prompt\".",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "71b500eb-f7b0-44e2-980c-35903b61824f",
      "name": "Déterminer l'intention",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2220,
        700
      ],
      "parameters": {
        "text": "=Please extract 4 fields out of the following query. Respond with a valid JSON object.\n1) \"include_video\" - boolean, if not determined \"false\"\n2) \"video_duration\" - string, if not determined \"5\". If user wants more than 5, set it to \"10\". Possible values: either \"5\" or \"10\". If the user wants less than 5, set it to \"5\".\n3) \"hubspot\" - boolean, if not determined \"true\"\n4) \"sharepoint\" - boolean, if not determined \"false\"\n\n3) and 4) are about the WF result. The user has 3 options. Either only send the generated newsletter to the hubspot contacts, or only store the Newsletter + Image/Video in the SharePoint or do both.\n\n** USER QUERY ***\n{{$('Receive Request').first().json.body.text }}\n",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "c191afa3-9e32-4be9-ad18-eb6934f26856",
      "name": "Analyser les champs",
      "type": "n8n-nodes-base.code",
      "position": [
        -940,
        440
      ],
      "parameters": {
        "jsCode": "const item = $input.first();\nlet raw = item.json.output;\n\n// Remove markdown code block wrapper if present\nraw = raw.replace(/```json\\s*|\\s*```/g, \"\");\n\n// Now parse as JSON\nconst prompts = JSON.parse(raw);\n\n// Assign as fields\nitem.json.video_prompt = prompts.video_prompt;\nitem.json.audio_prompt = prompts.audio_prompt;\nitem.json.image_prompt = prompts.image_prompt;\n// Create random 8-character filename\nitem.json.random_filename = Math.random().toString(36).substring(2, 10);\n\nreturn [item];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "7ad045e9-7200-49fa-ab06-8eac27286a8c",
      "name": "Analyser les champs d'intention",
      "type": "n8n-nodes-base.code",
      "position": [
        -1860,
        700
      ],
      "parameters": {
        "jsCode": "const item = $input.first();\nlet raw = item.json.output;\n\n// Remove markdown code block wrapper if present\nraw = raw.replace(/```json\\s*|\\s*```/g, \"\");\n\n// Now parse as JSON\nconst prompts = JSON.parse(raw);\n\n// Assign as fields\nitem.json.include_video = prompts.include_video;\nitem.json.video_duration = prompts.video_duration;\nitem.json.hubspot = prompts.hubspot;\nitem.json.sharepoint = prompts.sharepoint;\n\nreturn [item];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "6653e5da-9fe2-4c94-aefc-eab62cae217c",
      "name": "HTML en binaire",
      "type": "n8n-nodes-base.code",
      "position": [
        4780,
        40
      ],
      "parameters": {
        "jsCode": "// Convert HTML content into binary buffer\nconst html = $('Build Newsletter').first().json.newsletter_content;\nconst fileName = \"test\"\n\nreturn [{\n  binary: {\n    data: {\n      data: Buffer.from(html, 'utf8'),\n      mimeType: \"text/html\",\n      fileName: `${fileName}.html`\n    }\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3dfb0441-a990-4fea-8e70-fec8941fe402",
      "name": "TXT en binaire",
      "type": "n8n-nodes-base.code",
      "position": [
        5840,
        40
      ],
      "parameters": {
        "jsCode": "const url = $('Get Merged Video').first().json.video.url;\nconst fileName = \"video_url\";\n\nreturn [{\n  binary: {\n    data: {\n      data: Buffer.from(url, 'utf8'),\n      mimeType: \"text/plain\", // ✅ correct MIME type for .txt\n      fileName: `${fileName}.txt`\n    }\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "ab62a875-ea54-4651-bdd5-cd8441a8eced",
      "name": "JPG en binaire",
      "type": "n8n-nodes-base.code",
      "position": [
        5180,
        40
      ],
      "parameters": {
        "jsCode": "const source = $('Generate Image').first();\n\nreturn [{\n  binary: {\n    data: source.binary.data\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f70b3fde-0aeb-4d8c-ad6c-094011530a97",
      "name": "Sauvegarder l'URL vidéo si existante",
      "type": "n8n-nodes-base.if",
      "position": [
        5620,
        40
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "21f6961e-0671-4a85-bddf-939dab2e8cb0",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $('Configuration Settings').first().json.ENV_INCLUDE_VIDEO }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "10b5c038-5a10-46fb-8ced-610555db5e60",
      "name": "Téléverser HTML",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        4960,
        40
      ],
      "parameters": {
        "site": {
          "__rl": true,
          "mode": "list",
          "value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
          "cachedResultName": "plemeo"
        },
        "folder": {
          "__rl": true,
          "mode": "list",
          "value": "01M45PWA2FV7FHIIDJBFFLKUYMZUSLERBQ",
          "cachedResultName": "SEO Workflow"
        },
        "fileName": "=/{{ $('Parse Fields').first().json.random_filename }}.html",
        "operation": "upload",
        "fileContents": "=data",
        "requestOptions": {}
      },
      "credentials": {
        "microsoftSharePointOAuth2Api": {
          "id": "jZkLTQXyVEzxtmp3",
          "name": "Microsoft SharePoint account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5cd95de7-c889-494e-8fc6-ee3904d03076",
      "name": "Téléverser JPG",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        5400,
        40
      ],
      "parameters": {
        "site": {
          "__rl": true,
          "mode": "list",
          "value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
          "cachedResultName": "plemeo"
        },
        "folder": {
          "__rl": true,
          "mode": "list",
          "value": "01M45PWA2FV7FHIIDJBFFLKUYMZUSLERBQ",
          "cachedResultName": "SEO Workflow"
        },
        "fileName": "=/{{ $('Parse Fields').first().json.random_filename }}.jpg",
        "operation": "upload",
        "fileContents": "=data",
        "requestOptions": {}
      },
      "credentials": {
        "microsoftSharePointOAuth2Api": {
          "id": "jZkLTQXyVEzxtmp3",
          "name": "Microsoft SharePoint account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "21fec674-16ff-4abe-8fbd-8d9dc7a72c24",
      "name": "Téléverser l'URL vidéo",
      "type": "n8n-nodes-base.microsoftSharePoint",
      "position": [
        6060,
        40
      ],
      "parameters": {
        "site": {
          "__rl": true,
          "mode": "list",
          "value": "plemeo.sharepoint.com,f304c34c-1252-4b99-a852-059c2036c718,c3bf26ab-bf44-4334-8e5b-e8b680bb9e1d",
          "cachedResultName": "plemeo"
        },
        "folder": {
          "__rl": true,
          "mode": "list",
          "value": "01M45PWA2FV7FHIIDJBFFLKUYMZUSLERBQ",
          "cachedResultName": "SEO Workflow"
        },
        "fileName": "={{ $('Parse Fields').first().json.random_filename }}.txt",
        "operation": "upload",
        "fileContents": "=data",
        "requestOptions": {}
      },
      "credentials": {
        "microsoftSharePointOAuth2Api": {
          "id": "jZkLTQXyVEzxtmp3",
          "name": "Microsoft SharePoint account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1fd08314-fdc1-4b4f-9dfc-eb42e29dcc19",
      "name": "HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        4800,
        600
      ],
      "parameters": {
        "limit": 10,
        "operation": "getAll",
        "authentication": "appToken",
        "additionalFields": {}
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "DxBEyzhzRW6Y9afi",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2dfa50ed-8999-4baa-86de-3a72ca7b9806",
      "name": "Boucler sur les éléments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        5020,
        600
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "28a24ebf-c322-490c-8c0c-4286403d8b04",
      "name": "Résultat du workflow",
      "type": "n8n-nodes-base.switch",
      "position": [
        4460,
        320
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Hubspot and SharePoint ",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "982f0f94-2b72-44e4-99ce-27a628a7dcf3",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Parse Intent Fields').first().json.hubspot.toBoolean() && $('Parse Intent Fields').first().json.sharepoint.toBoolean() }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": "={{ true }}"
            },
            {
              "outputKey": "Only Hubspot",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "eed4e6b5-cb37-4888-ae40-30ca48b5f4af",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Parse Intent Fields').first().json.hubspot.toBoolean() }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Only SharePoint",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "84cc472e-a58b-4ed8-908c-1faa3f2c0793",
                    "operator": {
                      "type": "boolean",
                      "operation": "true",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('Parse Intent Fields').first().json.sharepoint.toBoolean() }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "ccd903d5-2059-4e5a-b2e5-71d31ddbf171",
      "name": "Envoyer un message",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        5240,
        600
      ],
      "webhookId": "38164f08-01cb-48fc-92c5-804e8bfed817",
      "parameters": {
        "subject": "plemeo.ai Newsletter",
        "bodyContent": "={{ $('Build Newsletter').item.json.newsletter_content }}\n\n<div style=\"margin-top:32px; text-align:center;\">\n  <img src=\"{{ $('Switch').item.json.downloadUrl }}\" style=\"max-width:100%; height:auto;\">\n</div>\n\n{{ $json.video?.url ? `\n  <div style=\"margin-top:24px; text-align:center;\">\n    <a href=\"${$json.video.url}\" target=\"_blank\" style=\"font-size:18px; color:#1276d3;\">\n      ▶ Watch Video\n    </a>\n  </div>\n` : '' }}",
        "toRecipients": "={{ $json['identity-profiles'][0].identities[0].value }}",
        "additionalFields": {
          "bodyContentType": "html"
        }
      },
      "credentials": {
        "microsoftOutlookOAuth2Api": {
          "id": "hslhN3xrdTbRMT9y",
          "name": "Microsoft Outlook account "
        }
      },
      "typeVersion": 2
    },
    {
      "id": "b7b4707c-a913-4e2e-9287-795bc4af01f3",
      "name": "Définir le champ Base64",
      "type": "n8n-nodes-base.set",
      "position": [
        -340,
        420
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7ba2499f-53d2-4f5c-9a4a-ee8b61a97d5b",
              "name": "base64",
              "type": "string",
              "value": "={{ $('Generate Image').item.binary.data.data }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "665669f0-f304-40a2-8cbd-32e1938f002f",
      "name": "Convertir Base64 en fichier",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -60,
        420
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "base64"
      },
      "typeVersion": 1.1
    },
    {
      "id": "f3ea111a-2be1-487c-ab04-272082a0ed7a",
      "name": "Envoyer un message et attendre la réponse",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3980,
        360
      ],
      "webhookId": "a0cba14b-bdd1-4631-ae12-11571178d1bc",
      "parameters": {
        "sendTo": "={{$('Configuration Settings').first().json.ENV_APPROVER_EMAIL}}",
        "message": "={{ $json.newsletter_content }}\n\n<div style=\"margin-top:32px; text-align:center;\">\n  <img src=\"{{ $('Switch').item.json.downloadUrl }}\" style=\"max-width:100%; height:auto;\">\n</div>\n\n\n{{ $json.video?.url ? `\n  <div style=\"margin-top:24px; text-align:center;\">\n    <a href=\"${$json.video.url}\" target=\"_blank\" style=\"font-size:18px; color:#1276d3;\">\n      ▶ Watch Video\n    </a>\n  </div>\n` : '' }}\n",
        "options": {},
        "subject": "Newsletter Approval",
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "fBvSTCpGJatuzJAy",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2dea2ea9-bd02-4456-b05c-c021991cb8ec",
      "name": "Note autocollante",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2940,
        -420
      ],
      "parameters": {
        "width": 1360,
        "height": 900,
        "content": "## Who’s it for  \nMarketing, growth, and automation teams that need to ship polished bilingual newsletters—complete with images, optional video, and multi-channel distribution—without writing a line of code.\n\n## How it works / What it does  \n1. A **Webhook** receives a plain-language request (e.g. “Create a newsletter about XYZ and store it in SharePoint”). The **Webhook** can be changed to another trigger, fr example **Manual Trigger**.\n2. An **AI Agent** (OpenAI GPT-4o) drafts German & English newsletter copy following a strict JSON schema.  \n3. **SharePoint** fetches an HTML template; a **Code** node injects AI copy into the placeholders.  \n4. Optional creative assets:  \n   - **Pollinations AI** → image (resolution check & frame overlay)  \n   - **FAL AI** → short video + Lyria2 audio → merged via FFmpeg API  \n5. A **Gmail Approval** step sends the draft to an approver; the flow continues only on “Approve”.  \n6. Depending on user intent the workflow:  \n   - Emails the newsletter to **HubSpot** contacts, and/or  \n   - Saves HTML (+ JPG/Video URL) to a **SharePoint** library.  \n\n## How to set up  \n1. Import the template\n2. Open the yellow sticky note and follow the checklist \n   - Create credentials for OpenAI, HubSpot (App Token), Microsoft 365, Gmail, and FAL AI.  \n   - Enter them in n8n Credential Manager (never in the HTTP node).  \n3. Edit the **Configuration Settings** Set node with your ENV_* variables.   \n4. Activate the workflow, copy the production Webhook URL, and trigger it with JSON body `{ \"text\": \"…\" }` or with a desired trigger.\n\n## Requirements  \n- OpenAI account\n- Microsoft 365 tenant (SharePoint & Outlook)  \n- HubSpot App Token  \n- FAL AI API Key (video & audio generation)  \n\n## How to customize  \n- Want a different language? Tweak the AI prompt inside **AI Agent**.  \n- Want a different storage provider? Change the SharePoint nodes to Google Drive or Dropbox.\n- Skip video generation: set `include_video` to `false` in the incoming prompt.  \n- Change the distribution logic by adjusting the **WF Result** Switch node.  \n- Add more channels (e.g. Slack) by inserting additional branches after the Switch and modifying the intent determination at the beginning of the workflow.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f85216f0-03f0-42fb-9ae9-3ddeffa4b3b2",
      "name": "Recevoir la requête",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -2440,
        700
      ],
      "webhookId": "b1e65fc7-fb83-4e9d-8568-26778d6be83a",
      "parameters": {
        "path": "b1e65fc7-fb83-4e9d-8568-26778d6be83a",
        "options": {
          "rawBody": true
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "9b5e979b-57d3-4e21-9795-1db31ec8b884",
      "name": "chatgpt-4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2220,
        900
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "chatgpt-4o-latest"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E4PFATctY0kV00hl",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0442a834-828b-4dc6-9f79-2684911bbd54",
      "name": "chatgpt-4o-2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1340,
        620
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "chatgpt-4o-latest"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E4PFATctY0kV00hl",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6d8796b5-b141-4603-bc61-c42928fca0ff",
      "name": "gpt-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2740,
        840
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "E4PFATctY0kV00hl",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2a6d05fe-eaa3-4ec7-91ed-9923475b17f6",
      "name": "Attendre la vidéo",
      "type": "n8n-nodes-base.wait",
      "position": [
        1420,
        -40
      ],
      "webhookId": "b2f4867e-47b3-4cef-aeb0-fd0b4616314c",
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "b6ed5147-98ae-44ab-856b-f2d8394decc7",
      "name": "Attendre l'audio",
      "type": "n8n-nodes-base.wait",
      "position": [
        2300,
        -20
      ],
      "webhookId": "d60dee8d-5bca-43ca-beaa-a7c3f8ca514a",
      "parameters": {
        "amount": 59
      },
      "typeVersion": 1.1
    },
    {
      "id": "9d88f7f4-7b2a-4371-b6cd-22c546d92d4e",
      "name": "Vidéo en cours de traitement",
      "type": "n8n-nodes-base.if",
      "position": [
        1860,
        -40
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ab7cdeb1-40bf-4cc0-bfe6-ccf9a7ee1d1d",
              "operator": {
                "type": "boolean",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.error.name.toBoolean() }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c79189a7-7c86-4969-874f-b54593547b37",
      "name": "Audio en cours de traitement",
      "type": "n8n-nodes-base.if",
      "position": [
        2740,
        -20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4369b67d-7975-419a-84b2-acfe4e78bc28",
              "operator": {
                "type": "boolean",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.error.name.toBoolean() }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a72db0a9-eaec-4ec9-bb23-dc236ed245fd",
      "name": "Fusionner",
      "type": "n8n-nodes-base.merge",
      "position": [
        3784,
        308
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "includeUnpaired": true
        },
        "combineBy": "combineByPosition",
        "numberInputs": 5
      },
      "typeVersion": 3
    },
    {
      "id": "2d38028e-f88a-4354-b178-d0dd2c957349",
      "name": "Bulletin approuvé",
      "type": "n8n-nodes-base.if",
      "position": [
        4200,
        360
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.data.approved }}",
              "value2": "true",
              "operation": "contains"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "93954adb-beca-4f70-8b31-497f122eaae8",
      "name": "Note autocollante1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        -480
      ],
      "parameters": {
        "width": 840,
        "height": 360,
        "content": "## Video Assets Branch\n \n## What it does\nUses FAL AI to turn the original image into a short video and Lyria2 to create background audio.\nMerges video+audio via FFmpeg API ➜ returns a public video.url.\n\n## Credentials needed\nFAL AI API Key (ENV_FALAI_APIKEY) – stored in the Configuration Settings Set node.\n\n## Fields you can tweak\n- ENV_INCLUDE_VIDEO (boolean) – set in Configuration Settings or incoming user prompt.\n- ENV_FALAI_VIDEO_DURATION – default 5 s or 10 s.\n- video_prompt & audio_prompt – produced by Generate Video & Audio Prompt; edit that prompt for creative control.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "557baae9-9e08-47c0-856a-fa7005849510",
      "name": "Note autocollante2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4920,
        -440
      ],
      "parameters": {
        "width": 840,
        "height": 380,
        "content": "## Sharepoint Storage Branch\n\n## What it does\nConverts newsletter HTML, the generated JPG, and (optionally) the video URL into binary files.\nUploads them to a chosen SharePoint document library for archival / CMS use.\n\n## Credentials needed\nMicrosoft SharePoint OAuth2 credential (used by all three “Upload …” nodes).\n\n## Fields you can tweak\nsharepoint flag – set via Determine Intent (true/false).\nDestination folder IDs – in each “Upload …” node under Folder; swap to any library you prefer.\nFilename pattern – currently ${random_filename}.html/.jpg/.txt; adjust in node parameters."
      },
      "typeVersion": 1
    },
    {
      "id": "086b25d4-138b-4e43-ad37-b18c379780f8",
      "name": "Note autocollante3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4900,
        860
      ],
      "parameters": {
        "width": 760,
        "height": 400,
        "content": "## HubSpot Distribution Branch\n\n## What it does\nPulls last 10 contacts via HubSpot node, loops through them, and emails each person the bilingual newsletter (HTML body) plus image and optional video link using Outlook.\n\n## Credentials needed\n- HubSpot App Token credential (HubSpot node).\n- Microsoft Outlook OAuth2 credential (Send a message node).\n\n## Fields you can tweak\n- hubspot flag – comes from Determine Intent → set to true/false in the incoming webhook JSON.\n- Email subject / BCC list – editable directly in the Send a message node.\n- Batch size – change “Limit” in HubSpot node or Split-In-Batches node settings."
      },
      "typeVersion": 1
    },
    {
      "id": "0bda54cb-f6ee-48f6-a0c0-07a63c2204c6",
      "name": "Note autocollante4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1060,
        -100
      ],
      "parameters": {
        "width": 780,
        "height": 400,
        "content": "## Image Assets Branch\n\n## What it does\n- Uses Pollinations AI to create a 1080 × 1350 image from image_prompt.\n- Converts base64 → binary → uploads to a service which returns the download url of the image.\n\n## Credentials needed\n- None (Pollinations accept unauthenticated HTTP).\n\n## Fields you can tweak\n- image_prompt – generated in Generate Video & Audio Prompt; edit that prompt for style changes.\n- Destination of the upload – change the URL in Send Data to Download Service to your server/CDN."
      },
      "typeVersion": 1
    },
    {
      "id": "d68aef91-73e7-40b8-be5b-8eb684b8f88c",
      "name": "Envoyer les données au service de téléchargement",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        160
      ],
      "parameters": {
        "url": "https://operator.velvetsyndicate.de:8090/api/upload-image",
        "method": "POST",
        "options": {
          "allowUnauthorizedCerts": true
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "13a66fcf-43f9-4f41-8c2c-7103c2d0ec33",
      "name": "Note autocollante5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2740,
        1020
      ],
      "parameters": {
        "width": 1000,
        "height": 700,
        "content": "## Newsletter Template Branch\n\n## What it does\n- Get Newsletter Template node downloads an HTML file from SharePoint.\n- Extract from File → Build Newsletter replaces every placeholder with the AI output and produces the final bilingual HTML.\n\n## Credentials needed\n- Microsoft SharePoint OAuth2 (used by Get Newsletter Template).\n\n## Fields you must provide / can tweak\n1. Your own HTML template\nCreate any design you like, but it MUST contain the following placeholders exactly as written (double-curly brackets):\n   {{INTRODUCTION_DE}} {{TOPIC_DE}} {{DESCRIPTION_DE}}\n   {{TEASER1_DE}} {{TEASER2_DE}} {{TEASER3_DE}}\n   {{CTA_DE}} {{FOOTER_TEXT_DE}} {{FOOTER_NAME_DE}}\n   {{TOPIC_TITLE_EN}} {{INTRODUCTION_EN}} {{TOPIC_EN}}\n   {{DESCRIPTION_EN}} {{TEASER1_EN}} {{TEASER2_EN}} {{TEASER3_EN}}\n   {{CTA_EN}} {{FOOTER_TEXT_EN}} {{FOOTER_NAME_EN}}\n\nUpload this HTML file to the SharePoint folder referenced in Get Newsletter Template (or change the node’s File parameter to point to your location).\n\n2. Optional – Modify the AI prompt\nIf you prefer different placeholder names, edit the prompt inside AI Agent so it returns JSON keys that match your template instead of the list above. Then update the replacement list inside Build Newsletter accordingly.\nThis guarantees the HTML merges cleanly with the AI-generated content every run."
      },
      "typeVersion": 1
    },
    {
      "id": "cc0555c6-7d87-4c2e-8115-ca2fe153fba4",
      "name": "Générer l'image",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "maxTries": 5,
      "position": [
        -680,
        440
      ],
      "parameters": {
        "url": "=https://image.pollinations.ai/prompt/{{ $json.image_prompt.replaceAll(' ','-').replaceAll(',','').replaceAll('.','').slice(0,100) }}?width=1080&height=1350&model=flux&nologo=true",
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "68c0a4b4-309b-426e-ad7c-3f4bd913ef01",
      "name": "Obtenir le contenu du modèle",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3344,
        650
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "Receive Request": [
      {
        "json": {
          "body": {
            "text": " Erstelle einen Newsletter zu neuen plemeo.ai Features: Verbesserte Telefonate und 600 Integrationen von MCPs (inkl. kurzer Erklärung von MCPs). Bitte ein Bild hinzufügen. Speichere in Sharepoint."
          },
          "query": {},
          "params": {},
          "headers": {
            "host": "n8n-test.plemeo.de",
            "accept": "application/json, text/plain, */*",
            "user-agent": "axios/1.7.9",
            "content-type": "application/json",
            "content-length": "40",
            "accept-encoding": "gzip, compress, deflate, br",
            "x-forwarded-for": "31.220.82.10",
            "x-forwarded-host": "n8n-test.plemeo.de",
            "x-forwarded-proto": "https"
          },
          "webhookUrl": "https://n8n-test.plemeo.de/webhook/9d77e9a2-6845-43a8-bec2-c910154ccae8",
          "executionMode": "production"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "22bca46b-ab6f-4d4c-8696-e59890a3a0f5",
  "connections": {
    "a72db0a9-eaec-4ec9-bb23-dc236ed245fd": {
      "main": [
        [
          {
            "node": "f3ea111a-2be1-487c-ab04-272082a0ed7a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c5732faf-550a-43f6-bbc5-6fd5738a6452": {
      "main": [
        [
          {
            "node": "8fa5043a-8cad-4ba3-9743-ff4bdbda4828",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "a72db0a9-eaec-4ec9-bb23-dc236ed245fd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1fd08314-fdc1-4b4f-9dfc-eb42e29dcc19": {
      "main": [
        [
          {
            "node": "2dfa50ed-8999-4baa-86de-3a72ca7b9806",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1fc3146e-600b-4d86-8ef7-9b319af09994": {
      "main": [
        [
          {
            "node": "0b7429c4-58c7-4b8f-a9df-36c02c65581f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "346b2213-7cd1-4373-bc5c-a81a1bcc2f80": {
      "main": [
        [
          {
            "node": "c79189a7-7c86-4969-874f-b54593547b37",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "37581dd4-faba-4072-a309-0f9eb1007f25": {
      "main": [
        [
          {
            "node": "9d88f7f4-7b2a-4371-b6cd-22c546d92d4e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "28a24ebf-c322-490c-8c0c-4286403d8b04": {
      "main": [
        [
          {
            "node": "6653e5da-9fe2-4c94-aefc-eab62cae217c",
            "type": "main",
            "index": 0
          },
          {
            "node": "1fd08314-fdc1-4b4f-9dfc-eb42e29dcc19",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "1fd08314-fdc1-4b4f-9dfc-eb42e29dcc19",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "6653e5da-9fe2-4c94-aefc-eab62cae217c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5cd95de7-c889-494e-8fc6-ee3904d03076": {
      "main": [
        [
          {
            "node": "f70b3fde-0aeb-4d8c-ad6c-094011530a97",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9b5e979b-57d3-4e21-9795-1db31ec8b884": {
      "ai_languageModel": [
        [
          {
            "node": "71b500eb-f7b0-44e2-980c-35903b61824f",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "10b5c038-5a10-46fb-8ced-610555db5e60": {
      "main": [
        [
          {
            "node": "ab62a875-ea54-4651-bdd5-cd8441a8eced",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6d8796b5-b141-4603-bc61-c42928fca0ff": {
      "ai_languageModel": [
        [
          {
            "node": "1fc3146e-600b-4d86-8ef7-9b319af09994",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "8a24dec5-39b7-4cbc-8158-29db35319700": {
      "main": [
        [
          {
            "node": "b6ed5147-98ae-44ab-856b-f2d8394decc7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c191afa3-9e32-4be9-ad18-eb6934f26856": {
      "main": [
        [
          {
            "node": "cc0555c6-7d87-4c2e-8115-ca2fe153fba4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0442a834-828b-4dc6-9f79-2684911bbd54": {
      "ai_languageModel": [
        [
          {
            "node": "ee208f0f-dec1-4291-b8d9-e52bb9f937f3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "ab62a875-ea54-4651-bdd5-cd8441a8eced": {
      "main": [
        [
          {
            "node": "5cd95de7-c889-494e-8fc6-ee3904d03076",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3dfb0441-a990-4fea-8e70-fec8941fe402": {
      "main": [
        [
          {
            "node": "21fec674-16ff-4abe-8fbd-8d9dc7a72c24",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc0555c6-7d87-4c2e-8115-ca2fe153fba4": {
      "main": [
        [
          {
            "node": "b7b4707c-a913-4e2e-9287-795bc4af01f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6653e5da-9fe2-4c94-aefc-eab62cae217c": {
      "main": [
        [
          {
            "node": "10b5c038-5a10-46fb-8ced-610555db5e60",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ccd903d5-2059-4e5a-b2e5-71d31ddbf171": {
      "main": [
        [
          {
            "node": "2dfa50ed-8999-4baa-86de-3a72ca7b9806",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b6ed5147-98ae-44ab-856b-f2d8394decc7": {
      "main": [
        [
          {
            "node": "346b2213-7cd1-4373-bc5c-a81a1bcc2f80",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2a6d05fe-eaa3-4ec7-91ed-9923475b17f6": {
      "main": [
        [
          {
            "node": "37581dd4-faba-4072-a309-0f9eb1007f25",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "da586535-799c-4263-beb8-a053fae68131": {
      "main": [
        [
          {
            "node": "e501013d-1ad6-4399-ba46-b6382c868895",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2dfa50ed-8999-4baa-86de-3a72ca7b9806": {
      "main": [
        [],
        [
          {
            "node": "ccd903d5-2059-4e5a-b2e5-71d31ddbf171",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f85216f0-03f0-42fb-9ae9-3ddeffa4b3b2": {
      "main": [
        [
          {
            "node": "71b500eb-f7b0-44e2-980c-35903b61824f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6ed4d301-86cb-4361-99d6-38e9d3dbf9fa": {
      "main": [
        [
          {
            "node": "a72db0a9-eaec-4ec9-bb23-dc236ed245fd",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "8fa5043a-8cad-4ba3-9743-ff4bdbda4828": {
      "main": [
        [
          {
            "node": "2a6d05fe-eaa3-4ec7-91ed-9923475b17f6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "71b500eb-f7b0-44e2-980c-35903b61824f": {
      "main": [
        [
          {
            "node": "7ad045e9-7200-49fa-ab06-8eac27286a8c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e501013d-1ad6-4399-ba46-b6382c868895": {
      "main": [
        [
          {
            "node": "a72db0a9-eaec-4ec9-bb23-dc236ed245fd",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "b7b4707c-a913-4e2e-9287-795bc4af01f3": {
      "main": [
        [
          {
            "node": "665669f0-f304-40a2-8cbd-32e1938f002f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2d38028e-f88a-4354-b178-d0dd2c957349": {
      "main": [
        [
          {
            "node": "28a24ebf-c322-490c-8c0c-4286403d8b04",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7ad045e9-7200-49fa-ab06-8eac27286a8c": {
      "main": [
        [
          {
            "node": "a5bda77c-13b6-4201-9c45-6df4df522962",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6bf8b37e-3ba5-4b5d-8e56-ff4cc44cb956": {
      "main": [
        [
          {
            "node": "da586535-799c-4263-beb8-a053fae68131",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "68c0a4b4-309b-426e-ad7c-3f4bd913ef01": {
      "main": [
        [
          {
            "node": "6ed4d301-86cb-4361-99d6-38e9d3dbf9fa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c79189a7-7c86-4969-874f-b54593547b37": {
      "main": [
        [
          {
            "node": "b6ed5147-98ae-44ab-856b-f2d8394decc7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "6bf8b37e-3ba5-4b5d-8e56-ff4cc44cb956",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a5bda77c-13b6-4201-9c45-6df4df522962": {
      "main": [
        [
          {
            "node": "1fc3146e-600b-4d86-8ef7-9b319af09994",
            "type": "main",
            "index": 0
          },
          {
            "node": "ee208f0f-dec1-4291-b8d9-e52bb9f937f3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "665669f0-f304-40a2-8cbd-32e1938f002f": {
      "main": [
        [
          {
            "node": "d68aef91-73e7-40b8-be5b-8eb684b8f88c",
            "type": "main",
            "index": 0
          },
          {
            "node": "a72db0a9-eaec-4ec9-bb23-dc236ed245fd",
            "type": "main",
            "index": 1
          },
          {
            "node": "a72db0a9-eaec-4ec9-bb23-dc236ed245fd",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "9d88f7f4-7b2a-4371-b6cd-22c546d92d4e": {
      "main": [
        [
          {
            "node": "2a6d05fe-eaa3-4ec7-91ed-9923475b17f6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "8a24dec5-39b7-4cbc-8158-29db35319700",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0b7429c4-58c7-4b8f-a9df-36c02c65581f": {
      "main": [
        [
          {
            "node": "68c0a4b4-309b-426e-ad7c-3f4bd913ef01",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f70b3fde-0aeb-4d8c-ad6c-094011530a97": {
      "main": [
        [
          {
            "node": "3dfb0441-a990-4fea-8e70-fec8941fe402",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d68aef91-73e7-40b8-be5b-8eb684b8f88c": {
      "main": [
        [
          {
            "node": "c5732faf-550a-43f6-bbc5-6fd5738a6452",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ee208f0f-dec1-4291-b8d9-e52bb9f937f3": {
      "main": [
        [
          {
            "node": "c191afa3-9e32-4be9-ad18-eb6934f26856",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f3ea111a-2be1-487c-ab04-272082a0ed7a": {
      "main": [
        [
          {
            "node": "2d38028e-f88a-4354-b178-d0dd2c957349",
            "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, IA Multimodale

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œuds49
Catégorie2
Types de nœuds18
Description de la difficulté

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

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34