Telegram trigger
The workflow is triggered via a Telegram message — the user sends a prospect's website URL and the automation begins immediately.
A fully automated n8n system that researches a prospect's website using AI, extracts and summarizes their content, crafts a personalized outreach email using GPT, sends it automatically, notifies via Telegram, and logs everything — zero manual work at any stage.
The project
Cold email outreach is powerful — but generic emails get ignored. The challenge was building a system that could research any prospect's website automatically, understand their business, and craft a genuinely personalized email that feels human-written.
This n8n automation solves that entirely. Triggered via Telegram, the system crawls the prospect's website, uses a RAG AI Agent with OpenAI GPT and PostgreSQL vector store to understand their content, then writes and sends a personalized outreach email — all without any manual input after the trigger.



How the automation works
The supplied project documents nine connected steps, from the initial Telegram input through research, context building, email delivery, logging, and scheduled cleanup.
The workflow is triggered via a Telegram message — the user sends a prospect's website URL and the automation begins immediately.
The input is formatted and validated — checking for missing fields and sending a Telegram notification if the input is incomplete.
The system checks how many emails have already been sent to that prospect ID in the current session — enforcing per-ID limits to prevent spam.
A RAG AI Agent powered by OpenAI GPT, PostgreSQL vector store, and OpenAI embeddings processes the prospect data — drawing on stored knowledge to build context.
The system requests the prospect's sitemap XML, parses all sublinks, and uses AI to rank the most relevant pages to research.
Each ranked sublink is crawled — content is fetched, converted from HTML to Markdown, trimmed to token limits, summarized by AI, and aggregated into a prospect profile.
Using the aggregated prospect profile, GPT crafts a fully personalized outreach email — referencing the prospect's actual business, services, and pain points.
The email is sent with the sender's signature attached. A Telegram notification confirms delivery. The outreach is logged in a database for tracking and reporting.
A separate scheduled workflow runs automatically to clean old log data — keeping the system lean and preventing database bloat over time.
Tools & integrations
“This automation completely transformed our outreach process. Every email it sends reads like it was written by someone who actually researched the prospect — because it was. The response rate jumped significantly from day one.”Client — AI Outreach Automation Projectn8n + OpenAI + PostgreSQL Automation
Build your next system
I build end-to-end AI automations using n8n, OpenAI, and custom integrations — systems that do the research, write the emails, and send them while you focus on closing deals.