Most of the mail that lands in a working inbox does not need a reply; it needs a glance. Invoices, order updates, client threads, newsletters, a supplier saying the shipment is late. If you run a small business, manage a team, or simply get eighty emails a day, the cost is not the reading, it is the deciding. A workflow that wakes up at 7 am, reads what arrived overnight, writes a five-line summary with the two things that need action, and drops it into your Telegram before you have made coffee, removes that cost.
You could subscribe to an inbox tool, but it will read everything, summarize in its style, and cost per seat. Describing the workflow to App Builder Agent gives you one you own: it runs on a schedule on our servers, uses the mail account and folders you choose, summarizes with the AI in your language and your priorities, and delivers wherever you actually look. This guide builds that, including the credentials, the edge cases (time zones, duplicates, huge threads) and how to test a run without waiting until tomorrow morning.
What you need before you start
- A mail source you can connect — for Gmail, an OAuth client and a refresh token from the Google Cloud console; for any other provider (Outlook, Zoho, Yahoo, your hosting), an IMAP host and an app password. App passwords are generated in the mail account’s security settings.
- A delivery channel — a Telegram bot token from BotFather and your chat id, or an SMTP login / transactional email API key to send the digest to yourself.
- A schedule and a time zone — “07:00 Asia/Kolkata every weekday” is a cron expression the agent writes for you. Decide the zone; servers run on UTC.
- Priorities in words — which senders or subjects matter (clients, invoices, “urgent”), which never do (newsletters, notifications), and the language for the summary.
- A limit — how many emails and how many characters per email the summary step should read. Fifty emails at 4,000 characters each is a sensible cap.
What the workflow must handle
- Trigger on schedule — a cron trigger for the morning digest, plus a webhook trigger so you can run it on demand from your phone.
- Fetch only new mail — messages since the last successful run, stored as a timestamp, not “the last 24 hours”; a missed run must not lose mail.
- Group by thread — twelve replies in one thread are one item, summarized together.
- Filter before the AI — skip newsletters, automated notifications and anything already read, so the AI sees what matters and the allowance is not spent on marketing mail.
- Summarize with the AI — one call per thread with a strict format: sender, one-line summary, action needed yes/no, deadline if any.
- Compose and deliver — a digest ordered by action first, sent to Telegram (split into messages under 4,000 characters) or email.
- Secrets and logs — tokens stored as project secrets, never in the code; each run logged with counts and any error.
Build it with App Builder Agent, step by step
- Create a workflow project. Choose the workflow (automation) project type. You get a canvas showing the steps and the TypeScript behind them.
- Describe the whole pipeline in one message. Name the source, the filters, the format and the destination; the agent builds the steps and asks for the secrets it needs.Build a workflow that runs every weekday at 07:00 Asia/Kolkata. Fetch unread emails from my Gmail inbox since the last successful run using the Gmail API (I will provide a client id, client secret and refresh token as secrets). Skip anything from newsletters or with “unsubscribe” in the body, and skip Google/GitHub/bank notifications. Group by thread, at most 40 threads, 3,000 characters per thread. For each thread ask the AI for: sender, one-line summary in English, needs reply yes/no, deadline if mentioned. Send a digest to my Telegram chat (bot token and chat id as secrets), action items first, then the rest, each line with the sender in bold. Add a webhook trigger so I can run it manually.
- Add the secrets and run it once. Paste the tokens into the project’s secrets when the agent asks. Then trigger a manual run and read the log: how many messages were fetched, how many threads were summarized, and what was sent. If the Gmail call fails, the log shows the exact error (usually a missing scope or an expired token).
- Fix what the first digest got wrong. The first summary is always slightly off: too long, wrong priorities, or a sender it should ignore. Adjust in plain language.The digest is too long. Limit each summary to 20 words, drop threads where I was the last sender, and put a count line at the top: “14 new threads, 3 need a reply”. Mark anything from @acme-client.com as high priority.
- Let it run for a week, then extend. Add a second run at 17:00, a Saturday weekly summary of open items, or a reply drafting step that writes a suggested answer for the “needs reply” threads and sends it to you for approval.
Prompts that work well
Common mistakes (and the fix)
- Pasting tokens into the prompt. Anything in the chat may end up in the code. Put credentials in the project’s secrets and refer to them by name.
- Fetching “the last 24 hours”. A run that fails at 07:00 loses that day’s mail. Store the timestamp of the last successful run and fetch since then.
- Sending the entire inbox to the AI. Long threads and HTML mail blow through the allowance. Strip HTML to text, cap characters per thread and skip newsletters before the AI step.
- Ignoring the time zone. Servers schedule in UTC; “7 am” without a zone arrives at lunchtime. Say the zone.
- Telegram message too long. Telegram rejects messages over 4,096 characters. Ask for the digest to be split into several messages.
- Marking mail as read. A summary workflow should read, not modify. Ask for read-only access and no changes to flags unless you want them.
Make it feel finished
- A count line at the top of the digest and “nothing needs action” when that is true; silence is confusing.
- Deep links: the Gmail thread URL after each summary, so one tap opens the original.
- A weekend rule: no digest on Sunday, or a single Monday morning catch-up.
- A failure alert: if a run errors twice in a row, the workflow sends you a short message saying so.
- A monthly line reporting how many threads were summarized, which tells you whether the filters still fit.
Running, publishing and next steps
The workflow runs on our servers from the moment it is enabled; there is nothing to host and nothing to keep switched on. The AI workflow builder page explains triggers, secrets and run logs. The same shape (trigger, fetch, AI step, deliver) builds an auto-reply workflow for WhatsApp or Telegram and a daily report that calls an API, both of which reuse the credentials you have just set up.
If you would rather read summaries inside an app than in a chat, the ready-made AI assistant apps show what a mobile front end looks like; a workflow can post its digest to a hosted backend that such an app reads. Open the builder, choose a workflow project and paste the prompt above with your own mailbox and schedule.
Frequently asked
Do I need to code to build an email summary workflow?
No. You describe the automation in plain English and the AI agent writes a TypeScript workflow you can see on a visual canvas: a schedule trigger, a step that fetches mail, an AI summary step and a delivery step. You can read the code, but you never have to write it.
How does the workflow read my email?
Through an API you connect: the Gmail API with an OAuth token, or a plain IMAP login with an app password for other providers. The credentials are stored as secrets in the project, not in the workflow text, and the workflow only reads the folders and date range you specify.
Where does the workflow run?
On our servers, on the schedule you set (cron), or when a webhook is called. Your computer does not need to be on. Each run is logged with its output so you can see what was fetched, what the AI wrote and whether the message was delivered.
Can it send the digest to Telegram or WhatsApp?
Telegram, yes: the workflow calls the Bot API with your bot token and chat id. Email delivery works through any SMTP or transactional email API. WhatsApp requires a business API account; the workflow can call that HTTP API once you have one.
What does it cost?
Signing in and building the first workflow is free. Further edits with the agent are part of the paid plans, which add the AI allowance the summary step uses; payments are one-time, not subscriptions. The AI calls inside the workflow count against that allowance.
Build it now — free to start
Type the idea, sign in, and the agent builds it in your browser. Change anything by describing it.
Open the builder ›