Create Facebook posts and images with Google Gemini and Facebook Graph API
 This n8n template automates the creation of professional Facebook posts and visually striking illustrations directly from simple raw text. If you want to maintain a consiste...
Template notes

This n8n template automates the creation of professional Facebook posts and visually striking illustrations directly from simple raw text. If you want to maintain a consistent social media presence without spending hours writing copy and designing images, this workflow is perfect for you.
How it works
Trigger & Configuration: The workflow begins with your raw text and brand guidelines, configured entirely within a single Set Context node. AI Copywriting: A Google Gemini Agent analyzes the input and crafts an engaging Facebook caption—complete with hooks, emojis, and hashtags—alongside a highly detailed image generation prompt. Image Processing: The workflow intelligently branches. If you provide an original image, Gemini edits and enhances it for social media. If no image is provided, Gemini generates a brand-new illustration from scratch. Facebook Publishing: The final text and image are automatically published to your Facebook Fanpage via the Graph API.

How to use
1. Connect your Google Gemini API key in the AI Agent and Language Model nodes. 2. Connect your Facebook Graph API credentials in the Post to Facebook node. 3. Edit the Set Context node to update the rawcontent, fanpagename, contentstyle, and your specific pageid. 4. Run the workflow to automatically generate and publish your content.
Requirements