{
"name": "日本語HN",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 3
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
-96,
1360
],
"id": "4d6ee818-109d-4319-abd7-019ad963ad87",
"name": "Schedule Trigger"
},
{
"parameters": {
"promptType": "define",
"text": "# 指示\\n以下のタスクを順番に実行してください:\\n1. 過去24時間でAIまたはLLMに関連するHacker Newsのトップ10記事を取得する\\n2. ソーシャルメディアでバイラルになる可能性が最も高いトップ記事を選択する \\n3. 記事とHacker Newsのコメントを取得する\\n4. AIアバター動画用の20秒間のモノローグスクリプトを作成し、以下のガイドラインに従う:\\n - スクリプトは声に出して読むと約30秒になるようにする\\n - 記事から多くの詳細と統計を含める\\n - 小学6年生の読解レベルを使用する\\n - バランスの取れた視点\\n - 句読点は間を示すが、不自然な間を最小限にするため、句読点は読点のみを使用する\\n - 最初の2文では読点を使用せず、残りのスクリプトでも控えめに使用する\\n5. スクリプトの最初の文を、内容に合わせた感覚的でバイラルなフックに更新し、視聴者の注意を引く\\n6. 最後の文を次に置き換える:「フォローしてAIの海外最新情報をチェックしてね!」\\n\\n# 出力形式\\n動画スクリプトのみを正確に出力してください。それ以外は何も出力しないでください。中間的な思考、ノート、フォーマットは絶対に含めないでください。",
"options": {
"returnIntermediateSteps": true
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.8,
"position": [
112,
1360
],
"id": "e4760b49-263c-40b5-a41d-f1d55ef6edd1",
"name": "AI Agent"
},
{
"parameters": {
"articleId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Article_ID', ``, 'string') }}",
"additionalFields": {
"includeComments": true
}
},
"type": "n8n-nodes-base.hackerNewsTool",
"typeVersion": 1,
"position": [
336,
1552
],
"id": "770820bb-00e5-4121-81ff-5b4e99fec450",
"name": "Fetch HN Article"
},
{
"parameters": {
"resource": "all",
"additionalFields": {
"keyword": "AI",
"tags": [
"front_page"
]
}
},
"type": "n8n-nodes-base.hackerNewsTool",
"typeVersion": 1,
"position": [
192,
1552
],
"id": "6fbd89dc-28ec-4c37-97ba-d59c3173dbd9",
"name": "Fetch HN Front Page"
},
{
"parameters": {
"amount": 1,
"unit": "minutes"
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
1680,
1440
],
"id": "7fca946c-a354-4e82-8751-ff37a4ed9f3a",
"name": "Wait",
"webhookId": "164ce951-d213-4322-bcea-9db2a3481ad3",
"alwaysOutputData": false
},
{
"parameters": {
"model": {
"__rl": true,
"value": "o3-mini",
"mode": "list",
"cachedResultName": "o3-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
48,
1552
],
"id": "ba4559ea-8511-4514-bf8b-16679d465513",
"name": "Write Script",
"credentials": {
"openAiApi": {
"id": "tLTrcCkPHn2sGXGw",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"url": "<https://api.heygen.com/v1/video_status.get>",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "video_id",
"value": "={{ $('Merge').item.json.data.video_id }}"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-Api-Key",
"value": "NzhlNWYyZTY1ZGU5NDk2ZGIyMjMzNGEwNmNkMjgyYTQtMTc1ODA3OTQyOA=="
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1840,
1376
],
"id": "d07fee17-3895-480f-802a-cf25589dd63d",
"name": "Get Avatar Video"
},
{
"parameters": {
"content": "# Research Tech News using Hackernews\\n\\n- This template uses the free Hackernews tool to fetch trending tech news\\n- If your niche is outside of tech, I suggest replacing the Hackernews tool with SerpAPI tool, which allows your AI agent to use Google search to find recent industry news",
"height": 868,
"width": 940,
"color": 2
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-160,
928
],
"id": "05fac827-4eb4-4f6b-a1cf-ad67c869576e",
"name": "Sticky Note"
},
{
"parameters": {
"content": "# Create AI Clone Video Using HeyGen\\n\\n- This requires HeyGen API plan (paid); the free plan is insufficient: <https://www.heygen.com/api-pricing\\n-> If you have a long script, you may need to increase the WAIT time.\\n- You can use a custom Elevenlabs voice by integrating Elevenlabs within HeyGen web app.\\n- Tutorial on how to create a high-quality avatar and voice clone: <https://youtu.be/_jogmHuuKXk\\n-> If you want a background video playing behind your avatar: (1) ensure you have an avatar with background removed which requires a higher tier plan; (2) open SETUP HEYGEN node and set parameter 'has_background_video' to true; (3) open SETUP HEYGEN node and replace video URL in parameter 'background_video_url'",
"height": 868,
"width": 1536,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
880,
928
],
"id": "7076afa2-58f6-4685-a2de-a98ecdee4fa7",
"name": "Sticky Note1"
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o",
"mode": "list",
"cachedResultName": "GPT-4O"
},
"messages": {
"values": [
{
"content": "=日本語で自然なソーシャルメディア投稿を作成してください。日本のSNS文化に適した内容にしてください。\\n\\n# 例\\n<example>\\n最近、多くの人からアスクエンジン最適化について質問を受けています。これは、あなたのウェブサイトや既存のコンテンツをChatGPTや他の生成AI ツールに取り込まれやすいよう最適化することです。生成AIツールは会話的な性質を持ち、Q&A形式であることを考慮すると、検索エンジンはユーザーの質問に簡潔に答えるスニペットを取り込みたがります。\\n- AI時代のアスクエンジン最適化とは何ですか?\\n- 従来のSEOと現在のアスクエンジン最適化はどう違いますか?\\n- アスクエンジン最適化を始めるためのコツとトリックは?\\n#ai #アスクエンジン最適化 #chatgpt #seo\\n</example>\\n\\n# 文脈\\n提供されたソースからトピックを推測してください。\\n\\n# 文体\\nあなたの書き方:\\n<writing_style>\\n- 簡潔で情報的な文体\\n- 明確でシンプルな言葉を使用\\n- 短く、インパクトのある文章\\n- 能動態を使用し、受動態を避ける\\n- 実用的で実行可能な洞察に焦点を当てる\\n- 主張を裏付けるデータや統計を可能な限り組み込む\\n- 読者に直接語りかけるため「あなた」「あなたの」を使用\\n- 比喩や決まり文句を避ける\\n- 一般論を避ける\\n- 結論として、最後に、などの定型的な表現を含めない\\n- 警告や注意事項は出力せず、要求された内容のみ\\n- ハッシュタグは使用しない(ガイドラインで指定された場合を除く)\\n- セミコロンは使用しない\\n- 絵文字は使用しない\\n- アスタリスクは使用しない\\n- 形容詞と副詞を使用しない\\n- 以下の単語は使用禁止:\\n「できる、かもしれない、ただ、その、とても、本当に、文字通り、実際に、確実に、おそらく、基本的に、深く掘り下げる、始める、啓発的、尊敬される、光を当てる、作り上げる、想像する、領域、ゲームチェンジャー、解き放つ、発見する、急上昇、深淵、あなただけではない、~の世界で、革命を起こす、破壊的、活用する、深く潜る、タペストリー、照らし出す、明らかにする、重要な、豊かにする、複雑な、解明する、したがって、さらに、しかし、活用する、エキサイティング、画期的、最先端、注目すべき、残される、垣間見る、ナビゲート、風景、際立った、証、要約すると、結論として、さらに、後押し、賑やか、開かれた、強力、問い合わせ、進化し続ける」\\n</writing_style>\\n\\n# 計画\\n提供されたソースに基づいて50語の動画キャプションを書くことが目標です。\\n1. 提供されたソースを徹底的に分析\\n2. <example>の投稿を注意深く研究し、以下を再現:\\n - 全体的な構造\\n - トーンとボイス\\n - フォーマット(改行とスペースを含む)\\n - 長さ(同様に詳細な投稿を目指す)\\n - 絵文字の不使用\\n - 最大5つの関連ハッシュタグ\\n - 感情的な共鳴\\n\\n# 出力\\n以下のガイドラインに従って投稿を書いてください。ステップ1とステップ2の分析を使用し、提供されたソースを基盤として、ステップ2の例のスタイルと構造を維持しながら大幅に拡張してください。提供されたソースの情報を必ず使用してください。<writing_style>に従ってください。\\n\\n<guidelines>\\n説明は以下のように構成してください:\\n1. ソースを要約した1段落で開始\\n2. 改行後、視聴者が検索エンジンでソースについて尋ねるであろう3つの質問を箇条書きで\\n3. 改行後、以下のハッシュタグ:#ai #人工知能 #aiニュース #ai海外最新\\n</guidelines>\\n\\n深呼吸をして、ステップバイステップで進めてください!\\n\\n# 入力\\n以下の情報源を使用してください:\\n<sources>\\n{{ $json.output }}\\n</sources>"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
464,
1232
],
"id": "d6a1f027-60ce-4c79-98b2-9a4019501d0e",
"name": "Write Long Caption",
"credentials": {
"openAiApi": {
"id": "tLTrcCkPHn2sGXGw",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4o",
"mode": "list",
"cachedResultName": "GPT-4O"
},
"messages": {
"values": [
{
"content": "=動画の内容を要約したバイラルな文章を1文で書いてください。最大90文字、小学6年生レベルの言葉、バランスの取れた中立的な視点、絵文字なし:\\n<content>\\n{{ $json.message.content }}\\n</content>"
}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
464,
1472
],
"id": "ab973ada-87db-470a-843b-71f2d4db800d",
"name": "Write Short Caption",
"credentials": {
"openAiApi": {
"id": "tLTrcCkPHn2sGXGw",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"content": "# Setup 1\\n\\nFill out \\"Setup Heygen\\"",
"height": 116,
"width": 182,
"color": 2
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
896,
1520
],
"id": "413e98ee-b9dd-40df-8eca-9c261ae9cd60",
"name": "Sticky Note3"
},
{
"parameters": {
"method": "POST",
"url": "<https://api.heygen.com/v2/video/generate>",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-Api-Key",
"value": "NzhlNWYyZTY1ZGU5NDk2ZGIyMjMzNGEwNmNkMjgyYTQtMTc1ODA3OTQyOA=="
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\\n \\"video_inputs\\": [\\n {\\n \\"character\\": {\\n \\"type\\": \\"talking_photo\\",\\n \\"talking_photo_id\\": \\"{{ $('Code').item.json.randomTalkingPhoto }}\\",\\n \\"scale\\": 0.5,\\n \\"offset\\": {\\n \\"x\\": 0.3,\\n \\"y\\": 0.3\\n },\\n\\"matting\\": true\\n },\\n \\"voice\\": {\\n \\"type\\": \\"text\\",\\n \\"input_text\\": {{ $('AI Agent').item.json.output.toJsonString() }},\\n \\"voice_id\\": \\"926a3d25100b4687a80fc76ec8f2bf38\\",\\n \\"speed\\": 1.1,\\n \\"pitch\\": 50,\\n \\"emotion\\": \\"Excited\\"\\n },\\n \\"background\\": {\\n \\"type\\": \\"video\\",\\n \\"url\\": \\"{{ $('Code').item.json.randomBackgroundURL }}\\",\\n \\"play_style\\": \\"loop\\",\\n \\"fit\\": \\"crop\\",\\n \\"scale\\": 1.2\\n }\\n }\\n ],\\n \\"dimension\\": { \\n \\"width\\": 1080, \\n \\"height\\": 1920 \\n },\\n \\"aspect_ratio\\": \\"9:16\\",\\n \\"caption\\": true,\\n \\"title\\": \\"{{ $('Write Short Caption').item.json.message.content }}\\"\\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1216,
1536
],
"id": "312f7a4b-6382-42e0-b094-49b31e57f0db",
"name": "Create Avatar Video WITHOUT Background Video"
},
{
"parameters": {},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
1456,
1520
],
"id": "02087ab9-4e8b-4d90-b759-c6f10efa6db3",
"name": "Merge"
},
{
"parameters": {
"content": "# FULL TUTORIAL\\n\\n## Tutorial\\n\\nhttps://help.blotato.com/api/templates/3-hackernews-to-ai-clone-videos\\n\\n## Description\\n\\nThis fully automated AI Avatar Social Media system creates talking head AI clone videos, WITHOUT having to film or edit yourself. It combines n8n, AI agent, HeyGen, and Blotato to research, create, and distribute talking head AI clone videos to every social media platform every single day.\\n\\n## Overview\\n\\n**1. Trigger: Schedule**\\n- Configured to run once daily at 10am\\n\\n**2. AI News Research**\\n- Research viral news from tech-focused forum, Hackernews\\n- Fetch the selected news item, plus discussion comments\\n\\n**3. AI Writer**\\n- AI writes 30-second monologue script\\n- AI writes short video caption\\n\\n**4. Create Avatar Video**\\n- Call Heygen API (requires paid API plan), specifying your avatar ID and voice ID\\n- Create avatar video, optionally passing in an image/video background if you have a green screen avatar (matte: true)\\n\\n**5. Get Video**\\n- Wait awhile, then fetch completed avatar video\\n- Upload video to Blotato\\n\\n**6. Publish to Social Media via Blotato**\\n- Connect your Blotato account\\n- Choose your social accounts\\n- Either post immediately or schedule for later",
"height": 912,
"width": 624,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"typeVersion": 1,
"id": "d319a6b1-64e5-4ab7-9604-57ec319bad39",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "# Error Report\\n\\n👉 View run logs and results.\\n\\n👉 API Dashboard:\\n <https://my.blotato.com/api-dashboard>",
"height": 192,
"width": 288,
"color": 7
},
"type": "n8n-nodes-base.stickyNote",
"position": [
3120,
1600
],
"typeVersion": 1,
"id": "67ab35be-cc27-4bff-990e-b1f4e4649f0f",
"name": "Sticky Note7"
},
{
"parameters": {
"numberInputs": 9
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
3200,
1216
],
"id": "149eed7d-fe31-45d7-bfd4-489522d9bdd5",
"name": "Error Report",
"notesInFlow": false
},
{
"parameters": {
"content": "# Post Everywhere\\n\\n## IMPORTANT\\nDo not post the same image/video over and over again, otherwise it will be flagged as spam. Make sure to disclose AI generated content if you're using avatars.\\n\\n👉 **Blotato API Docs**: <https://help.blotato.com/api\\n✅> **Troubleshoot Errors**: <https://my.blotato.com/api-dashboard\\n📷> **Media Requirements**: <https://help.blotato.com/api/media\\n🛠️> **Contact help**: log into blotato > click support button in bottom right corner",
"height": 1968,
"width": 912,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
2528,
240
],
"id": "bfe76ce9-28dc-4082-97cb-5b028af36ed7",
"name": "Sticky Note4"
},
{
"parameters": {
"content": "# Platform Specific Notes\\n\\n## Tiktok\\nYou can post images, videos, and slideshows. Your Tiktok account must be warmed up before using Blotato, otherwise you'll get low views. [Follow this warm up guide](<https://help.blotato.com/platforms/tiktok/brand-new-accounts>). \\n\\nCheck out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/tiktok\\n\\n## Linkedin\\nYou can post text, images, videos, and PDF carousels. Check out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/linkedin\\n\\n## Facebook\\nYou can post text, images, regular videos, and reels. Check out best practices and troubleshooting FAQs\\nhttps://help.blotato.com/platforms/facebook\\n\\n## Instagram\\nYou can post images, reels, stories, and slideshows. Check out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/instagram\\n\\n## Twitter\\nYou can post text, images, and videos. You can post a long-form thread by clicking \\"Show Advanced Settings\\". Check out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/twitter\\n\\n## Threads\\nYou can post text, images, and videos. You can post a long-form thread by clicking \\"Show Advanced Settings\\". Check out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/threads\\n\\n## Bluesky\\nYou can post text, images, and videos. You can post a long-form thread by clicking \\"Show Advanced Settings\\". Check out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/bluesky\\n\\n## Youtube\\nYou can post Youtube shorts and long-form videos. You don't need to do anything. Youtube automatically posts Shorts if your video is <2 minutes and 9:16 aspect ratio.\\n\\nBrand new Youtube accounts are limited to a few posts per day via API. You can still upload manually through Youtube website. This restriction is directly from Youtube and is gradually lifted as you post consistently.\\n\\nCheck out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/youtube\\n\\n## Pinterest\\nYou can post image and video pins. You must warm up your Pinterest account by posting a few pins per day, gradually ramping up.\\n\\nHow to Get Your Pinterest Board ID:\\nGo to Blotato, create a Pinterest post, click Publish, and you'll see your board IDs. Copy board ID to here.\\n\\nCheck out best practices and troubleshooting FAQs:\\nhttps://help.blotato.com/platforms/pinterest\\n\\n## Need More Help?\\n\\nLog into Blotato.com\\nClick support button in bottom right corner.\\nSabrina Ramonov🍄 replies within 24 hours most weekdays.",
"height": 1632,
"width": 608,
"color": 7
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
3520,
448
],
"id": "a18d84a0-ad71-4a72-82f6-92a31bcc59f4",
"name": "Sticky Note8"
},
{
"parameters": {
"content": "# Setup 2\\n1. Open each node\\n2. Select your social account\\n3. Deactivate platforms you don't need\\n3. 👉 **You don't need to do anything else!**",
"height": 176,
"width": 320,
"color": 2
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
2656,
528
],
"id": "5505acdd-5d43-47ec-8134-92a7f22fa9a0",
"name": "Sticky Note9"
},
{
"parameters": {
"content": "# Setup\\n\\n- Sign up for Blotato.com\\n- Generate Blotato API Key by going to Settings > API > Generate API Key (paid feature only)\\n- If you're using n8n, ensure you have \\"Verified Community Nodes\\" enabled in your n8n Admin Panel. Then, install \\"Blotato\\" verified community node.\\n- Create Blotato credential\\n- Sign up for Heygen web plan and API plan\\n- Paste your Heygen API key\\n- Paste your Heygen avatar ID\\n- Paste your Heygen voice ID\\n- If you want to pass in an optional background video as a green screen effect, use the 2nd agent background_video_url that is already filled out (change it later, after ensuring everything work\\n- Complete the 2 setup steps in BROWN sticky notes in this template",
"height": 368,
"width": 784,
"color": 6
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1232,
544
],
"typeVersion": 1,
"id": "71a29046-3574-4bb5-95a9-db6f1a66b436",
"name": "Sticky Note10"
},
{
"parameters": {
"content": "## Troubleshooting Checklist\\n- HeyGen API paid plan\\n- make sure you copied your avatar ID correctly, not the group avatar ID\\n- If your script is long, it takes more time for your video to finish",
"width": 320,
"color": 7
},
"type": "n8n-nodes-base.stickyNote",
"position": [
1760,
1584
],
"typeVersion": 1,
"id": "ca841a07-e550-47fd-8d36-04d2ce3492d1",
"name": "Sticky Note11"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "e511deb8-8e4c-45db-aa35-18f43a0552b6",
"leftValue": "={{ $('Get Avatar Video').item.json.data.status }}",
"rightValue": "completed",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"looseTypeValidation": true,
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
2032,
1472
],
"id": "75f70c40-6720-4153-a6b4-ab487b4db3eb",
"name": "If1"
},
{
"parameters": {
"platform": "tiktok",
"accountId": {
"__rl": true,
"value": "15893",
"mode": "list",
"cachedResultName": "achan.ai8",
"cachedResultUrl": "<https://backend.blotato.com/v2/accounts/15893>"
},
"postContentText": "={{ $('Write Short Caption').item.json.message.content }}\\n\\n{{ $json.url }}",
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
736
],
"id": "f0ab74f3-e3da-4d6c-b154-6d310bfd120b",
"name": "Tiktok [BLOTATO]",
"retryOnFail": false,
"maxTries": 2,
"waitBetweenTries": 3000,
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"platform": "linkedin",
"accountId": {
"__rl": true,
"value": "6256",
"mode": "id"
},
"postContentText": "={{ $('Write Short Caption').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}",
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2784,
896
],
"id": "214d02a0-43fd-4c7a-928f-f65645d94a72",
"name": "Linkedin [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"platform": "facebook",
"accountId": {
"__rl": true,
"value": "9887",
"mode": "list",
"cachedResultName": "Achan Taki",
"cachedResultUrl": "<https://backend.blotato.com/v2/accounts/9887>"
},
"postContentText": "={{ $('Write Short Caption').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}",
"facebookPageId": {
"__rl": true,
"value": "",
"mode": "id"
},
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
1056
],
"id": "d2aa8d4e-a745-4c7f-9122-228cd2662567",
"name": "Facebook [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"accountId": {
"__rl": true,
"value": "14859",
"mode": "list",
"cachedResultName": "achan.ai8",
"cachedResultUrl": "<https://backend.blotato.com/v2/accounts/14859>"
},
"postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}",
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
1216
],
"id": "1a186840-9a69-4734-a67b-1c3e0ac0348c",
"name": "Instagram [BLOTATO]",
"retryOnFail": true,
"maxTries": 2,
"waitBetweenTries": 5000,
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"platform": "twitter",
"accountId": {
"__rl": true,
"value": "7132",
"mode": "list",
"cachedResultName": "achan_ai8",
"cachedResultUrl": "<https://backend.blotato.com/v2/accounts/7132>"
},
"postContentText": "={{ $('Write Short Caption').item.json.message.content }}\\n",
"postContentMediaUrls": "={{ $json.url }}",
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
1376
],
"id": "cfbbbfda-7717-4d17-87d5-0e08a506bab5",
"name": "Twitter [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"platform": "youtube",
"accountId": {
"__rl": true,
"value": "12269",
"mode": "list",
"cachedResultName": "Achan (Achan)",
"cachedResultUrl": "<https://backend.blotato.com/v2/accounts/12269>"
},
"postContentText": "={{ $('Write Long Caption').item.json.message.content }}",
"postContentMediaUrls": "={{ $json.url }}",
"postCreateYoutubeOptionTitle": "={{ $('Write Short Caption').item.json.message.content }}",
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
1536
],
"id": "cb39c890-9ee5-41ed-9dca-a9a0bc27d85c",
"name": "Youtube [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"platform": "threads",
"accountId": {
"__rl": true,
"value": "2956",
"mode": "list",
"cachedResultName": "achan.ai8",
"cachedResultUrl": "<https://backend.blotato.com/v2/accounts/2956>"
},
"postContentText": "={{ $('Write Short Caption').item.json.message.content }}\\n\\n{{ $json.url }}",
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
1696
],
"id": "4f976772-c421-46c8-81af-11583330c2e9",
"name": "Threads [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"accountId": {
"__rl": true,
"mode": "list",
"value": ""
},
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
1856
],
"id": "31e211df-46ca-403a-a73e-be31e5cd1d39",
"name": "Bluesky [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"accountId": {
"__rl": true,
"mode": "list",
"value": ""
},
"options": {}
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2768,
2016
],
"id": "35680560-cc33-41fb-b117-f6936f88789d",
"name": "Pinterest [BLOTATO]",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
},
"disabled": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"jsCode": "const backgrounds = [\\n \\"<https://database.blotato.io/storage/v1/object/public/public_media/a137aa1e-e874-46b7-9bc4-3539a3f5b15a/videogen2-render-311eb9e5-3616-46df-b369-865b285d943e.mp4\\>",\\n \\"<https://database.blotato.io/storage/v1/object/public/public_media/a137aa1e-e874-46b7-9bc4-3539a3f5b15a/videogen2-render-241165c0-00fa-45f4-84c3-3e25d178e3fc.mp4\\>",\\n \\"<https://database.blotato.io/storage/v1/object/public/public_media/a137aa1e-e874-46b7-9bc4-3539a3f5b15a/videogen2-render-4f69619f-4390-4026-8131-d9c925bfbb05.mp4\\>",\\n \\"<https://database.blotato.io/storage/v1/object/public/public_media/a137aa1e-e874-46b7-9bc4-3539a3f5b15a/videogen2-render-010aa1dd-4a2f-42d5-8c51-ad34a31211a7.mp4\\>",\\n];\\nconst talkingPhotos = [\\n \\"e850af395ca248a1982955172ab183eb\\",\\n \\"bd9d3569d44a45bc99a02db533cdf65e\\",\\n \\"08531979c8ad42d790619a982784d763\\",\\n \\"e9f6440d45a14332ad2fb956a840bbab\\",\\n \\"cca394825d6a403eae7ec6cdab6dde85\\",\\n \\"bd60497543ae4c8aaa723cc25188c3c0\\",\\n \\n];\\n\\n// ランダム関数の詳細デバッグ\\nconst selectedBackground = backgrounds[Math.floor(Math.random() * backgrounds.length)];\\nconst randomValue = Math.random();\\nconst arrayLength = talkingPhotos.length;\\nconst randomIndex = Math.floor(randomValue * arrayLength);\\nconst selectedTalkingPhoto = talkingPhotos[randomIndex];\\n\\n// 時間ベースの代替ランダム\\nconst timeBasedIndex = Date.now() % talkingPhotos.length;\\nconst timeBasedSelection = talkingPhotos[timeBasedIndex];\\n\\nconsole.log('Selected Background URL:', selectedBackground);\\nconsole.log('=== RANDOM DEBUG ===');\\nconsole.log('Math.random():', randomValue);\\nconsole.log('Array length:', arrayLength);\\nconsole.log('Calculated index:', randomIndex);\\nconsole.log('Selected ID (Math):', selectedTalkingPhoto);\\nconsole.log('Time-based index:', timeBasedIndex);\\nconsole.log('Time-based selection:', timeBasedSelection);\\nconsole.log('Current time:', Date.now());\\nconsole.log('==================');\\n\\nreturn [{\\n json: {\\n randomTalkingPhoto: timeBasedSelection, // 時間ベースを使用\\n randomBackgroundURL: selectedBackground,\\n debugInfo: {\\n mathRandom: randomValue,\\n mathIndex: randomIndex,\\n mathSelection: selectedTalkingPhoto,\\n timeIndex: timeBasedIndex,\\n timeSelection: timeBasedSelection\\n },\\n timestamp: Date.now()\\n }\\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1024,
1440
],
"id": "59b781df-aacd-454f-998f-bb8a1da738ac",
"name": "Code"
},
{
"parameters": {
"resource": "media",
"mediaUrl": "={{ $('Get Avatar Video').item.json.data.video_url }}"
},
"type": "@blotato/n8n-nodes-blotato.blotato",
"typeVersion": 2,
"position": [
2240,
1376
],
"id": "7ac1baba-8a8a-4b90-a49d-fb1e0890b000",
"name": "Upload media",
"credentials": {
"blotatoApi": {
"id": "zYq0F5Ss0rnb9jv3",
"name": "Blotato account"
}
}
}
],
"pinData": {},
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Write Long Caption",
"type": "main",
"index": 0
}
]
]
},
"Fetch HN Article": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Fetch HN Front Page": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Write Script": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get Avatar Video",
"type": "main",
"index": 0
}
]
]
},
"Get Avatar Video": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Write Long Caption": {
"main": [
[
{
"node": "Write Short Caption",
"type": "main",
"index": 0
}
]
]
},
"Write Short Caption": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Create Avatar Video WITHOUT Background Video": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Upload media",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Create Avatar Video WITHOUT Background Video",
"type": "main",
"index": 0
}
]
]
},
"Tiktok [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 0
}
]
]
},
"Linkedin [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 1
}
]
]
},
"Facebook [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 2
}
]
]
},
"Instagram [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 3
}
]
]
},
"Twitter [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 4
}
]
]
},
"Youtube [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 5
}
]
]
},
"Threads [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 6
}
]
]
},
"Bluesky [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 7
}
]
]
},
"Pinterest [BLOTATO]": {
"main": [
[],
[
{
"node": "Error Report",
"type": "main",
"index": 8
}
]
]
},
"Upload media": {
"main": [
[
{
"node": "Tiktok [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Linkedin [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Facebook [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Instagram [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Twitter [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Youtube [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Threads [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Bluesky [BLOTATO]",
"type": "main",
"index": 0
},
{
"node": "Pinterest [BLOTATO]",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "MX02p5267hV3QWgV"
},
"versionId": "e9d985c9-91d8-4417-9a0f-a578ba834e96",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "ca398cb5db547fc8883f23d62be704a40e0a78b867026c989692ef58f0b4954b"
},
"id": "PKHnxIgTxMZe5qyB",
"tags": []
}