Postizを使用してAIニュース動画を自動作成し、ソーシャルメディアへ投稿

上級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、37個のノードを含みます。主にSet, Code, Wait, Limit, Switchなどのノードを使用。 GPT-4oとHeyGenを使用してAIニュースビデオを作成し、ソーシャルメディアに配信

前提条件
  • Google Drive API認証情報
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "E4pFNNNIatazgVPI",
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc"
  },
  "name": "Automated AI News Video Creation and Social Media Publishing With Postiz",
  "tags": [],
  "nodes": [
    {
      "id": "5ffbcd0a-c7f3-4718-9073-e3484758669f",
      "name": "「Test workflow」クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -624,
        784
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ec1b8c65-3aec-4339-9313-be9675bf0413",
      "name": "RSSリード",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -400,
        784
      ],
      "parameters": {
        "url": "http://rss.cnn.com/rss/edition.rss",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "7f1495af-bf4d-4415-b382-aac0e3920f9a",
      "name": "リミット1",
      "type": "n8n-nodes-base.limit",
      "position": [
        16,
        784
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "18d282ab-1d01-4b16-bcf4-13e68f1e9bf8",
      "name": "ニュースをスプレッドシートに記録",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        624,
        784
      ],
      "parameters": {
        "columns": {
          "value": {
            "Guid": "={{ $json.guid }}",
            "Link": "={{ $json.link }}",
            "Title": "={{ $json.title }}",
            "Content": "={{ $json.content }}",
            "IsoDate": "={{ $json.isoDate }}",
            "pubDate": "={{ $json.pubDate }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1UdfAbMMkJssMVu2qJy2swscL-dETUbjkervC08TYgFo"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "a34ca38f-6dd6-432f-b537-c5d9751a33b7",
      "name": "AIエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -608,
        1040
      ],
      "parameters": {
        "text": "=Generate a short, engaging caption (30–60 words) based on this news:\nTitle: {{ $json.Title }}\nContent: {{ $json.Content }}\n\nPlease provide just one caption that is concise and suitable for social media.",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "8710ad91-df58-4712-91f0-6f99d2f22cd9",
      "name": "スクリプト作成",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -576,
        1344
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "b882950d-8367-4b5a-a2f9-eb63371a6a80",
      "name": "キャプション解析",
      "type": "n8n-nodes-base.code",
      "position": [
        -224,
        1040
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst scripts = items.map((item) => item.json.output);\nreturn [{ json: { scripts } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "ee185fd9-8289-4fd4-986d-03919e4d6dab",
      "name": "HeyGenパラメータ設定",
      "type": "n8n-nodes-base.set",
      "position": [
        16,
        1040
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "7da6a496-0263-4723-9c08-1d15ed8ed28a",
      "name": "アバター動画作成(HeyGen)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        1040
      ],
      "parameters": {
        "url": "https://api.heygen.com/v2/video/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"video_inputs\": [\n    {\n      \"character\": {\n        \"type\": \"avatar\",\n        \"avatar_id\": \"{{ $json.avatar_id }}\",\n        \"avatar_style\": \"normal\"\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": \"{{ $json.caption }}\",\n        \"voice_id\": \"{{ $json.voice_id }}\",\n        \"speed\": 1.1\n      }\n    }\n  ],\n  \"dimension\": {\n    \"width\": 1280,\n    \"height\": 720\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "={{ $json.heygen_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4
    },
    {
      "id": "471fc0e5-263a-450f-b642-98c066991556",
      "name": "動画完了待機(HeyGen)",
      "type": "n8n-nodes-base.wait",
      "position": [
        480,
        1040
      ],
      "webhookId": "d9404622-0a06-4a65-959e-badd4fd87465",
      "parameters": {
        "unit": "minutes",
        "amount": 2
      },
      "typeVersion": 1
    },
    {
      "id": "556b79e0-a3a6-4534-bd68-19c330b2351c",
      "name": "アバター動画ステータス取得(HeyGen)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        784,
        1040
      ],
      "parameters": {
        "url": "https://api.heygen.com/v1/video_status.get",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "video_id",
              "value": "={{ $('Create Avatar Video (HeyGen)').item.json.data.video_id }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "={{ $('Setup Heygen Parameters').item.json.heygen_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4
    },
    {
      "id": "a5834c43-4bca-456e-97b4-a7eedf4b3ebf",
      "name": "動画ダウンロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -592,
        1536
      ],
      "parameters": {
        "url": "={{ $json.data.video_url }}",
        "options": {}
      },
      "typeVersion": 4
    },
    {
      "id": "bfc62fe4-58cd-40c9-8365-ad9bbc3a5f56",
      "name": "Google ドライブにアップロード",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -304,
        1536
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "7b1b1dc9-85e1-481f-a102-0560ad185aa1",
      "name": "動画詳細をスプレッドシートに記録",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        16,
        1536
      ],
      "parameters": {
        "columns": {
          "value": {
            "Title": "={{ $('Setup Heygen Parameters').item.json.news_title }}",
            "video caption": "={{ $('Setup Heygen Parameters').item.json.caption }}",
            "Heygen video url": "={{ $('Get Avatar Video Status (HeyGen)').item.json.data.video_url }}",
            "Google Drive File ID": "={{ $('Upload to Google Drive').item.json.id }}"
          },
          "mappingMode": "defineBelow"
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1oA-qdMkm1dUh0TpPAQ3KVeijGmDs0PsfSPpZ9bXvP6A"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "dcf670d4-7cc3-406c-ba1a-36cb501f98ed",
      "name": "Postizに動画をアップロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -688,
        2000
      ],
      "parameters": {
        "url": "https://postiz.yourdomain.com/api/public/v1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4
    },
    {
      "id": "45521d27-d9b9-4e3d-9ce1-bb0a36ed2989",
      "name": "Postiz連携情報取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -464,
        2000
      ],
      "parameters": {
        "url": "https://postiz.yourdomain.com/api/public/v1/integrations",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4
    },
    {
      "id": "86490587-728e-4e9a-b9ea-3e3044d5c869",
      "name": "動画プラットフォームルーター",
      "type": "n8n-nodes-base.switch",
      "position": [
        -240,
        1984
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.identifier }}",
                    "rightValue": "instagram"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.identifier }}",
                    "rightValue": "facebook"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "conditions": [
                  {
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.identifier }}",
                    "rightValue": "youtube"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "0386ca30-d554-4480-93b0-d2519851acc4",
      "name": "Instagram キャプション整形",
      "type": "n8n-nodes-base.code",
      "position": [
        -16,
        1808
      ],
      "parameters": {
        "jsCode": "let content = $('Setup Heygen Parameters').item.json.caption;\n\nif (content) {\n  content = content\n    .replace(/[\\n\\r\\t]+/g, ' ')\n    .replace(/\\s{2,}/g, ' ')\n    .replace(/[\\\\'\"]/g, (match) => match === '\"' ? '\\\\\"' : \"'\")\n    .replace(/[\\\\]/g, '\\\\\\\\')\n    .trim();\n\n  const limit = 2200;\n  if (content.length > limit) {\n    content = content.substring(0, limit - 3) + '...';\n  }\n}\n\nreturn [{\n  json: {\n    ...items[0].json,\n    instagram_reel_caption: content\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "0d29320b-7d0c-4346-a48a-33908cea8706",
      "name": "Instagram 動画投稿",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        1808
      ],
      "parameters": {
        "url": "https://postiz.yourdomain.com/api/public/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"now\",\n  \"date\": \"{{ $now.plus(1, 'minute').toISO() }}\",\n  \"shortLink\": true,\n  \"tags\": [\n    { \"value\": \"instagram\", \"label\": \"Instagram\" }\n  ],\n  \"posts\": [\n    {\n      \"integration\": {\n        \"id\": \"{{ $json.id }}\"\n      },\n      \"value\": [\n        {\n          \"content\": \"{{ $('Clean Instagram Caption').item.json.instagram_reel_caption }}\",\n          \"video\": [\n            {\n              \"id\": \"1\",\n              \"path\": \"{{ $('Upload Video to Postiz').item.json.path }}\"\n            }\n          ]\n        }\n      ],\n      \"settings\": {\n        \"type\": \"post\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "Y6o8v8wTVnstRSO4",
          "name": "seedance wave speed"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "f6a1f484-979e-493f-b213-448765ac93be",
      "name": "Facebook 動画キャプション整形",
      "type": "n8n-nodes-base.code",
      "position": [
        -16,
        2000
      ],
      "parameters": {
        "jsCode": "let content = $('Setup Heygen Parameters').item.json.caption;\n\nif (content) {\n  content = content\n    .replace(/[\\n\\r\\t]+/g, ' ')\n    .replace(/\\s{2,}/g, ' ')\n    .replace(/[\\\\'\"]/g, (match) => match === '\"' ? '\\\\\"' : \"'\")\n    .replace(/[\\\\]/g, '\\\\\\\\')\n    .trim();\n\n  const limit = 63206;\n  if (content.length > limit) {\n    content = content.substring(0, limit - 3) + '...';\n  }\n}\n\nreturn [{\n  json: {\n    ...items[0].json,\n    facebook_video_caption: content\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "d301177f-e6ac-4b04-813d-05fd7ccf1cd1",
      "name": "Facebook 動画投稿",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        2000
      ],
      "parameters": {
        "url": "https://postiz.yourdomain.com/api/public/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"now\",\n  \"date\": \"{{ $now.plus(1, 'minute').toISO() }}\",\n  \"order\": \"\",\n  \"shortLink\": true,\n  \"inter\": 0,\n  \"tags\": [],\n  \"posts\": [\n    {\n      \"integration\": {\n        \"id\": \"{{ $json.id }}\"\n      },\n      \"value\": [\n        {\n          \"content\": \"{{ $('Clean Facebook Video Caption').item.json.facebook_video_caption }}\",\n          \"video\": [\n            {\n              \"id\": \"1\",\n              \"path\": \"{{ $('Upload Video to Postiz').item.json.path }}\"\n            }\n          ]\n        }\n      ],\n      \"settings\": {\n        \"type\": \"post\"\n      }\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4
    },
    {
      "id": "ce67c70c-9ee2-4638-bdbd-c6f42ce442aa",
      "name": "YouTube 動画投稿",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -16,
        2192
      ],
      "parameters": {
        "url": "https://postiz.yourdomain.com/api/public/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n \"type\": \"now\",\n \"date\": \"{{ $now.plus(1, 'minute').toISO() }}\",\n \"order\": \"\",\n \"shortLink\": true,\n \"inter\": 0,\n \"tags\": [],\n \"posts\": [\n   {\n     \"integration\": {\n       \"id\": \"{{ $json.id }}\"\n     },\n     \"value\": [\n       {\n         \"content\": \"{{ $('Setup Heygen Parameters').item.json.caption }}\",\n         \"video\": [\n           {\n             \"id\": \"1\",\n             \"path\": \"{{ $('Upload Video to Postiz').item.json.path }}\"\n           }\n         ]\n       }\n     ],\n     \"settings\": {\n       \"__type\": \"youtube\",\n       \"title\": \"{{ $('Setup Heygen Parameters').item.json.news_title }}\",\n       \"type\": \"public\",\n       \"tags\": [\"news\", \"AI\"],\n       \"categoryId\": \"22\",\n       \"madeForKids\": false\n     }\n   }\n ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4
    },
    {
      "id": "56c69cd0-bd0f-4392-878a-08c16bbfb899",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        880
      ],
      "parameters": {
        "width": 176,
        "height": 128,
        "content": "🚀 **Workflow Trigger:**\nThis node acts as the manual trigger for the entire workflow. When you click 'Execute Workflow' in n8n, this node initiates the process, fetching the latest news and starting the video generation and social media publishing pipeline. Ideal for testing and manual runs."
      },
      "typeVersion": 1
    },
    {
      "id": "5bdcc1f2-c149-4f5c-a3bd-69e6b5d74c55",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        528
      ],
      "parameters": {
        "color": 4,
        "height": 384,
        "content": "📰 **News Feed Source:**\nConnects to the CNN Edition RSS feed (`http://rss.cnn.com/rss/edition.rss`) to pull the latest news articles. It extracts key information like the title, link, content, and publication date, serving as the raw data input for our AI content generation."
      },
      "typeVersion": 1
    },
    {
      "id": "0e5b8f4e-ebd5-4adc-bb66-1f4a5fe973c9",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        1712
      ],
      "parameters": {
        "width": 448,
        "height": 416,
        "content": "⬆️ **Postiz Video Upload:**\nThis node is responsible for uploading the actual binary video file (received from 'Download Video') to your Postiz instance's internal storage (`https://postiz.yourdomain.com/api/public/v1/upload`). Postiz requires media to be hosted on its platform before it can be included in social media posts. The successful output of this node will provide a `path` to the uploaded video, which is crucial for subsequent publishing steps. Ensure your 'Postiz' HTTP Header Auth credential is correctly configured with your Postiz API key."
      },
      "typeVersion": 1
    },
    {
      "id": "d83e0987-0d2e-4577-aa62-d9b00944711f",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        560
      ],
      "parameters": {
        "color": 4,
        "height": 384,
        "content": "📊 **News Article Logger (Google Sheets):**\nAppends the fetched news article details (Title, Link, Guid, pubDate, Content, IsoDate) to a specified Google Sheet ('RSS FEEDS' spreadsheet, 'Sheet1'). This provides a historical record and centralizes all news items processed by the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "b507d9a4-ee7d-40ab-8c92-242c56122571",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        528
      ],
      "parameters": {
        "color": 5,
        "height": 384,
        "content": "⚡ **Data Limiter (For Testing/Control):**\nThis node is configured to limit the number of items processed from the RSS feed, typically to 1. This is crucial during development and testing to prevent processing too many news articles at once, saving API credits and execution time. Set `executeOnce` to true for single item processing."
      },
      "typeVersion": 1
    },
    {
      "id": "7e56b046-a1e7-4790-8e12-9795b0d4ee0b",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1600
      ],
      "parameters": {
        "color": 3,
        "width": 496,
        "height": 176,
        "content": "📊 **Video Details Logger (Google Sheets):**\\nAppends a new row to your designated Google Sheet ('Avatar video' spreadsheet, 'Sheet1') with comprehensive details about the generated video. This includes the original HeyGen URL, the AI-generated caption, the news title, and the Google Drive File ID, creating a valuable record for tracking and auditing. Ensure your 'Google Sheets account 2' credential is valid."
      },
      "typeVersion": 1
    },
    {
      "id": "b0479969-4ea3-471d-a49c-1cda3494152f",
      "name": "付箋7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        1744
      ],
      "parameters": {
        "color": 4,
        "width": 368,
        "height": 352,
        "content": "🎯 **Dynamic Platform Routing (Video):**\nThis intelligent switch node dynamically routes the workflow to specific publishing branches based on the `identifier` of each social media integration fetched from Postiz. It directs the video content to the correct platform's dedicated cleaning and publishing logic (Instagram, Facebook, or YouTube), ensuring the right content goes to the right place."
      },
      "typeVersion": 1
    },
    {
      "id": "2e9d3b33-bc69-4b65-85d3-02bf53b785df",
      "name": "付箋8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        1840
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 128,
        "content": "🧼 **Instagram Caption Cleaner (Video):**\nThis crucial code node sanitizes and formats the AI-generated caption specifically for Instagram video posts (Reels or regular videos). It performs essential cleaning by:\n- Replacing all line breaks, carriage returns, and tabs with single spaces.\n- Consolidating multiple spaces into single spaces.\n- **Escaping single and double quotes** (`'` and `\"`) and **backslashes** (`\\`) to prevent JSON parsing errors.\n- Trimming leading/trailing whitespace.\n- Enforcing **Instagram's 2200 character limit**, truncating the caption and adding '...' if exceeded. This prevents API errors and ensures your caption displays cleanly on Instagram."
      },
      "typeVersion": 1
    },
    {
      "id": "5b994d79-0277-4cf8-ae05-a8298e8aee82",
      "name": "付箋9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        1184
      ],
      "parameters": {
        "content": "🧹 **Caption Extractor:**\nThis small code node processes the output from the 'AI Agent' to extract just the generated caption text. It simplifies the data structure, making it easier to reference the caption in subsequent nodes, particularly for passing it to HeyGen."
      },
      "typeVersion": 1
    },
    {
      "id": "3a375cac-c4c4-4201-a6ca-79bc395505cb",
      "name": "付箋10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        1056
      ],
      "parameters": {
        "color": 4,
        "content": "✍️ **Caption Generation AI:**\nUtilizes an AI agent (powered by the 'write script' node) to generate a short, engaging caption (30-60 words) for the news video. The prompt uses the news article's title and content to create relevant and concise text, essential for social media engagement."
      },
      "typeVersion": 1
    },
    {
      "id": "bfc15c14-2396-4b52-be10-3ee4a11fae7b",
      "name": "付箋11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        1184
      ],
      "parameters": {
        "content": "🔧 **HeyGen Configuration:**\nSets up the necessary parameters for the HeyGen video creation API call. This includes your HeyGen API key, the `avatar_id`, `voice_id`, the AI-generated `caption`, and the `news_title`. Remember to **replace the placeholder values** with your actual HeyGen credentials and desired avatar/voice IDs."
      },
      "typeVersion": 1
    },
    {
      "id": "c1a1646c-ce7a-4cfb-b19e-2805f3e13831",
      "name": "付箋12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        960
      ],
      "parameters": {
        "color": 3,
        "width": 544,
        "height": 336,
        "content": "🎬 **Video Generation (HeyGen API):**\nCalls the HeyGen API to generate a video using the specified avatar, voice, and the AI-generated caption. It sets the video dimensions and provides your HeyGen API key for authentication. This is where the news content is transformed into a visual format.\n\n⏳ **Video Processing Delay:**\nThis node introduces a deliberate wait period (2 minutes by default) to allow HeyGen to process and generate the video. Video generation can take time, so this pause is crucial to ensure the video is ready before attempting to download its status or the video itself. Adjust the duration as needed based on your video length and HeyGen's processing times.\n\n🔍 **Video Status Check (HeyGen):**\nPolls the HeyGen API to check the status of the generated video using its `video_id`. This is important to ensure the video generation is complete and successful ('completed' status) before attempting to download the actual video file. You can implement conditional logic after this node to retry or handle errors if the video is not yet ready or failed."
      },
      "typeVersion": 1
    },
    {
      "id": "bf6a9892-0661-4774-811c-0f4df7349d11",
      "name": "付箋13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        2192
      ],
      "parameters": {
        "color": 4,
        "width": 368,
        "height": 208,
        "content": "📸 **Publish to Instagram (Video):**\nThis node uses the Postiz API (`https://postiz.yourdomain.com/api/public/v1/posts`) to publish the video content to Instagram. It sends the cleaned caption from 'Clean Instagram Caption' and the `path` to the video previously uploaded to Postiz. It's configured for immediate posting ('now' type) and includes a generic 'instagram' tag for tracking. Ensure the correct Postiz credential is linked."
      },
      "typeVersion": 1
    },
    {
      "id": "28d3c92a-4178-4b78-a46c-e5b778977682",
      "name": "付箋14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        2064
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 144,
        "content": "📺 **Publish to YouTube (Video):**\nThis node is responsible for publishing the generated video to YouTube via the Postiz API. It uses the `news_title` from 'Setup Heygen Parameters' as the YouTube video title and the original AI-generated `caption` as the video description. It directly references the Postiz `path` for the video (from 'Upload Video to Postiz') and sets YouTube-specific metadata such as `categoryId` (e.g., '22' for People & Blogs) and `tags` (e.g., 'news', 'AI'). It's set to 'public' visibility. Uses the 'Postiz' HTTP Header Auth credential."
      },
      "typeVersion": 1
    },
    {
      "id": "85f3fa47-0e66-45d4-84b3-01e2ab0bbef6",
      "name": "付箋15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        832
      ],
      "parameters": {
        "color": 7,
        "width": 704,
        "height": 1136,
        "content": "## 🤖 Automated AI News Video Creation and Social Media Publishing Workflow\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n🎯 **PURPOSE:**\nThis workflow fully automates the creation and social media distribution of AI-generated news videos. It fetches news, crafts captions, generates avatar videos via HeyGen, stores them, and publishes them across Instagram, Facebook, and YouTube via Postiz.\n\n🔄 **WORKFLOW PROCESS:**\n1.  **News Fetching:** Reads the latest news from an RSS feed.\n2.  **AI Captioning:** Generates concise, engaging captions using an AI agent (GPT-4o-mini).\n3.  **Video Generation:** Creates an AI avatar video using HeyGen with the generated caption.\n4.  **Video Storage:** Downloads the video and uploads it to Google Drive for archival.\n5.  **Data Logging:** Records all news and video metadata into Google Sheets.\n6.  **Postiz Upload:** Uploads the video to Postiz's internal storage for publishing.\n7.  **Social Publishing:** Fetches Postiz integrations and routes the video to Instagram, Facebook, and YouTube after platform-specific content cleaning.\n\n⚙️ **KEY TECHNOLOGIES:**\n-   **RSS Feeds:** News source.\n-   **LangChain (n8n nodes):** AI Agent and Chat OpenAI for caption generation.\n-   **HeyGen API:** AI avatar video creation.\n-   **Google Drive:** Video file storage.\n-   **Google Sheets:** Data logging and tracking.\n-   **Postiz API:** Unified social media publishing platform.\n\n⚠️ **CRITICAL CONFIGURATIONS:**\n-   **API Keys:** Ensure HeyGen and Postiz API keys are correctly set in credentials and the 'Setup Heygen Parameters' node.\n-   **HeyGen IDs:** Verify `avatar_id` and `voice_id` in 'Setup Heygen Parameters'.\n-   **Postiz URL:** Confirm `https://postiz.yourdomain.com` is your correct Postiz instance URL across all HTTP Request nodes.\n-   **Credentials:** All Google, OpenAI, and Postiz credentials must be properly linked.\n\n📈 **BENEFITS:**\n-   Automated content creation and distribution, saving significant time.\n-   Consistent branding and messaging across multiple platforms.\n-   Centralized logging for tracking and performance analysis.\n-   Scalable solution for high-volume content demands.\n\n---"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b5466f4c-5bcd-461f-bd9e-9865b994057b",
  "connections": {
    "7f1495af-bf4d-4415-b382-aac0e3920f9a": {
      "main": [
        [
          {
            "node": "18d282ab-1d01-4b16-bcf4-13e68f1e9bf8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a34ca38f-6dd6-432f-b537-c5d9751a33b7": {
      "main": [
        [
          {
            "node": "b882950d-8367-4b5a-a2f9-eb63371a6a80",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec1b8c65-3aec-4339-9313-be9675bf0413": {
      "main": [
        [
          {
            "node": "7f1495af-bf4d-4415-b382-aac0e3920f9a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8710ad91-df58-4712-91f0-6f99d2f22cd9": {
      "ai_languageModel": [
        [
          {
            "node": "a34ca38f-6dd6-432f-b537-c5d9751a33b7",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "b882950d-8367-4b5a-a2f9-eb63371a6a80": {
      "main": [
        [
          {
            "node": "ee185fd9-8289-4fd4-986d-03919e4d6dab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a5834c43-4bca-456e-97b4-a7eedf4b3ebf": {
      "main": [
        [
          {
            "node": "bfc62fe4-58cd-40c9-8365-ad9bbc3a5f56",
            "type": "main",
            "index": 0
          },
          {
            "node": "dcf670d4-7cc3-406c-ba1a-36cb501f98ed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "18d282ab-1d01-4b16-bcf4-13e68f1e9bf8": {
      "main": [
        [
          {
            "node": "a34ca38f-6dd6-432f-b537-c5d9751a33b7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "86490587-728e-4e9a-b9ea-3e3044d5c869": {
      "main": [
        [
          {
            "node": "0386ca30-d554-4480-93b0-d2519851acc4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "f6a1f484-979e-493f-b213-448765ac93be",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ce67c70c-9ee2-4638-bdbd-c6f42ce442aa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dcf670d4-7cc3-406c-ba1a-36cb501f98ed": {
      "main": [
        [
          {
            "node": "45521d27-d9b9-4e3d-9ce1-bb0a36ed2989",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bfc62fe4-58cd-40c9-8365-ad9bbc3a5f56": {
      "main": [
        [
          {
            "node": "7b1b1dc9-85e1-481f-a102-0560ad185aa1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0386ca30-d554-4480-93b0-d2519851acc4": {
      "main": [
        [
          {
            "node": "0d29320b-7d0c-4346-a48a-33908cea8706",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "45521d27-d9b9-4e3d-9ce1-bb0a36ed2989": {
      "main": [
        [
          {
            "node": "86490587-728e-4e9a-b9ea-3e3044d5c869",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ee185fd9-8289-4fd4-986d-03919e4d6dab": {
      "main": [
        [
          {
            "node": "7da6a496-0263-4723-9c08-1d15ed8ed28a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "471fc0e5-263a-450f-b642-98c066991556": {
      "main": [
        [
          {
            "node": "556b79e0-a3a6-4534-bd68-19c330b2351c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f6a1f484-979e-493f-b213-448765ac93be": {
      "main": [
        [
          {
            "node": "d301177f-e6ac-4b04-813d-05fd7ccf1cd1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7da6a496-0263-4723-9c08-1d15ed8ed28a": {
      "main": [
        [
          {
            "node": "471fc0e5-263a-450f-b642-98c066991556",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5ffbcd0a-c7f3-4718-9073-e3484758669f": {
      "main": [
        [
          {
            "node": "ec1b8c65-3aec-4339-9313-be9675bf0413",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "556b79e0-a3a6-4534-bd68-19c330b2351c": {
      "main": [
        [
          {
            "node": "a5834c43-4bca-456e-97b4-a7eedf4b3ebf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

上級 - コンテンツ作成, マルチモーダルAI

有料ですか?

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

関連ワークフロー

AIベースのニュース動画生成ツール(HeygenとGPT4oを使用)
HeygenとGPT-4oを使用してRSSニュースをAIバーチャルキャラクター動画に変換
Set
Code
Wait
+
Set
Code
Wait
18 ノードDavid Olusola
デザイン
WordPressブログの自動化プロフェッショナル版(先端研究)v2.1マーケットプラグイン
GPT-4o、Perplexity AI、そして多言語対応を使ったSEO最適化ブログ作成の自動化
If
Set
Xml
+
If
Set
Xml
125 ノードDaniel Ng
コンテンツ作成
Instagram、YouTube Shorts等で活用のアイツーリステート動画ジェネレーター(GPT-4o、RunwayML、ElevenLabs利用)
GPT-4o、RunwayML、ElevenLabsソーシャルメディアアプリケーション
Set
Code
Wait
+
Set
Code
Wait
36 ノードMohan Gopal
コンテンツ作成
Gemini_NanoBanana_テンプレート
Google SheetsからFal.aiのモデル(nano-banana、WAN2.2、Veo3)でUGC広告生成
If
Set
Code
+
If
Set
Code
36 ノードJaruphat J.
コンテンツ作成
AI履歴書選別:Gmail、GPT-4o、Googleスプレッドシート - 採用プロセスの自動化
AI履歴書選別:Gmail、GPT-4o、Googleスプレッドシート - 採用プロセスの自動化
Set
Switch
Google Drive
+
Set
Switch
Google Drive
23 ノードDavid Olusola
コンテンツ作成
GPT-4oとエラーハンドリングによる自動リジューム選別 - Google スプレッドシートとクラウドハブワークフロー
GPT-4o +エラーハンドリングの自動再履歴スクリーニング - Google テーブルと Google ドラाइブワークフロー
If
Set
Gmail
+
If
Set
Gmail
34 ノードDavid Olusola
コンテンツ作成
ワークフロー情報
難易度
上級
ノード数37
カテゴリー2
ノードタイプ13
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
David Olusola

David Olusola

@dae221

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34