{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "apowerb-apowerb--scheduled-morning-report-from-sql",
 "repo": "apowerb/apowerb",
 "repo_url": "https://github.com/apowerb/apowerb",
 "repo_slug": "apowerb-apowerb",
 "title": "Send a scheduled morning report from a SQL database",
 "page_title": "How to send a scheduled morning report from a SQL database with Apowerb",
 "summary": "A scheduled agent asks the database in plain language and mails the summary.",
 "who": "A manager who wants the same daily numbers in the inbox each morning without writing queries.",
 "problem": "Daily figures live in a database, and someone has to write the query, make a chart and send it every day.",
 "outcome": "An agent runs on a schedule, turns a plain-language question into SQL, and mails a summary with a chart.",
 "steps": [
  "Start the stack: `docker compose -f docker-compose/docker-compose.yml --env-file .env up -d`",
  "Add your SQL database as a tool so the agent can run Text-to-SQL against it.",
  "Define an agent that asks the question in plain language, builds a chart and writes the summary.",
  "Set the cron schedule for the run, which the README says is driven by an external orchestrator. (inferred, check the README)",
  "Run the agent once by hand and check the session trace before the first scheduled send."
 ],
 "agent_prompt": "Using the apowerb repo at https://github.com/apowerb/apowerb, create a scheduled agent that answers <business question> against <target database> with Text-to-SQL and mails a summary with a chart. Expected output: one email with the summary and chart. Verify the generated SQL in the session trace matches the question.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README does not say how the external orchestrator is set up, so the scheduling step needs to be confirmed in the docs before relying on it.",
 "category": "Work and operations",
 "tags": [
  "Work and operations"
 ],
 "lang": "python",
 "requirements": [
  "Docker and Docker Compose",
  "An API key from a supported model provider such as Anthropic, OpenAI, Mistral, Gemini, Azure AI Foundry or OVHcloud, or any other LiteLLM provider",
  "Accounts for the business systems you want to connect, such as Gmail, Outlook, HubSpot, Pipedrive or Odoo"
 ],
 "risk": "dual-use",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The database login used by the agent should be read-only, since generated SQL runs against live data."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/apowerb-apowerb/scheduled-morning-report-from-sql/",
 "md": "https://dedupedai.com/use-cases/apowerb-apowerb/scheduled-morning-report-from-sql/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/apowerb-apowerb--scheduled-morning-report-from-sql.json",
 "api_version": "v1"
}
