Block 1 - Gemini Chat Model
- Type / Role
- @n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
This n8n workflow is a Telegram bot that allows users to either: Generate AI images using Pollinations API, or Generate blog articles using Gemini AI Users simply type image your prompt or blog you...
@n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.telegramtrigger, n8n-nodes-base.code, n8n-nodes-base.switch, n8n-nodes-base.telegram, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.httprequest
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Fahmi Oktafian.
Original n8n.io sourceThis template is ideal for:
Content creators and marketers who want to generate visual and written content quickly
Telegram bot developers looking for real-world AI integration
Educators or students automating content workflows
Anyone managing content pipelines using Google Sheets
Trigger Telegram Message: Listens for new messages or button clicks via Telegram
Classify Telegram Input: JavaScript logic to classify input as /start, /help, normal text, or callback
Switch Input Type: Directs the flow based on the classification
Send Main Menu to User: Shows "Generate Image", "Blog Article", "Help" options
Switch Callback Selection: Routes based on button pressed (image, blog, or help)
Send Help Instructions: Sends markdown instructions on how to use the bot
Validate Command Format: Ensures input starts with image or blog
Notify Invalid Input Format: If validation fails, informs user of correct format
Prompt User for Image Description → When user clicks Generate Image
Detect Text-Based Input Type → Detects if text is image or blog
Switch Text Command Type → Directs whether to generate image or article
Show Typing for Image Generation → Sends "uploading photo..." typing status
Build Image Generation URL → Constructs Pollinations API image URL from prompt
Download AI Image → Makes HTTP request to get the image
Send Image Result to Telegram → Sends image to user via Telegram
Log Image Prompt to Google Sheets → Logs prompt, image URL, date, and user ID
Upload Image to Google Drive → Saves image to Google Drive folder
Prompt User for Blog Title → When user clicks Blog Article
Store Blog Prompt → Saves prompt for later use
Log Blog Prompt to Google Sheets → Writes title + user ID to Google Sheets
Send Article Style Options → Offers: Formal, Casual, or News style
Store Selected Article Style → Updates row with chosen style in Google Sheets
Fetch Last User Prompt → Finds the latest prompt submitted by this user
Extract Last Blog Prompt → Extracts row for use in AI request
Gemini Chat Wrapper → Handles input into LangChain node for AI processing
Generate Article with Gemini → Calls Gemini to create 3-paragraph blog post
Parse Gemini Response → Parses JSON string to extract title and content
Send Article to Telegram → Sends blog article result back to user
Log Final Article to Google Sheets → Updates row with final content and timestamp
Clone the workflow and import it into your n8n instance
Set credentials:
Replace:
Deploy and send /start in your Telegram bot
Edit the Gemini prompt to adjust article length or tone
Add extra style buttons like "SEO", "Story", "Academic"
Add image post-processing (e.g. compression, renaming)
Add error catching logic (e.g. if Pollinations image fails)
Store images with filenames based on timestamp/user
Use n8n credentials for all tokens (Telegram, Gemini, Sheets, Drive)
Never hardcode your token inside HTTP nodes
Do not expose real Google Sheet or Drive links in shared version
Use Set node to collect all editable variables (like folder ID, sheet name)
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.
Showing the first 24 of 34 workflow blocks. Download the JSON for the full node graph.
| Workflow | Generate images with Pollinations & blog articles with Gemini 2.5 from Telegram |
|---|---|
| Complexity | advanced |
| Nodes | 34 |
| Categories | Content Creation, Multimodal AI |
| Author | Fahmi Oktafian |
| Published | 10 Jul 2025 |
Use the JSON export at /data/workflows/5844/5844.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.
This n8n workflow is a Telegram bot that allows users to either: Generate AI images using Pollinations API, or Generate blog articles using Gemini AI Users simply type image your prompt or blog you...
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 Content Creation, Multimodal AI use case.