Quick overview
This workflow runs daily on a schedule, uses Google Gemini to generate a short motivational quote and author, renders it into an image via htmlcsstoimg.com, and posts the resulting photo to a Telegram channel.
How it works
- Runs once per day at the configured hour using a schedule trigger.
- Sends a prompt to Google Gemini to generate an original motivational quote and an author name in a strict two-line format.
- Extracts the quote and author from the Gemini response and falls back to default values if parsing fails.
- Calls the htmlcsstoimg.com API to render the quote and author into a styled 1080×1080 image using an HTML/CSS template.
- Sends the generated image URL to Telegram and posts it as a photo to the configured channel.
Setup
- Add Google Gemini (PaLM) API credentials in n8n for the quote generation step.
- Create a Telegram bot with @BotFather, add it as an admin to your target channel, and connect the bot token as a Telegram credential in n8n.
- Sign up for an htmlcsstoimg.com API key and set it in the HTTP request header as CLIENT-API-KEY.
- Replace @your_channel_username with your Telegram channel username and adjust the schedule time and quote prompt as needed.