← Back to work

Case Study · 2025

Telegram LLM Mail Composer

Type a casual message and a recipient in Telegram — an LLM turns it into a structured, professional email and sends it automatically.

Focusn8n · Telegram Bot · LLM · Automation
AUTOMATION

Context

Writing a proper email — even a short leave request — takes more effort than the message deserves. I built an n8n workflow where a user sends a recipient's email and a rough, informal note to a Telegram bot, and the bot replies by composing and sending a fully structured email on their behalf.

The Problem

People often know exactly what they want to say but not how to phrase it formally, and switching to an email client to write, format, and send a short message breaks their flow. The bot needed to take unstructured input like 'tomorrow I want leave' and turn it into a coherent, properly formatted email without losing the original intent.

Process

01

Telegram trigger

Set up a trigger node that listens for incoming messages, parsing out the recipient's email address and the raw request text from the user's input.

02

LLM structuring

Passed the raw message to an LLM with a prompt designed to infer intent (e.g. leave request, meeting ask) and generate a subject line, greeting, body, and sign-off — converting casual phrasing into a professional structured email.

03

Automated send

Fed the LLM's structured output into an email-send node, dispatching the finished email directly to the target recipient without further manual editing.

Design Decisions

LLM as the formatting layer, not just a text generator

Rather than sending the raw message as-is, letting the LLM restructure it ensures the recipient gets something that reads as intentional and professional, regardless of how casually the user phrased the original request.

Outcome

✦ Turned informal, one-line requests into properly formatted emails automatically

✦ Removed the need to open an email client for quick, routine messages

Reflection

“A lot of email friction isn't about what to say — it's about how to say it. Letting the LLM handle structure while the user just states intent collapses a multi-step task into a single chat message.”