AI Content Engine

Daily Motivation → Telegram

A scheduled AI-powered automation that generates unique motivational quotes and delivers them daily to Telegram.
n8n OpenAI / GPT JavaScript Telegram API

Context & Problem

Business Case

Users and content creators want daily motivation with clean formatting, consistent delivery times, and original content—without the manual effort of writing and posting every day.

The Challenge: Static quote databases become repetitive. Manual creation is time-consuming. The system needed to generate unique, high-quality text, format it professionally, and automate the delivery process.

Goal: Build an automation that runs daily, generates an original motivational quote via LLM, cleans and formats the output, and posts it to Telegram automatically.

Implementation

Architecture & Logic

The workflow uses a Cron trigger for daily scheduling. It prompts GPT-4o Mini with strict constraints (max 160 chars, no clichés) to generate a quote. A Code Node then post-processes the text—removing quotes, adding dates and hashtags—before sending it via the Telegram API.

Workflow: Cron -> LLM -> Code -> Telegram
Fig 1. n8n Workflow for AI content generation
JavaScript / Code Node
// 1. Extract LLM output
let text = $json.answer || $json.output || "Stay focused.";

// 2. Clean text (remove surrounding quotes)
text = text.replace(/^["']|["']$/g, '');

// 3. Format Date (Ukrainian locale)
const date = new Date().toLocaleDateString('uk-UA', {
  day: '2-digit', month: '2-digit', year: 'numeric'
});

// 4. Build Structured Message
const message = `
🌿 Рух дня · ${date}

✨ ${text}

🔥 #мотивація
🎯 #фокус
🚀 #звичка
`;

// 5. Return for Telegram Node
return { json: { message } };

Output & Results

Real Production Output
Telegram Message: AI Motivation Quote
Fig 2. AI-generated message received in Telegram
Quantitative
  • Daily execution (09:00)
  • Original content
  • Zero manual work
Qualitative
  • Prompt engineering
  • Clean layout formatting
  • Fallback logic active
Business Value
  • Channel growth automation
  • Personal branding tool
  • Scalable content strategy

Export Workflow

Download the ready-to-use n8n workflow JSON file. Import it directly into your n8n instance.