Génération automatique de commentaires de presse IA avec Dumpling AI et GPT-4o

Intermédiaire

Ceci est unAI, Marketingworkflow d'automatisation du domainecontenant 14 nœuds.Utilise principalement des nœuds comme Code, Wait, SplitOut, Aggregate, HttpRequest, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Utiliser Dumpling AI et GPT-4o pour générer automatiquement des commentaires d'actualités IA

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
  • 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": "M8PPLx0heLyG4kmQ",
  "meta": {
    "instanceId": "a1ae5c8dc6c65e674f9c3947d083abcc749ef2546dff9f4ff01de4d6a36ebfe6",
    "templateCredsSetupCompleted": true
  },
  "name": "Auto-Generate AI News Commentary with Dumpling AI and GPT-4o",
  "tags": [],
  "nodes": [
    {
      "id": "35ce9dd5-cc21-4cf9-a7ac-6cc9718fa86a",
      "name": "No Operation, ne rien faire",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -420,
        -160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c572b2c3-9e72-4d7d-89f9-364aa5c00f79",
      "name": "Exécution planifiée (Quotidienne)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1080,
        -60
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "412b5965-1278-4748-8d77-4c85d9eb9cff",
      "name": "Récupérer les sujets sans commentaire",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -860,
        -60
      ],
      "parameters": {
        "options": {
          "returnFirstMatch": true
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "generated commentary"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rCXEWnIZd6cKIqsVRRynHEygQTztJM76rm4HM8Xlqbw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rCXEWnIZd6cKIqsVRRynHEygQTztJM76rm4HM8Xlqbw/edit?usp=drivesdk",
          "cachedResultName": "News articles"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GaJqJHuS5mQxap7q",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "c04e7811-4e30-4e68-8342-55d79669072e",
      "name": "Boucler sur chaque sujet",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -640,
        -60
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "435798d5-59b3-4379-831a-9b8801a99f38",
      "name": "Attente avant la recherche d'actualités",
      "type": "n8n-nodes-base.wait",
      "position": [
        -420,
        40
      ],
      "webhookId": "2f67769b-0637-4b7e-9324-f8ba9520969c",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "f0098d01-fa3b-40e8-aeeb-e9dd31606ddb",
      "name": "Rechercher des actualités avec Dumpling AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -200,
        40
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/search-news",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"query\": \"{{ $json.Topic }}\",\n  \"country\": \"US\",\n  \"page\": 3,\n  \"language\": \"en\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "RLFzAcGRepr5eXZB",
          "name": "Dumpling AI-n8n"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "43862942-4e19-4856-a3b0-2546d8a7a462",
      "name": "Diviser les articles d'actualité retournés",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        20,
        40
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "news"
      },
      "typeVersion": 1
    },
    {
      "id": "9b45eb16-66b1-45bc-b4a3-5ad46696b295",
      "name": "Extraire le contenu des articles avec Dumpling AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        40
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/scrape",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"url\": \"{{ $json.link}}\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "RLFzAcGRepr5eXZB",
          "name": "Dumpling AI-n8n"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ffa392af-04d1-4c6a-a05e-f63f765d7eca",
      "name": "Agréger le contenu des articles extraits",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        460,
        40
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "content"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5204f7c9-e5f8-4594-9428-4b46e92ba81d",
      "name": "Nettoyer le contenu des articles",
      "type": "n8n-nodes-base.code",
      "position": [
        680,
        40
      ],
      "parameters": {
        "jsCode": "let rawContent = $input.first().json.content;\n\n// If content is not a string, try to stringify it\nif (typeof rawContent !== 'string') {\n  rawContent = JSON.stringify(rawContent);\n}\n\nconst cleaned = rawContent\n  .replace(/https?:\\/\\/[^\\s]+/g, '')           // Remove full URLs\n  .replace(/www\\.[^\\s]+/g, '')                  // Remove www links\n  .replace(/\\[([^\\]]+)\\]\\(([^)]+)\\)/g, '$1')    // Remove markdown links\n  .replace(/<a[^>]*>(.*?)<\\/a>/gi, '$1')        // Remove HTML anchor tags\n  .replace(/\\s{2,}/g, ' ')                      // Remove extra spaces\n  .trim();\n\nreturn [{\n  json: {\n    cleaned_content: cleaned\n  }\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "04fe4476-023b-49a5-8e72-0d251d78ae1a",
      "name": "Générer le commentaire LinkedIn (GPT-4o)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        900,
        40
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a thought leader on LinkedIn. I will provide you with a news articles related to {{ $('Fetch Topics with Empty Commentary').item.json.Topic }}, and you will write a personal commentary in a confident, insightful, first-person voice.\n\nYour response should:\n- Start with a strong personal opinion or observation\n- Briefly connect the news to real-world trends or implications\n- Mention how this relates to your work, experience, or thinking\n- Use a human tone, no robotic phrasing or generic statements\n- End with a question or call to action to invite engagement\n\nKeep it under 600 characters. Avoid buzzwords or fluff. Be authentic.\n\nHere are the news articles:{{ $json.cleaned_content }}\n"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "dd8NvMC6rvx8RITo",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ecc25fb7-52c0-4b89-94eb-06088b92e095",
      "name": "Ajouter le commentaire dans la feuille",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1260,
        40
      ],
      "parameters": {
        "columns": {
          "value": {
            "Topic": "={{ $('Fetch Topics with Empty Commentary').item.json.Topic }}",
            "generated commentary": "={{ $json.message.content }}"
          },
          "schema": [
            {
              "id": "Topic",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Topic",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "generated commentary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "generated commentary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Topic"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rCXEWnIZd6cKIqsVRRynHEygQTztJM76rm4HM8Xlqbw/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rCXEWnIZd6cKIqsVRRynHEygQTztJM76rm4HM8Xlqbw/edit?usp=drivesdk",
          "cachedResultName": "News articles"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GaJqJHuS5mQxap7q",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "62e5001b-0aa9-40eb-bf65-6ca6ff1e3b32",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        -260
      ],
      "parameters": {
        "width": 1100,
        "height": 340,
        "content": "### 📥 Fetch Topics and Search News via Dumpling AI\n\nThis section starts with a scheduled trigger. It pulls entries from a Google Sheet where the “generated commentary” is empty, meaning the topic hasn’t been processed. Each topic is looped individually. A short wait is applied to manage rate limits. Dumpling AI’s `/search-news` endpoint is then triggered to retrieve relevant articles based on the topic keyword.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3c3904a5-90d3-486a-8f69-bb6b33b5d234",
      "name": "Note adhésive 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -280
      ],
      "parameters": {
        "width": 1120,
        "height": 360,
        "content": "### ✍️ Scrape Articles, Clean Text, Generate Commentary, and Append\n\nEach article is split out and scraped using Dumpling AI’s `/scrape` endpoint to get full content. The aggregated content is cleaned via a Code node, removing links and excess formatting. GPT-4o generates a LinkedIn-style first-person commentary using this cleaned content. The final output is saved back to the Google Sheet under the “generated commentary” field.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2f3ec71f-7ba1-46bf-bbd3-633a9e526a47",
  "connections": {
    "5204f7c9-e5f8-4594-9428-4b46e92ba81d": {
      "main": [
        [
          {
            "node": "04fe4476-023b-49a5-8e72-0d251d78ae1a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c04e7811-4e30-4e68-8342-55d79669072e": {
      "main": [
        [
          {
            "node": "35ce9dd5-cc21-4cf9-a7ac-6cc9718fa86a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "435798d5-59b3-4379-831a-9b8801a99f38",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c572b2c3-9e72-4d7d-89f9-364aa5c00f79": {
      "main": [
        [
          {
            "node": "412b5965-1278-4748-8d77-4c85d9eb9cff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "435798d5-59b3-4379-831a-9b8801a99f38": {
      "main": [
        [
          {
            "node": "f0098d01-fa3b-40e8-aeeb-e9dd31606ddb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f0098d01-fa3b-40e8-aeeb-e9dd31606ddb": {
      "main": [
        [
          {
            "node": "43862942-4e19-4856-a3b0-2546d8a7a462",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "43862942-4e19-4856-a3b0-2546d8a7a462": {
      "main": [
        [
          {
            "node": "9b45eb16-66b1-45bc-b4a3-5ad46696b295",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ecc25fb7-52c0-4b89-94eb-06088b92e095": {
      "main": [
        [
          {
            "node": "c04e7811-4e30-4e68-8342-55d79669072e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ffa392af-04d1-4c6a-a05e-f63f765d7eca": {
      "main": [
        [
          {
            "node": "5204f7c9-e5f8-4594-9428-4b46e92ba81d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "412b5965-1278-4748-8d77-4c85d9eb9cff": {
      "main": [
        [
          {
            "node": "c04e7811-4e30-4e68-8342-55d79669072e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "04fe4476-023b-49a5-8e72-0d251d78ae1a": {
      "main": [
        [
          {
            "node": "ecc25fb7-52c0-4b89-94eb-06088b92e095",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9b45eb16-66b1-45bc-b4a3-5ad46696b295": {
      "main": [
        [
          {
            "node": "ffa392af-04d1-4c6a-a05e-f63f765d7eca",
            "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 - Intelligence Artificielle, Marketing

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œuds14
Catégorie2
Types de nœuds11
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