If you run an online shop, a SaaS, a delivery fleet or a clinic, the numbers you need each morning already exist in some system's API: yesterday's orders, revenue, refunds, sign-ups, tickets closed. What is missing is the five minutes someone spends logging in, exporting, adding up and pasting a message into the group. That someone is usually you, at 7 am, on a phone. A daily report workflow does the logging in, the adding up and the writing, and puts one readable message in your email, Telegram or Slack before you have finished your coffee.
The usual alternatives are a spreadsheet with a script you wrote once and no longer understand, a BI tool priced for a team of forty, or a freelancer for a task that is ninety lines of code. Describing the report to App Builder Agent gives you a TypeScript workflow on a visual canvas: a cron trigger, an HTTP call with your key kept in secrets, a totals step you can read, an AI step that writes the summary in your language, and a send step. Change the channel or add a metric by typing a sentence.
What a daily report workflow must handle
- A cron trigger in your time zone — "7 am in São Paulo" is not "7 am UTC"; a report that arrives at 4 am gets ignored.
- Authenticated API calls — Bearer token, API key header or basic auth, read from secrets, with the date range as query parameters.
- Pagination — 300 orders rarely come back in one page; the workflow must follow the next-page cursor until it is empty.
- Totals that match the dashboard — Count, gross, refunds, net, average order value, by channel or product if you need it; the same rules the finance sheet uses.
- Comparison — Yesterday against the same weekday last week and the trailing 7-day average, or the numbers mean nothing.
- A written summary — The AI turns the figures into four plain sentences and flags what is unusual; numbers stay exact, words stay short.
- Delivery — Email through your provider's API, a Telegram bot message or a Slack incoming webhook, with a proper subject line.
- Retries and a failure alert — Three attempts with growing gaps, then a message saying the report failed and why.
Build it with App Builder Agent, step by step
- Find the endpoint and the key. Open your platform's API docs and note the URL that lists orders by date, the header it wants, and what a single order looks like: which field is the total, which is the status, which is the currency. Copy one sample response; it is the most useful thing you can give the agent.
- Describe the report. Create a workflow project and give the schedule, the call, the arithmetic, the tone and the destination in one message.Build a daily sales report workflow for "Casa Verde", an online plant shop in São Paulo. Cron trigger every day at 07:00 America/Sao_Paulo. Call GET https://api.mystore.example/v2/orders?created_from={yesterday 00:00}&created_to={yesterday 23:59}&page={n} with header Authorization: Bearer STORE_API_KEY from secrets, following pages until "next" is null. Count paid orders, sum "total_brl", subtract refunds where status is "refunded", compute average order value, and group revenue by "channel" (site, instagram, marketplace). Compare with the same weekday last week. Use the AI to write a 4-sentence summary in Portuguese with the exact numbers formatted as R$ 1.234,56 and one line noting anything more than 20% above or below the weekly average. Send it by email to ana@casaverde.example through the Resend API with subject "Vendas de ontem - {date}", and post the same text to my Telegram chat id. Retry the API three times with 30, 60 and 120 second gaps; on final failure send me a Telegram message with the error.
- Run it once by hand. Every workflow can be started manually from the canvas without waiting for the cron. Check the run log: the raw API response, the totals step, the AI text, the send calls. Compare the total with your dashboard for the same day. If they differ, it is almost always a status filter (cancelled orders counted) or a time zone boundary.
- Fix the arithmetic in words. You do not need to open the code to correct it.Exclude orders with status "cancelled" or "pending_payment" from every total, treat "created_at" as UTC and convert to São Paulo time before deciding which day an order belongs to, and add a "top 3 products by revenue" line to the summary.
- Add a second audience and leave it. The warehouse wants order count and the list of cities; the owner wants money. Ask for two versions of the summary from the same data, each sent to its own channel. Then let the cron run; the workflow lives on our servers and does not need your computer.
Prompts that work well
Swap the API and the metric and the same workflow reports on almost anything:
Common mistakes (and the fix)
- Reporting the wrong day. APIs return timestamps in UTC; "yesterday" in São Paulo ends at 02:59 UTC. Tell the agent the business time zone once, and have it convert before bucketing.
- Reading only the first page. Totals silently stop at 50 or 100 orders. Say "follow pagination until empty" and check a busy day against the dashboard.
- Letting the AI do the maths. The AI should write sentences around numbers the workflow has already computed. Ask for the totals step to be plain code and the AI step to receive finished figures.
- Keys in the prompt. Anything pasted into the description ends up in the project history. Put keys in secrets and reference them by name.
- Silence on failure. A report that quietly does not arrive is read as "no sales". Always add the failure message and a retry.
- One giant message. Slack and Telegram truncate long posts. Keep the summary under twelve lines and send detail as a second message or a link.
Make it feel finished
- Format money the way the reader expects: R$ 1.234,56 in Brazil, €1,234.56 in Ireland, ₹1,23,456 in India.
- Lead with the one number that matters, then the comparison, then detail; nobody reads the fourth paragraph on a phone.
- Use a word like "Attention:" only for real exceptions, so it means something when it appears.
- Add a monthly roll-up on the 1st that reuses the same steps over 30 days.
- Keep a small history table inside the workflow so the comparison lines do not need a second API call.
Installing, publishing and next steps
Nothing to install: the workflow is switched on from the canvas and the cron fires on our servers. The AI workflow builder page lists the triggers and channels it supports. If the daily message makes you want a live screen as well, the ready-made login & dashboard apps gallery shows what a small reporting app looks like, and the admin dashboard guide walks through building one from the same API.
Related automations: the email summary workflow reads an inbox the way this one reads an API, and the Telegram auto-reply workflow reuses the bot token you set up here. Open the builder, paste the Casa Verde prompt with your own endpoint, and run it once by hand.
Frequently asked
Can the workflow call my own API or only well-known services?
Any HTTP API. The workflow runs on our servers and makes ordinary HTTPS requests with the headers and authentication you describe: bearer tokens, API keys, basic auth or a signed query. If a browser or curl can reach the endpoint, the workflow can too.
How is the schedule set?
With a cron trigger you describe in words: every day at 7 am São Paulo time, weekdays at 9, the first of the month. The agent writes the cron expression and the workflow fires on our servers whether or not your laptop is switched on.
Where do I keep API keys and passwords?
In the workflow's secrets, not in the prompt or the code. The agent references them by name, they are not printed in run logs, and you can change a key later without touching the workflow itself.
What happens if the API is down at 7 am?
Ask for retries and the workflow waits and tries again a few times with growing gaps. If it still fails, it sends you a short failure message instead of silence, so you know the report is missing rather than assuming there were no sales.
Is it free?
Sign in and your first project is built free. Editing further with the agent is paid, through one-time payments rather than subscriptions; the Pro, Business and Max plans add the AI allowance used when the workflow writes the summary text each morning.
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 ›