🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Telegram + SparkPost: self-serve demo emails sent fast

Lisa Granqvist Partner Workflow Automation Expert

Your “book a demo” flow looks fine on paper. In real life, it’s a mess of half-filled forms, vague requests, and follow-up emails you swear you’ll send “later.” Later turns into never.

This Telegram SparkPost emails automation hits agency owners first, because every inbound lead steals attention from delivery. But marketing leads and solo consultants feel the same drag when interest comes in bursts and you can’t respond fast enough.

This workflow turns a Telegram chat into a personalized “demo email” sent via SparkPost, with logging and guardrails built in. You’ll see how it works, what you need, and what to tweak so it matches your offer.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Telegram + SparkPost: self-serve demo emails sent fast

The Problem: Demo Requests Create Invisible Busywork

“Can you show me how it works?” sounds like a simple question until you’re the one answering it all day. You ask for a website. You ask what they do. You paste their copy into an email draft. You hunt for a couple relevant pages, then you try to write something that feels personalized but doesn’t take 30 minutes. And if you’re not careful, you’ll send a “demo email” that’s either too generic to convert, or too custom to scale. That middle zone is where leads quietly die.

The friction compounds. Here’s where it breaks down in most teams.

  • You end up rewriting the same explanation of your workflow offer, just with different company names and slightly different pain points.
  • Website “research” turns into tab overload, and it’s easy to miss the one page that would have made your email feel like magic.
  • When inquiries spike, response time slips from minutes to days, and the hottest prospects move on.
  • Without a log, you can’t tell who requested what, who hit limits, or which demos actually lead to real conversations.

The Solution: Telegram Chat In, SparkPost Demo Email Out

This workflow gives prospects a self-serve way to “try the demo” from a Telegram bot, while you keep control of what gets generated and sent. It starts when someone messages your bot, then the workflow collects the basics (like their website and a few inputs), validates the form-style message, and checks usage limits so one person can’t hammer your system. Next, it pulls content from the prospect’s site using lightweight requests first, and escalates to Crawl4AI if the simple approach fails. After that, OpenAI summarizes and ranks the most useful pages, drafts a personalized email based on what it learned, and sends the email through SparkPost. Every session is logged with the user’s name and Telegram ID so you can track interest and keep the demo safe.

The workflow kicks off inside Telegram, not a form. Then it crawls and condenses the prospect’s site into clean input for the AI. Finally, SparkPost delivers the personalized demo email and Telegram confirms completion, so the user isn’t left guessing.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you get 10 “can I see a demo?” requests in a week. Manually, you might spend about 20 minutes per lead: 10 minutes skimming their site, 10 minutes drafting something that sounds personal. That’s roughly 3 hours gone. With this workflow, a prospect triggers the demo in Telegram (about 2 minutes of their time), the crawl + summary + draft runs in the background (often under 5 minutes), and SparkPost sends the email automatically. You review the log, not your sent folder.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Telegram to run the prospect-facing bot.
  • SparkPost to send the demo email reliably.
  • OpenAI API key (get it from your OpenAI dashboard).

Skill level: Intermediate. You’ll connect accounts, add API keys, and be comfortable adjusting prompts and a couple validation fields.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Telegram message triggers the session. A prospect starts in your Telegram bot, and the workflow checks the command prefix so it knows whether they’re asking for guidance or launching the demo.

Inputs get cleaned up and validated. The workflow maps the message into structured fields, then validates what’s missing. If something important isn’t there, Telegram replies immediately with a “missing fields” prompt instead of letting the flow limp along.

Website content gets gathered with fallbacks. It tries sitemap.xml and sitemap indexes first, pulls a shortlist of pages, then fetches and converts pages to markdown. If the low-CPU approach fails, it escalates to Crawl4AI and merges the content streams back together.

OpenAI drafts the email and SparkPost sends it. Summaries are combined into a single brief, the email draft is generated, a sender signature is applied, and SparkPost sends the finished demo email. Telegram posts a completion notice and the interaction is logged by user ID.

You can easily modify the email style to match your brand voice based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Telegram Trigger

Set up the inbound Telegram trigger that starts the workflow when users send messages.

  1. Add and configure Telegram Intake Trigger to listen for Updates set to message.
  2. Credential Required: Connect your telegramApi credentials to Telegram Intake Trigger.
  3. Ensure Check Command Prefix is connected from Telegram Intake Trigger to filter messages starting with !.
Tip: If users don’t see a response, verify the bot token and that the bot has permissions to read messages in the chat.

Step 2: Configure Session Limits and Form Validation

Control demo usage and parse user form input before launching the email workflow.

  1. In Count Emails By User, set the filter Telegram_id to {{$json.message.from.id}}.
  2. Confirm Aggregate Session Count aggregates Telegram_id and connects to Enforce Email Limit.
  3. In Enforce Email Limit, verify the rules: length greater than 2 routes to Send Limit Notice and length less than or equal to 2 routes to Parse Form Script.
  4. Credential Required: Connect your telegramApi credentials to Send Limit Notice and Notify Missing Fields.
  5. In Validate Form Input, ensure name, email, and website are checked for notEmpty.
  6. Connect the valid path to Notify Email Creation and the invalid path to Notify Missing Fields.
⚠️ Common Pitfall: If the form is not parsed correctly, verify Parse Form Script expects the template starting with !FORM and three lines for name, email, and website.

Step 3: Map Input Fields and Request Website Data

Normalize user input, request the target site, and gather sitemap and crawl data.

  1. In Map Input Fields, set Name to {{$('Parse Form Script').item.json.name}}, Website to =https://{{$('Parse Form Script').item.json.website}}, and Receive_Email to {{$('Parse Form Script').item.json.email}}.
  2. Configure Request Sitemap XML with URL set to {{$json.Website}}/sitemap.xml.
  3. Configure Request Sitemap Index with URL set to {{$json.Website}}/sitemap_index.xml.
  4. Set Primary Web Request URL to {{$json.Website}} and keep Continue On Fail enabled if present.
  5. Configure Crawler API Call with URL set to http://00.00.00.000:11235/crawl and JSON Body set to { "urls": ["{{ $('Map Input Fields').item.json.Website }}"], "priority": 10 }.
Tip: Ensure the crawler API endpoint is reachable from your n8n instance; private IPs may require VPN or internal networking.

Step 4: Extract, Rank, and Split Website Links

Extract URLs from markdown, rank the best targets, and split them for detailed crawling.

  1. In Convert to Markdown, set HTML to {{$json.data}}.
  2. Credential Required: Connect your openAiApi credentials to Extract Link List and confirm it references {{$('Map Input Fields').item.json.Website}} and {{$json.data}} in the prompt.
  3. From the crawler output, use Extract Raw Links to build a newline-separated string of URLs from $json.results[0].markdown.raw_markdown.
  4. Credential Required: Connect your openAiApi credentials to Rank Best Links and ensure it combines {{$json.loc_links}}, {{$json.message.content}}, and {{$json.links}}.
  5. In Split Link Items, set Field to Split Out to message.content.BestLinks.
  6. Configure Secondary Web Request with URL set to {{$json['message.content.BestLinks']}}.

Step 5: Summarize Content and Compose the Email Draft

Convert page content into structured summaries, aggregate insights, and draft the email using AI.

  1. In Page Markdown Convert, set HTML to {{$json.data}}.
  2. Use Merge Content Streams to combine content from Page Markdown Convert and Select Crawl Data.
  3. Run Condense Markdown to normalize and structure the combined markdown, then map flattext in Set Flat Text to {{$json.flatText}}.
  4. Credential Required: Connect your openAiApi credentials to Summarize Page Content and keep JSON Output enabled.
  5. In Combine Summaries, aggregate message.content.abstract so that Compose Email Draft receives an array of abstracts.
  6. Credential Required: Connect your openAiApi credentials to Compose Email Draft and confirm it uses {{$('Map Input Fields').item.json.Name}} and {{$json.abstract.join("/n")}}.

Step 6: Configure Email Delivery and Completion Notifications

Finalize sender details, send the email, and notify the user on Telegram.

  1. In Set Sender Signature, replace Send_Email with your actual sender address and set Signature to your email signature.
  2. Map receive_email to {{$('Map Input Fields').item.json.Receive_Email}}, subject_line to {{$json.message.content.Subject}}, and Body to {{$json.message.content.Body}}.
  3. In Dispatch Email Notification, set From Email to {{'Sender <' + $json.Send_Email + '>'}}, To Email to {{$json.receive_email}}, Subject to {{$json.subject_line}}, and HTML to {{$json.Body}}{{$json.Signature}}.
  4. Credential Required: Connect your smtp credentials to Dispatch Email Notification.
  5. Credential Required: Connect your telegramApi credentials to Completion Notice so the user gets confirmation.

Step 7: Configure RAG Assistant for Telegram Help Responses

Enable the RAG-based assistant to guide users and respond to non-form messages.

  1. In Prepare Chat Input, set chatInput to {{$json.message.text}} and sessionId to {{$json.message.chat.id}}.
  2. Open RAG Assistant Agent and confirm Text is set to {{$json.chatInput}} and Prompt Type is define.
  3. Credential Required: Connect your openAiApi credentials to OpenAI Chat Engine (language model for RAG Assistant Agent).
  4. Credential Required: Connect your postgres credentials to Postgres Conversation Memory, PGVector Knowledge Store, List Knowledge Docs, Fetch File Text, and Query Doc Rows. These are tools used by RAG Assistant Agent.
  5. Credential Required: Connect your openAiApi credentials to OpenAI Embeddings (used by PGVector Knowledge Store).
  6. Credential Required: Connect your telegramApi credentials to Reply to Telegram.
⚠️ Common Pitfall: Do not add credentials to tool sub-nodes inside the agent UI; credentials must be set on the actual nodes (OpenAI Chat Engine, Postgres Conversation Memory, and the Postgres tools).

Step 8: Set Up Scheduled Log Cleanup

Keep the demo log clean by periodically deleting rows from the data table.

  1. In Scheduled Run Trigger, choose your interval to run maintenance.
  2. Ensure Retrieve Log Rows targets the demo log data table.
  3. In Purge Log Rows, confirm Operation is deleteRows with Match Type set to allConditions.

Step 9: Test and Activate Your Workflow

Validate the workflow end-to-end and activate it for production use.

  1. Click Execute Workflow and send a Telegram message with the required !FORM template.
  2. Confirm the user receives Notify Email Creation and later Completion Notice.
  3. Verify that Dispatch Email Notification sends a message with the composed subject and HTML body.
  4. Check that Insert Log Entry writes the user details to the demo log table.
  5. Toggle the workflow to Active for production use once testing is successful.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Telegram bot credentials can expire or be pasted incorrectly. If messages stop triggering, check the bot token in your n8n Telegram credentials and verify the bot is still active in BotFather.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Telegram SparkPost emails automation?

Plan for about 45 minutes if you already have the accounts.

Do I need coding skills to automate Telegram SparkPost emails?

No. You’ll mostly connect credentials and edit prompts. The only “code” you might touch is minor text parsing if you change the input format.

Is n8n free to use for this Telegram SparkPost emails workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage (usually a few cents per demo, depending on crawl size).

Where can I host n8n to run this Telegram SparkPost emails automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Telegram SparkPost emails workflow for a different “demo,” not email?

Yes, and it’s honestly the best way to make this yours. You can keep the Telegram intake, crawling, and summarization the same, then swap the “Compose Email Draft” part for a different generator (for example, a proposal snippet, an audit summary, or a short Loom script). Common customizations include changing the questions the bot asks, adjusting the page-ranking prompt so it focuses on pricing or case studies, and routing the final output to Slack or Google Sheets instead of sending an email.

Why is my SparkPost connection failing in this Telegram SparkPost emails workflow?

Most of the time it’s an API key or sending-domain issue. Regenerate the SparkPost API key, confirm it has permission to send, and make sure your “from” address is verified. Also check your SparkPost suppression list and sending limits, because a “success” in n8n can still result in non-delivery if SparkPost blocks it.

How many demo requests can this Telegram SparkPost emails automation handle?

On a typical n8n setup, dozens per day is fine.

Is this Telegram SparkPost emails automation better than using Zapier or Make?

For this workflow, n8n has a few advantages: more complex logic with unlimited branching at no extra cost, a self-hosting option for unlimited executions, and native AI agent + memory building blocks that are awkward (or expensive) in simpler tools. Zapier or Make can still work if you only need “Telegram message → send template email” and you don’t care about crawling, page ranking, or per-user limits. The moment you want fallbacks (sitemap first, crawler second) and guardrails, n8n is the more practical choice. If you’re unsure, Talk to an automation expert and describe your volume and your offer.

You set this up once, and your demo follow-up stops living in your head. The workflow handles the repetitive parts so you can spend your time on the conversations that actually close.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal