Block 1 - If2
- Type / Role
- n8n-nodes-base.if - if
- Config choices
- Version 2.2
This workflow is provided as-is. Please review and test before using in production.
AI Facebook Post Generator Complete Setup Guide Transform your content ideas into viral Facebook posts with AI powered automation in just 30 minutes! Prerequisites Checklist What you'll ...
n8n-nodes-base.if, n8n-nodes-base.merge, n8n-nodes-base.facebookgraphapi, n8n-nodes-base.function, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.lmchatgooglegemini
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Charles.
Original n8n.io source> Transform your content ideas into viral Facebook posts with AI-powered automation in just 30 minutes!
What you'll need before we start:
β±οΈ Estimated Setup Time: 30-45 minutes
π― Difficulty Level: Intermediate
π° Cost: Free tier available for all services
By the end of this guide, you'll have:
Why this matters: This gives your workflow permission to post on your behalf.
AI-Content-Poster (or your preferred name)> π‘ Pro Tip: Choose a descriptive name - you'll see this in your Facebook activity logs
app.n8n.cloud (for n8n cloud users)This is the key that unlocks posting powers! π
pages_manage_postspages_read_engagementpages_show_listEAAG...)β οΈ Critical Step - Make Token Long-Lived:
/oauth/access_token?grant_type=fb_exchange_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&fb_exchange_token=YOUR_SHORT_TOKEN
Two methods to get your Page ID:
Method 1 - Direct from Facebook:
Method 2 - API Explorer:
/me/accountsSetting up your Google Cloud foundation:
This creates a "robot" account for automated access:
ai-facebook-automation> π Security Note: This file contains sensitive credentials. Store it safely!
Create your data tracking system:
π Sheet 1: Content Log
π Sheet 2: Input Tracking
π Important: Share both sheets with your service account email (found in the JSON file)
Power up your AI content generation:
AIza...)> π° Cost Info: Gemini offers generous free tier limits - perfect for getting started!
π Facebook Graph API Setup:
Facebook Page Accessπ Google Services Setup:
Google Servicesπ§ Gemini AI Setup:
Gemini AIπ± Update Facebook Configuration:
In "Facebook Graph API" node:
"113732581629527" with your Page ID from Step 1.4In "Facebook Upload Img" node:
"113732581629527" with your Page ID from Step 1.4π Update Google Sheets:
In "save content" node:
In "Append row in sheet" node:
> π‘ Finding Sheet ID: It's the long string in your Google Sheets URL after /spreadsheets/d/
π§ Update Notification Email:
In "Send a message" node:
[email protected] with your email addressπ Test Google Sheets Connection:
π€ Test Gemini AI:
πΌοΈ Test Image Generation:
π± Test Facebook Upload:
Your setup is complete when you see:
Make it uniquely yours:
Congratulations! You've built an AI-powered content machine that will save you hours every week.
What's Next?
Need Help? π€
Ready to revolutionize your content creation? Your AI assistant is waiting! π
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Generate viral Facebook posts with Gemini 2.0 & AI image generation |
|---|---|
| Complexity | advanced |
| Nodes | 22 |
| Categories | Social Media, Multimodal AI |
| Author | Charles |
| Published | 19 Sept 2025 |
Use the JSON export at /data/workflows/8756/8756.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
AI Facebook Post Generator Complete Setup Guide Transform your content ideas into viral Facebook posts with AI powered automation in just 30 minutes! Prerequisites Checklist What you'll ...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, Multimodal AI use case.