Auto-Generate & Post AI Images to Facebook using Gemini & Pollinations AI

Go to Workflow
433 views
Built by Fahmi Oktafian Fahmi Oktafian
Created on June 06, 2026

Description

This workflow is designed for content creators or AI artists who want to automate posting unique AI-generated images to their Facebook Page multiple times a day. It uses Google Gemini via LangChain to generate imaginative image prompts, and Pollinations AI to generate the images. Posts are published with hashtags and a clean caption.

Who Is It For
AI artists
Facebook page managers
Digital marketers looking for automated creative content

What It Does
Triggers 3x daily at 7:00, 11:00, and 17:00 (local time)
Generates random AI image prompts in a retro-futuristic, cinematic, or surreal style using Google Gemini
Fetches images from Pollinations AI using custom prompts
Posts images automatically to your Facebook Page with hashtags

Requirements
n8n self-hosted or desktop (workflow uses schedule trigger)
Pollinations API (no auth needed)
Facebook Page with Facebook Graph API token:
Required scopes: pages_manage_posts, pages_read_engagement, pages_show_list
Google Gemini API Key (used via LangChain node)

How to Customize
Change the prompt style in the Basic LLM Chain node (promptType: define) to suit your theme.
Adjust Set The Generator Image node if you want:
Different image sizes (width / height)
Different seed randomness
Other Pollinations models (&model=kontext)
Add Telegram/Twitter nodes if you want cross-posting
Use Set node to allow easy user-level configuration of models, hashtags, times, etc.

Nodes Used (5)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Facebook Graph API
n8n-nodes-base.facebookGraphApi
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
HTTP Request
n8n-nodes-base.httpRequest