Dumpling AIとGPT-4oを使ってAIニュースの自動レビューを生成

中級

これはAI, Marketing分野の自動化ワークフローで、14個のノードを含みます。主にCode, Wait, SplitOut, Aggregate, HttpRequestなどのノードを使用、AI技術を活用したスマート自動化を実現。 Dumpling AI、GPT-4oを使って自動生成してAIニュースのレビューを投稿する

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "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": "操作なし, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -420,
        -160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c572b2c3-9e72-4d7d-89f9-364aa5c00f79",
      "name": "Run on Schedule (Daily)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1080,
        -60
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "412b5965-1278-4748-8d77-4c85d9eb9cff",
      "name": "Fetch Topics with Empty Commentary",
      "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": "Loop Through Each Topic",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -640,
        -60
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "435798d5-59b3-4379-831a-9b8801a99f38",
      "name": "待機 Before News Search",
      "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": "Search News with 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": "Split Returned News Articles",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        20,
        40
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "news"
      },
      "typeVersion": 1
    },
    {
      "id": "9b45eb16-66b1-45bc-b4a3-5ad46696b295",
      "name": "Scrape Article Content with 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": "集計 Scraped Article Content",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        460,
        40
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "content"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5204f7c9-e5f8-4594-9428-4b46e92ba81d",
      "name": "Clean Article Content",
      "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": "Generate LinkedIn Commentary (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": "Append Commentary Back to Sheet",
      "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": "付箋",
      "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": "付箋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": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before News Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c572b2c3-9e72-4d7d-89f9-364aa5c00f79": {
      "main": [
        [
          {
            "node": "412b5965-1278-4748-8d77-4c85d9eb9cff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before News Search": {
      "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
          }
        ]
      ]
    },
    "Aggregate Scraped Article Content": {
      "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": "Aggregate Scraped Article Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - 人工知能, マーケティング

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数14
カテゴリー2
ノードタイプ11
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34