Facebook 投稿の自動化
上級
これはMultimodal AI分野の自動化ワークフローで、17個のノードを含みます。主にCode, HttpRequest, Agent, FacebookGraphApi, ChatTriggerなどのノードを使用。 GeminiとRecraft.aiを使用して、Facebook中国語教育投稿を自動化で公開
前提条件
- •ターゲットAPIの認証情報が必要な場合あり
- •Facebook Graph API認証情報
使用ノード (17)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "H0lwQeRTWnK9AfTR",
"meta": {
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
"templateCredsSetupCompleted": true
},
"name": "Facebook Post Automation",
"tags": [
{
"id": "YWorFyHcq8UfkgdY",
"name": "Social Media Automation",
"createdAt": "2025-06-11T03:15:35.832Z",
"updatedAt": "2025-06-11T03:15:35.832Z"
}
],
"nodes": [
{
"id": "cf34bdd0-6e61-41f1-9d71-d44b456fb63e",
"name": "画像生成 (Recraft.ai)",
"type": "n8n-nodes-base.httpRequest",
"position": [
1328,
-592
],
"parameters": {
"url": "https://external.api.recraft.ai/v1/images/generations",
"method": "POST",
"options": {
"response": {},
"allowUnauthorizedCerts": true
},
"jsonBody": "={\n \"prompt\": \"{{ $json.output.image_prompt_brief }}\",\n \"style\": \"digital_illustration\",\n \"substyle\": \"young_adult_book_2\",\n \"size\": \"1024x1024\"\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "ErvYlyGOlyea8toe",
"name": "Recraft.ai"
}
},
"typeVersion": 4.2
},
{
"id": "1ec91a12-971e-48ff-af77-86a35abd4937",
"name": "FB投稿コンテンツ作成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
544,
-592
],
"parameters": {
"text": "=the word: {{ $json.word }}",
"options": {
"systemMessage": "=# ROLE:\nYou are a friendly and knowledgeable Chinese language guru creating viral content for your Thai followers on Facebook. Your persona is like a helpful older friend who makes learning fun and easy. Your goal is to not just teach a word, but to make your followers feel confident using it. \n\n# TASK:\nCreate an engaging and shareable Facebook post to teach a Chinese word. The post must be written primarily in Thai, with Chinese and Pinyin where appropriate. It should be easy to read, visually appealing with emojis, and encourage interaction.\n\n# INPUT:\n1. Thai Word: {thai_meaning or slang}\n2. Chinese Word: {chinese_character}\n3. Pinyin: {pinyin}\n4. Post Ideas : {ideas}\n\n# INSTRUCTIONS & STRUCTURE:\n1. Engaging Hook (ประโยคเปิด):\nStart with a relatable question or a captivating statement in Thai to grab your audience's attention. Make them think, \"Oh, I've always wanted to know how to say that!\"\n\n2. Core Vocabulary (แนะนำคำศัพท์):\nUse the clear and simple format below. Use emojis to make it visually appealing.\n🇨🇳 คำศัพท์ภาษาจีน: [Chinese]\n🗣️ พินอิน (Pinyin): [Pinyin]\n🇹🇭 ความหมาย: [Thai meaning]\n\n3. Real-World Scenarios (ตัวอย่างสถานการณ์จริง):\nProvide at least two different example sentences. Don't just give a dry sentence; frame it as a mini-dialogue or a real-life situation that a Thai person might encounter (e.g., ordering food, shopping, talking with friends, traveling).\nFormat:\nA: [Chinese sentence with the word]\n(Pinyin: [Pinyin for the sentence])\n🇹🇭 Thai Translation: [Thai translation of the sentence]\nB: [A possible reply in Chinese]\n(Pinyin: [Pinyin for the reply])\n🇹🇭 Thai Translation: [Thai translation of the reply]\n\n4. Pro-Tip / Fun Fact (เกร็ดความรู้ / เคล็ดลับ):\nGo beyond a simple fun fact. Offer one of the following:\n4.1 Cultural Insight: How is this word used in a cultural context in China?\n4.2 Common Mistake: Point out a common mistake Thai learners make with this word and how to avoid it.\n4.3 Nuance & Usage: Explain the subtle feeling or specific situation where this word is most appropriate compared to a similar word.\n4.4 Word Breakdown: Briefly explain what the individual characters mean, if it helps with memory (e.g., \"The first character means 'electric' and the second means 'brain', so 'computer' is literally 'electric brain'! 🧠⚡️\").\n\n5. Call to Action & Engagement (ชวนคุย / ปิดท้าย):\nEnd with an open-ended question to encourage comments. For example: \"แล้วเพื่อนๆ เคยใช้คำนี้ในสถานการณ์ไหนกันบ้าง? ลองแต่งประโยคมาแชร์กันใต้คอมเมนต์หน่อยสิคะ! 👇\" (In what situations have you used this word? Try writing a sentence and share it in the comments! 👇)\n\n6. Hashtags (แฮชแท็ก):\nInclude a mix of relevant Thai and English hashtags to increase reach.\nExamples: #เรียนจีน #ภาษาจีน #สอนจีน #เรียนภาษาจีนออนไลน์ #ศัพท์จีน #Chinese #LearnChinese #ภาษาจีนวันละคำ #HSK\n\n# OUTPUT FORMAT:\nReturn your output as a free text to be posted on social media"
},
"promptType": "define",
"hasOutputParser": true
},
"retryOnFail": true,
"typeVersion": 2
},
{
"id": "bfd51a8d-be3e-4649-b03e-91cedd8f40f3",
"name": "構造化出力パーサー2",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1104,
-464
],
"parameters": {
"jsonSchemaExample": "{\n \"image_prompt_brief\": \"YOUR_GENERATED_SENTENCE_HERE\"\n}"
},
"typeVersion": 1.2
},
{
"id": "105e7755-736f-4af6-81d5-09bb0958a5ae",
"name": "画像プロンプト作成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
928,
-592
],
"parameters": {
"text": "={{ $('Code').item.json.input }}",
"options": {
"systemMessage": "=# ROLE:\nYou are a creative concept artist. Your job is to read a social media post and distill its core visual essence into a single, brief sentence.\n\n# INPUT:\nYou will receive an input containing the content of a Facebook post created by the previous agent.\n\n# TASK:\nRead the provided post and generate one brief, descriptive sentence that can be used as a simple prompt for an image generation AI.\n\nYour sentence should:\n1. Capture the main subject, mood, and action of the post.\n2. Be simple, clear, and easy for an image AI to understand.\n3. Do not include technical commands, aspect ratios (--ar), or specific artist names.\n4. Return only 2-3 sentences in plain english word only (no single/doucle quote and any markdown character)\n\n# OUTPUT FORMAT:\nProduce a JSON object with a single key, image_prompt_brief, containing the generated sentence. Try to avoid special characters to the JSON will not error."
},
"promptType": "define",
"hasOutputParser": true
},
"retryOnFail": true,
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "0e3364cb-2bc5-4baf-b25b-89e58689fcc9",
"name": "テキスト画像合成",
"type": "n8n-nodes-base.httpRequest",
"disabled": true,
"position": [
688,
432
],
"parameters": {
"url": "https://api.segmind.com/v1/text-overlay",
"method": "POST",
"options": {
"allowUnauthorizedCerts": true
},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "align",
"value": "right"
},
{
"name": "base64",
"value": "false"
},
{
"name": "blend_mode",
"value": "normal"
},
{
"name": "color",
"value": "#FFF"
},
{
"name": "font",
"value": "JosefinSans-Bold"
},
{
"name": "font_size",
"value": "150"
},
{
"name": "graphspace",
"value": "0"
},
{
"name": "image",
"value": "={{ $json.data[0].url }}"
},
{
"name": "image_format",
"value": "jpeg"
},
{
"name": "image_quality",
"value": "90"
},
{
"name": "linespace",
"value": "10"
},
{
"name": "margin_x",
"value": "97"
},
{
"name": "margin_y",
"value": "300"
},
{
"name": "outline_color",
"value": "#11ff00"
},
{
"name": "outline_size",
"value": "0"
},
{
"name": "text",
"value": "={{ $('Get Thai Word').item.json['Thai Word'] }}"
},
{
"name": "text_underlay",
"value": "false"
},
{
"name": "wrap",
"value": "50"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "b46a5f5f-69b2-4f03-8add-0e24aa674ab4",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
-848
],
"parameters": {
"color": 7,
"width": 360,
"height": 640,
"content": "## Sample Post\n\n\n\n\n"
},
"typeVersion": 1
},
{
"id": "875726ce-cc4a-4f14-9c13-884c5c63632f",
"name": "OpenRouterチャットモデル",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
528,
-416
],
"parameters": {
"model": "google/gemini-2.5-pro",
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "iQS3GMHjRv36CWYD",
"name": "n8n Lin"
}
},
"typeVersion": 1
},
{
"id": "ec0bfaa3-9cd0-47d2-8e9b-28f15459c60f",
"name": "OpenRouterチャットモデル1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
912,
-464
],
"parameters": {
"model": "google/gemini-flash-1.5",
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "iQS3GMHjRv36CWYD",
"name": "n8n Lin"
}
},
"typeVersion": 1
},
{
"id": "3a050584-6eca-4142-9cec-995157ad1527",
"name": "Facebook Graph API",
"type": "n8n-nodes-base.facebookGraphApi",
"position": [
1744,
-592
],
"parameters": {
"edge": "photos",
"node": "348151102062182",
"hostUrl": "=graph.facebook.com",
"options": {
"queryParameters": {
"parameter": [
{
"name": "message",
"value": "={{ $('Create FB Post Content').item.json.output }}"
},
{
"name": "url",
"value": "={{ $json.data[0].url }}"
}
]
}
},
"graphApiVersion": "v22.0",
"httpRequestMethod": "POST"
},
"credentials": {
"facebookGraphApi": {
"id": "4wPWgGkeTCce3Yl7",
"name": "Facebook (Lazy Chinese - Lin n8n App)"
}
},
"typeVersion": 1
},
{
"id": "337a556c-0bd6-47d7-8dc3-47b3752eabf2",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
1632,
-768
],
"parameters": {
"width": 316,
"height": 440,
"content": "## Facebook Post\n\nUse Facebook Graph API to post both text and image in the same post\nhttps://developers.facebook.com/docs/pages-api/posts#publish-a-photo\n"
},
"typeVersion": 1
},
{
"id": "fb1af74d-c403-427a-af21-cb56127e2369",
"name": "チャットメッセージ受信時",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-112,
-592
],
"webhookId": "9858f32f-e903-46ee-b5cb-67a063c53f66",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "01efd89a-f09c-4615-82b0-aa563de782dd",
"name": "コード",
"type": "n8n-nodes-base.code",
"position": [
256,
-592
],
"parameters": {
"jsCode": "// Get the value from chatInput\nconst value = $json.chatInput \n\n// Return the desired structure\nreturn [\n {\n json: {\n word: value,\n input: value\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "adddd78e-f604-4340-a685-4949460378fa",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-224,
-768
],
"parameters": {
"width": 336,
"height": 336,
"content": "## Input\n\nThe input here is from the chat message below. However, please feel free to replace it with GoogleSheet of plan or Email input or anything that works for you."
},
"typeVersion": 1
},
{
"id": "4b0b09cd-d2fd-4843-99fa-01a4f303d35e",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-768
],
"parameters": {
"width": 320,
"height": 336,
"content": "## Copy it to words and input\n\nBecause sometimes the route of n8n will delete the content used earlier, we explicitly split it into 2 variables"
},
"typeVersion": 1
},
{
"id": "687332b1-a3bb-442e-8c11-1efeafb18e2c",
"name": "付箋5",
"type": "n8n-nodes-base.stickyNote",
"position": [
496,
-768
],
"parameters": {
"color": 4,
"width": 320,
"height": 512,
"content": "## Generate Text\n\nUse Openrouter.ai to write the content for Facebook from the input word we've got"
},
"typeVersion": 1
},
{
"id": "5af9aebe-723d-413b-b01b-e1a20b386af0",
"name": "付箋7",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
-768
],
"parameters": {
"color": 6,
"width": 336,
"height": 512,
"content": "## Describe Image\n\nUse AI to describe the words so that we can use this as input to generate image. We make sure it structured so that the API call will not break."
},
"typeVersion": 1
},
{
"id": "3949bee3-2eb7-4044-afc1-116cd05c40d7",
"name": "付箋8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1232,
-768
],
"parameters": {
"color": 6,
"width": 336,
"height": 512,
"content": "## Generate Image\n\nUsing Recraft.ai with specified styled to make sure we have consistent image theme."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "4c01b471-6ed8-4c13-893f-d597f6702642",
"connections": {
"01efd89a-f09c-4615-82b0-aa563de782dd": {
"main": [
[
{
"node": "1ec91a12-971e-48ff-af77-86a35abd4937",
"type": "main",
"index": 0
}
]
]
},
"0e3364cb-2bc5-4baf-b25b-89e58689fcc9": {
"main": [
[]
]
},
"3a050584-6eca-4142-9cec-995157ad1527": {
"main": [
[]
]
},
"105e7755-736f-4af6-81d5-09bb0958a5ae": {
"main": [
[
{
"node": "cf34bdd0-6e61-41f1-9d71-d44b456fb63e",
"type": "main",
"index": 0
}
]
]
},
"875726ce-cc4a-4f14-9c13-884c5c63632f": {
"ai_languageModel": [
[
{
"node": "1ec91a12-971e-48ff-af77-86a35abd4937",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"1ec91a12-971e-48ff-af77-86a35abd4937": {
"main": [
[
{
"node": "105e7755-736f-4af6-81d5-09bb0958a5ae",
"type": "main",
"index": 0
}
]
]
},
"ec0bfaa3-9cd0-47d2-8e9b-28f15459c60f": {
"ai_languageModel": [
[
{
"node": "105e7755-736f-4af6-81d5-09bb0958a5ae",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"bfd51a8d-be3e-4649-b03e-91cedd8f40f3": {
"ai_outputParser": [
[
{
"node": "105e7755-736f-4af6-81d5-09bb0958a5ae",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"fb1af74d-c403-427a-af21-cb56127e2369": {
"main": [
[
{
"node": "01efd89a-f09c-4615-82b0-aa563de782dd",
"type": "main",
"index": 0
}
]
]
},
"cf34bdd0-6e61-41f1-9d71-d44b456fb63e": {
"main": [
[
{
"node": "3a050584-6eca-4142-9cec-995157ad1527",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - マルチモーダルAI
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
財務書類の自動処理
Google Gemini OCRを使った財務文書自動処理ツール
Set
Code
Merge
+
Set
Code
Merge
76 ノードDidac Fernandez
コンテンツ作成
✨🩷自動化ソーシャルメディアコンテンツ公開工厂 + 系统提示组合
基于动态系统提示とGPT-4oのAI驱动多平台ソーシャルメディアコンテンツ工厂
If
Set
Code
+
If
Set
Code
100 ノードAmit Mehta
コンテンツ作成
Danelfin、TwelveData、Alpha Vantage を基にした AI 株式分析
Danelfin、TwelveData、Alpha Vantage を統合した AI 株式分析システム
Set
Code
Gmail
+
Set
Code
Gmail
74 ノードPaul
仮想通貨取引
不動産検索クローラーアシスタント
PropertyFinder.ae、OpenRouter、SerpAPIを使ってAIで不動産に関する質問に回答する
If
Set
Code
+
If
Set
Code
18 ノードGeorge Zargaryan
その他
キーワードからGPT-5とfal.ai画像を使ってWordPressまで自動SEOブログ生成のプロセス
GPT-5とfal.ai画像を使用したキーワードからWordPressへのSEOブログ自動化プロセス
Set
Code
Wait
+
Set
Code
Wait
96 ノードPaul
コンテンツ作成
GPT-4oとClaudeマルチエージェントシステムを使ってShopify SEOコンテンツ作成を自動化
GPT-4oとClaudeマルチアジェントシステムを使用してShopifyのSEOコンテンツ作成を自動化
Set
Code
Shopify
+
Set
Code
Shopify
92 ノードKumar Shivam
コンテンツ作成