This workflow corresponds to n8n.io template #8756 — we link there as the canonical source.
This workflow follows the Chainllm → Form Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"nodes": [
{
"id": "c79bacb7-1910-4467-a904-af2bc4439df4",
"name": "If2",
"type": "n8n-nodes-base.if",
"position": [
-1056,
1264
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "809ee214-220b-4344-a75c-c5b9d9f8021d",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ !!$json.prompt_image }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "6d8b7fa3-2660-49ec-a26b-a82537506004",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
400,
1488
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d5c84381-db43-4375-ba9f-79404a34f520",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.post_supports_client_mutation_id }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "6a4e8e34-9b02-407b-ad14-f997fc1d86b8",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
-32,
1488
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.1,
"alwaysOutputData": true
},
{
"id": "e5863143-f99e-42e5-8dea-de3b52ec438d",
"name": "Facebook Graph API",
"type": "n8n-nodes-base.facebookGraphApi",
"position": [
176,
1488
],
"parameters": {
"edge": "feed",
"node": "113732581629527",
"options": {
"queryParameters": {
"parameter": [
{
"name": "message",
"value": "={{ $('Format Content').item.json.content }}"
},
{
"name": "attached_media",
"value": "={{ $json.id ? `[{\"media_fbid\":\"${$json.id}\"}]` : \"\" }}"
}
]
}
},
"graphApiVersion": "v22.0",
"httpRequestMethod": "POST"
},
"credentials": {
"facebookGraphApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "0072f8aa-e0c7-423c-98b1-6739e523d600",
"name": "Facebook Upload Img",
"type": "n8n-nodes-base.facebookGraphApi",
"onError": "continueRegularOutput",
"position": [
-272,
1248
],
"parameters": {
"edge": "photos",
"node": "113732581629527",
"options": {
"queryParameters": {
"parameter": [
{
"name": "published",
"value": "false"
}
]
}
},
"sendBinaryData": true,
"graphApiVersion": "v22.0",
"httpRequestMethod": "POST",
"binaryPropertyName": "data"
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "54431a5d-e2cd-4fec-9ae6-f0d32398fa0e",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
-1968,
1520
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cfb85fb7-2dbd-4122-83bd-9083fb029d25",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json[\"Content\"] ? $json[\"Content\"].length > 0 : (\n $json[\"message\"]?.text?.length >= 50\n) }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "63a571c9-790c-42a8-ad8d-b726f49ac025",
"name": "Format Content",
"type": "n8n-nodes-base.function",
"position": [
-400,
1504
],
"parameters": {
"functionCode": "const raw =\n $json[\"N\u1ed9i dung \u0111\u1ea7y \u0111\u1ee7\"] ||\n $json.message?.content ||\n \"\";\n\nconst cleaned = raw.replace(/[#*]+/g, \"\").trim();\n\nreturn [\n {\n json: {\n content: cleaned,\n platform: \"facebook\",\n },\n },\n];"
},
"typeVersion": 1
},
{
"id": "3c56769c-2757-4e7c-9aa1-5b340040bb98",
"name": "save content",
"type": "n8n-nodes-base.googleSheets",
"onError": "continueRegularOutput",
"position": [
-624,
1504
],
"parameters": {
"columns": {
"value": {
"Ng\u00e0y": "={{ new Date().toLocaleDateString(\"vi-VN\") }}",
"N\u1ed9i dung ng\u1eafn": "={{ $('code2').item.json.content }}",
"N\u1ed9i dung \u0111\u1ea7y \u0111\u1ee7": "={{ $json.text?.trim() ? $json.text : $json.message?.content }}"
},
"schema": [
{
"id": "Ng\u00e0y",
"type": "string",
"display": true,
"required": false,
"displayName": "Ng\u00e0y",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "N\u1ed9i dung ng\u1eafn",
"type": "string",
"display": true,
"required": false,
"displayName": "N\u1ed9i dung ng\u1eafn",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "N\u1ed9i dung \u0111\u1ea7y \u0111\u1ee7",
"type": "string",
"display": true,
"required": false,
"displayName": "N\u1ed9i dung \u0111\u1ea7y \u0111\u1ee7",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TBcyVVQ6JVNkvw8qFFbuct_3WxtggOBnI1kwUXMyTY8/edit#gid=0",
"cachedResultName": "T\u1ef1 \u0111\u1ed9ng"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1TBcyVVQ6JVNkvw8qFFbuct_3WxtggOBnI1kwUXMyTY8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1TBcyVVQ6JVNkvw8qFFbuct_3WxtggOBnI1kwUXMyTY8/edit?usp=drivesdk",
"cachedResultName": "ai5phut_AutoPost_Demo"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"retryOnFail": false,
"typeVersion": 4.5,
"alwaysOutputData": true
},
{
"id": "d3978e2b-0dee-405f-ae89-814e75289d7b",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"onError": "continueRegularOutput",
"position": [
-1728,
1504
],
"parameters": {
"text": "=You are a marketing content writer. Here is the input content. Do 3 things:\n\n1. Quickly analyze the content.\n\n2. Bullet out the main points to write the article (content marketing or social media post).\n\n3. Return the correct format requested, **no further explanation**, **no additional paragraphs other than the following JSON**.\n\nReturn the result in the following format:\n{\n\"prompt_image\": \"...\",\n\"content\": \"...\"\n}\n\n---\n\"prompt_image\": [write a prompt to create an AI image that matches the content, note: absolutely do not put text in the image, only describe the image and appropriate design style]\n\n\"content\": [write complete, clear, concise, and focused content that can be posted on Facebook, website, or blog]\n\nContent to be processed:\n\"\"\n{{\n$json.message?.text?.trim()\n? $json.message.text\n: $json.content?.trim()\n? $json.content\n: $json['Content']?.trim()\n? $json['Content']\n: \"\"\n}}\n\"\"\"",
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6,
"alwaysOutputData": true
},
{
"id": "9521d4e2-c7d9-4b91-a5a9-eb01f1b76f58",
"name": "Basic LLM Chain1",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-1024,
1504
],
"parameters": {
"text": "=You are a social media content writer. Here is a summary of the content that has been analyzed by AI. Let's turn it into **a complete article**, with the following requirements:\n\n1. **Keep the spirit and main message of the content intact.**\n2. Rewrite it into a coherent article, with a clear introduction - body - conclusion.\n3. Use a **friendly, approachable tone**, easy to understand, suitable for posting on Facebook\n4. Use emojis sparingly to increase attraction (if appropriate).\n5. Keep the length moderate (from 200\u2013350 words).\n6. **Do not insert titles or #hashtags**, just focus on the main content.\n\nHere is the summary:\n\"\"\n{{ $json.content }}\n\"\"\"",
"promptType": "define"
},
"typeVersion": 1.6,
"alwaysOutputData": true
},
{
"id": "ca94be67-d90b-4709-b9dc-0a37d6178a22",
"name": "Convert to File code",
"type": "n8n-nodes-base.code",
"onError": "continueRegularOutput",
"position": [
-496,
1248
],
"parameters": {
"jsCode": "const base64Data = $json.data[0].b64_json;\n\nif (!base64Data) {\n throw new Error(\"Kh\u00f4ng t\u00ecm th\u1ea5y d\u1eef li\u1ec7u \u1ea3nh base64.\");\n}\n\nreturn [\n {\n json: {},\n binary: {\n data: {\n data: base64Data,\n mimeType: \"image/png\",\n fileName: \"image.png\"\n }\n }\n }\n];\n"
},
"retryOnFail": true,
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "6357acfa-99b4-45c8-80e9-65c3fb267071",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-1728,
1712
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash-001"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "860674d1-d0f1-4e7a-aeeb-ee78d2a3ae1c",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-1024,
1696
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash-001"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "f4ebfcd4-5aeb-4292-b0d9-a3dc52eb75b3",
"name": "code2",
"type": "n8n-nodes-base.code",
"position": [
-1344,
1504
],
"parameters": {
"jsCode": "let rawText = $json.text || '';\n\n// B\u01b0\u1edbc 1: T\u00e1ch ph\u1ea7n JSON b\u00ean trong ```json ... ```\nconst matched = rawText.match(/```json\\s*([\\s\\S]*?)\\s*```/);\n\nif (!matched || !matched[1]) {\n return [{ json: { prompt_image: '', content: '', error: 'Can not find JSON in ```json```' } }];\n}\n\nlet jsonString = matched[1]\n .replace(/\\n/g, '') // Xo\u00e1 xu\u1ed1ng d\u00f2ng\n .replace(/\\r/g, '') // Xo\u00e1 carriage return\n .replace(/\\t/g, '') // Xo\u00e1 tab (n\u1ebfu c\u00f3)\n .trim();\n\ntry {\n const parsed = JSON.parse(jsonString);\n return [{\n json: {\n prompt_image: parsed.prompt_image || '',\n content: parsed.content || ''\n }\n }];\n} catch (err) {\n return [{\n json: {\n prompt_image: '',\n content: '',\n error: 'error parse JSON: ' + err.message\n }\n }];\n}"
},
"typeVersion": 2
},
{
"id": "b3e26901-72f3-4304-b6d9-6c97b9e9d02a",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
-800,
1248
],
"parameters": {
"url": "https://router.huggingface.co/together/v1/images/generations",
"method": "POST",
"options": {},
"jsonBody": "={\n \"response_format\": \"b64_json\",\n \"prompt\": \"{{ $json.prompt_image }}\",\n \"model\": \"black-forest-labs/FLUX.1-schnell\"\n}\n",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer <key>"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "4006af3a-f2e9-45f7-85c5-966c1c82d2e6",
"name": "On form submission1",
"type": "n8n-nodes-base.formTrigger",
"position": [
-2576,
1520
],
"parameters": {
"options": {
"buttonLabel": "G\u1eedi th\u00f4ng tin",
"appendAttribution": false,
"respondWithOptions": {
"values": {
"formSubmittedText": "Information sent"
}
}
},
"formTitle": "Input the post idea",
"formFields": {
"values": [
{
"fieldType": "textarea",
"fieldLabel": "Input Information here",
"placeholder": "At least 50 words",
"requiredField": true
}
]
},
"formDescription": "Input the idea that you want upload to Facebook,"
},
"typeVersion": 2.2
},
{
"id": "ca09e6e7-3536-432d-9f68-d2455194061b",
"name": "Append row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
-2272,
1520
],
"parameters": {
"columns": {
"value": {
"Date": "={{ $now.toFormat(\"dd/MM/yyyy\") }}",
"Time": "={{ $now.toFormat(\"HH\") }}",
"Content": "={{ $json[\"Input Information here\"] }}"
},
"schema": [
{
"id": "Date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Time",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Time",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Content",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Content",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1icCYSzDhpAc4itXrfwxhjQgisKye-mtdR8UwyZfS1m8/edit#gid=0",
"cachedResultName": "Post via form"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1icCYSzDhpAc4itXrfwxhjQgisKye-mtdR8UwyZfS1m8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1icCYSzDhpAc4itXrfwxhjQgisKye-mtdR8UwyZfS1m8/edit?usp=drivesdk",
"cachedResultName": "Content"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.5,
"alwaysOutputData": true
},
{
"id": "0ce21a3e-5ab5-477d-89a9-606ee4e84dfa",
"name": "Send a message",
"type": "n8n-nodes-base.gmail",
"position": [
624,
1472
],
"parameters": {
"sendTo": "user@example.com",
"message": "=\u2705 The post will be published after 2 minutes!\n\ud83d\udcc4 Review in: https://facebook.com/{{ $json.id.split('_')[0] }}/posts/{{ $json.id.split('_')[1] }}",
"options": {
"appendAttribution": false
},
"subject": "\u2705 The draft version is uploaded"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "b38bbebe-cf2a-4d94-b6ce-f8ecd3c26d23",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3392,
464
],
"parameters": {
"width": 672,
"height": 1264,
"content": "# Complete Setup Guide: AI Facebook Post Generator\n\n## Prerequisites Checklist\n\nBefore starting, ensure you have:\n- [ ] n8n instance (cloud or self-hosted)\n- [ ] Facebook Business Page (not personal profile)\n- [ ] Google account with access to Sheets and Gmail\n- [ ] Basic understanding of API credentials\n\n**Estimated Setup Time**: 30-45 minutes\n\n---\n\n## Step 1: Facebook Integration Setup\n\n### 1.1 Create Facebook App\n1. Go to [Facebook Developers](https://developers.facebook.com/)\n2. Click **\"My Apps\"** \u2192 **\"Create App\"**\n3. Choose **\"Business\"** as app type\n4. Enter app name: `n8n-facebook-poster` (or your preferred name)\n5. Click **\"Create App\"**\n\n### 1.2 Configure Facebook App\n1. In your app dashboard, go to **\"Add a Product\"**\n2. Find **\"Facebook Login\"** and click **\"Set Up\"**\n3. Go to **Settings** \u2192 **Basic**\n4. Add your domain to **\"App Domains\"** (for n8n cloud: `app.n8n.cloud`)\n5. Save changes\n\n### 1.3 Get Page Access Token\n1. Go to **Tools** \u2192 **Graph API Explorer**\n2. Select your app from the dropdown\n3. Click **\"Generate Access Token\"**\n4. Grant permissions: `pages_manage_posts`, `pages_read_engagement`, `pages_show_list`\n5. Select your Facebook page\n6. Copy the **Page Access Token** (starts with `EAAG...`)\n7. **Important**: Extend token to long-lived:\n - Use Graph API Explorer\n - Make GET request to: `/oauth/access_token?grant_type=fb_exchange_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&fb_exchange_token=YOUR_SHORT_TOKEN`\n\n### 1.4 Get Your Page ID\n1. Go to your Facebook page\n2. Click **\"About\"** tab\n3. Scroll down to find **\"Page ID\"** or\n4. Use Graph API Explorer: GET request to `/me/accounts` with your token\n\n---"
},
"typeVersion": 1
},
{
"id": "2f98cd9a-6ffc-4898-9faa-dd82c220ce65",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2416,
368
],
"parameters": {
"color": 3,
"width": 656,
"height": 1040,
"content": "\n## Step 2: Google Services Setup\n\n### 2.1 Enable Google APIs\n1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Create new project or select existing one\n3. Go to **\"APIs & Services\"** \u2192 **\"Library\"**\n4. Enable these APIs:\n - Google Sheets API\n - Gmail API\n - Google Drive API (optional)\n\n### 2.2 Create Service Account\n1. Go to **\"APIs & Services\"** \u2192 **\"Credentials\"**\n2. Click **\"Create Credentials\"** \u2192 **\"Service Account\"**\n3. Name: `n8n-facebook-automation`\n4. Click **\"Create and Continue\"**\n5. Skip role assignment (click **\"Continue\"**)\n6. Click **\"Done\"**\n\n### 2.3 Generate Service Account Key\n1. Click on your service account email\n2. Go to **\"Keys\"** tab\n3. Click **\"Add Key\"** \u2192 **\"Create New Key\"**\n4. Choose **\"JSON\"** format\n5. Download the JSON file (save securely)\n\n### 2.4 Prepare Google Sheets\n1. Create two Google Sheets:\n - **Content Log Sheet**: For tracking generated content\n - **Input Tracking Sheet**: For logging form submissions\n\n2. **Content Log Sheet Structure**:\n - Column A: (Date)\n - Column B: (Short Content)\n - Column C: (Full Content)\n\n3. **Input Tracking Sheet Structure**:\n - Column A: \"Date\"\n - Column B: \"Time\"\n - Column C: \"Content\"\n\n4. Share both sheets with your service account email (found in the JSON file)\n\n---\n"
},
"typeVersion": 1
},
{
"id": "dca9ca80-5913-4236-aa21-e0c87bbe0859",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
272,
-48
],
"parameters": {
"color": 4,
"width": 928,
"height": 1440,
"content": "\n## Step 3: AI Services Setup\n\n### Get Gemini API Key\n1. Go to [Google AI Studio](https://makersuite.google.com/app/apikey)\n2. Sign in with your Google account\n3. Click **\"Create API Key\"**\n4. Copy the API key (starts with `AIza...`)\n---\n\n## Step 4: n8n Configuration\n\n### 4.1 Import the Workflow\n1. Copy the workflow JSON from the template\n2. In n8n, click **\"Import from JSON\"**\n3. Paste the workflow JSON\n4. Click **\"Import\"**\n\n### 4.2 Configure Credentials\n\n#### Facebook Graph API Credentials\n1. Go to **Settings** \u2192 **Credentials**\n2. Click **\"Add Credential\"**\n3. Search for **\"Facebook Graph API\"**\n4. Enter:\n - **Access Token**: Your Page Access Token from Step 1.3\n5. Test the connection\n6. Save as: `Facebook Page Access`\n\n#### Google Credentials \n1. Add **\"Google Service Account\"** credential\n2. Upload the JSON file from Step 2.3\n3. Test connection\n4. Save as: `Google Services`\n\n#### Gemini API Credentials\n1. Add **\"Google PaLM API\"** credential\n2. Enter your Gemini API key from Step 3.1\n3. Save as: `Gemini AI`\n\n### 4.3 Update Node Configurations\n\n#### Update Facebook Page ID\n1. Open **\"Facebook Graph API\"** node\n2. Replace `\"113732581629527\"` with your actual Page ID from Step 1.4\n3. Do the same for **\"Facebook Upload Img\"** node\n\n#### Update Google Sheets IDs\n1. Open **\"save content\"** node\n2. Replace the Document ID with your Content Log Sheet ID\n3. Open **\"Append row in sheet\"** node \n4. Replace the Document ID with your Input Tracking Sheet ID\n\n**To find Sheet ID**: Look at the URL - it's the long string after `/spreadsheets/d/`\n\n#### Update Email Address\n1. Open **\"Send a message\"** node\n2. Replace `xxx@gmail.com` with your email\n3. Configure Gmail credentials if not already done\n\n---\n"
},
"typeVersion": 1
},
{
"id": "9ec09d40-9548-42e2-8e41-bbd8e9490fb2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
1728
],
"parameters": {
"color": 6,
"width": 464,
"height": 736,
"content": "\n## Step 5: Testing & Validation\n\n### 5.1 Test Individual Components\n\n#### Test Google Sheets Connection\n1. Right-click **\"Append row in sheet\"** node\n2. Click **\"Execute Node\"**\n3. Check if a test row appears in your sheet\n\n#### Test Gemini AI\n1. Right-click **\"Basic LLM Chain\"** node\n2. Add test data in **\"Edit Input Data\"**\n3. Execute and verify AI response\n\n#### Test Image Generation\n1. Right-click **\"HTTP Request\"** node\n2. Ensure it has a valid prompt from previous step\n3. Execute and check for base64 image data\n\n#### Test Facebook Upload\n1. Run the full workflow with test content\n2. Check your Facebook page for the post\n3. Verify image uploaded correctly\n\n### 5.2 End-to-End Test\n1. Click **\"Execute Workflow\"** on the trigger node\n2. Submit test content through the form\n3. Monitor each node's execution\n4. Verify final Facebook post"
},
"typeVersion": 1
}
],
"connections": {
"If": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"If2": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Facebook Graph API",
"type": "main",
"index": 0
}
]
]
},
"code2": {
"main": [
[
{
"node": "If2",
"type": "main",
"index": 0
},
{
"node": "Basic LLM Chain1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Convert to File code",
"type": "main",
"index": 0
}
]
]
},
"save content": {
"main": [
[
{
"node": "Format Content",
"type": "main",
"index": 0
}
]
]
},
"Format Content": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "code2",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain1": {
"main": [
[
{
"node": "save content",
"type": "main",
"index": 0
}
]
]
},
"Facebook Graph API": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Facebook Upload Img": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"On form submission1": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Convert to File code": {
"main": [
[
{
"node": "Facebook Upload Img",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain1",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
facebookGraphApigmailOAuth2googlePalmApigoogleSheetsOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
> Transform your content ideas into viral Facebook posts with AI-powered automation in just 30 minutes!
Source: https://n8n.io/workflows/8756/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automate your lead intake, scoring, and outreach pipeline. This workflow collects leads from forms, enriches and scores them using Relevance AI, routes them by quality, and triggers the right follow-u
Transform your sales pipeline with this comprehensive AI-powered platform that automates lead capture, scoring, revenue prediction, and sales team coordination. Perfect for B2B teams processing 50+ le
Content creators, YouTubers, marketing agencies, and social media managers who want to optimize their YouTube videos for better discoverability and engagement. Perfect for teams managing multiple chan
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
The workflow runs every hour with a randomized delay of 5–20 minutes to help distribute load. It records the exact date and time a lead is emailed so you can track outreach. Follow-ups are automatical