How I Built an AI Agent to Automate Weekly Payment Reports

Hans Brattberg
Co-founder
·4 min read

In this article

Tired of manual payment tracking, I created a conversational AI agent that automatically pulls Stripe data and delivers insights exactly when I need them

I Built an Agent to Handle the Boring Stuff

You know that feeling when you sit down on Monday morning and realise you're about to spend an hour doing something a computer should really handle? Exporting data from Stripe, copying it into Excel, making the same report you made last week. Again.

I work with AI agents every day, so at some point I thought—why not just build one to do this for me?

Why I Didn't Just Write a Script

Sure, I could have used Zapier or written something custom. But what I actually needed was a bit more flexible:

  • Sometimes I want weekly reports, sometimes daily, sometimes just "what happened yesterday?"
  • I wanted to spot trends without programming rigid rules
  • I wanted to ask follow-up questions in plain language
  • The system should get better as I use it

Traditional automation couldn't really do this. I needed something that could think a bit, not just run the same script forever.

Setting It Up

I created a new agent in Abundly and just started talking to it:

A conversation to set up http request and Slack capability
Setting up

Two toggles. That's all it took. The agent understood what I needed, asked for the right capabilities, and once I enabled them, it set up the scheduled task and data storage automatically.

Finding the Stripe API key took a few minutes of clicking around in Stripe's developer settings. And depending on your company's policies, you might need to ask someone for access—worth checking before you start.One toggle, plus your API key.

Slack was a bit more involved. Connecting a workspace requires a few more steps, but once it's done, it's done.

Once I had everything in, the agent set up a data document for storing payment history and scheduled the Monday reports. Total setup time: about 30 minutes.

Teaching the Agent What to Do

With capabilities enabled, I asked the agent to remember what we'd discussed:

Me: "Can you update your instructions so you remember all of this?"

Agent: "Done. Here's what I've saved:"

## Weekly Stripe Payment Report Every Monday at 9:00 AM Stockholm time: 1. Fetch the past week's payment data from Stripe 2. Analyze: total revenue, transaction count, week-over-week changes, top products, failed payments, anomalies 3. Send summary to Slack ## Answering Payment Questions When Hans asks about payments: - Always fetch fresh data from Stripe first - Provide clear insights with specific numbers

No coding. Just a conversation.

One Thing I Had to Fix

The first few reports worked well. But then I noticed something: when I asked questions about payments, the agent would sometimes give me outdated numbers. It was trusting its stored data document instead of checking Stripe for the latest figures.

Not a disaster, but not what I wanted either. I updated the instructions to always fetch fresh data from Stripe before answering anything. Problem solved—but good to know that you might need a few rounds of conversation to get things exactly right.

How It Actually Works

API Integration: The agent calls Stripe's API directly when the scheduled task runs, pulling the past week's charges.

Data Storage: Each week's data gets stored in a data document. Over time, this builds up history for trend analysis and comparisons.

Agent database in json format

Historical data, building up week by week.

Slack Notifications: Monday mornings, a formatted summary lands in my Slack channel.

Sample slack message

Monday mornings, sorted.

Interactive Dashboards: When I want to dig deeper, I just ask. The agent creates charts and tables on the fly—revenue trends, failed payment breakdowns, product performance.

Dashboard

Ask a question, get a visualisation.

Using It Day to Day

Now I just ask things like:

  • "What were our top products last week?"
  • "Show me failed payments from enterprise customers"
  • "How does this week compare to last month?"

The agent fetches data from Stripe and gives me an answer. No exporting, no spreadsheets.

What's Good About This Approach

I didn't write code—I just described what I wanted. The agent figures out the API calls and analysis. Credentials are handled by Abundly, so I didn't have to think about security. And if I want to change something, I just update the instructions in plain English.

The same agent sends Slack reports, answers questions in chat, and could send email alerts if I needed that too.

What Could You Add?

Once you have an agent connected to payment data, extending it is just another conversation:

  • Connect PayPal and Square for a unified view
  • Monthly summaries emailed to the team
  • Alerts when failed payments spike
  • Let colleagues query payment data without building dashboards for them

If You Want to Try This

Setup takes about 30 minutes, assuming you can find your API credentials. If your company has strict policies around API access, sort that out first.

You might need a few conversations to get the agent doing exactly what you want. That's normal.

If it sounds useful, you can try Abundly at app.abundly.ai.

Hans Brattberg works at Abundly, where we're building a platform for AI agents. We're constantly exploring new ways to use them—and honestly, our agents surprise us in a good way every day. Questions? hans.brattberg@abundly.ai

Read more

One File to Rule Them All — A Lesson in AI Agent UnsafetyEnglish

One File to Rule Them All — A Lesson in AI Agent Unsafety

2.3 million AI agents on a social network, most running on people's personal computers with full access to files and credentials, reading and obeying instructions from a single public web page. What can possibly go wrong?

Henrik Kniberg
February 10, 2026
How an AI Agent Extended My Healthy LifespanEnglish

How an AI Agent Extended My Healthy Lifespan

A story about a special agent, one that has added years to my healthy lifespan through concrete research and action.

Henrik Kniberg
January 9, 2026
Scrum day Europe 2025 - Scrum in the Age of AIEnglish

Scrum day Europe 2025 - Scrum in the Age of AI

Here are the slides for my opening keynote "Scrum in the Age of AI", for Scrum Gathering 2025 in Utrecht.

Henrik Kniberg
December 3, 2025
Behind the Scenes: Making a Scheduler Agent for SVTEnglish

Behind the Scenes: Making a Scheduler Agent for SVT

Behind-the-scenes story of how we built an agent that schedules photographers for the SVT (Swedish Television) documentary Homoroboticus

Henrik Kniberg
November 20, 2025
AI-agenter är de nya användarna - är din produkt redo?Svenska

AI-agenter är de nya användarna - är din produkt redo?

Upptäck hur AI-agenter förändrar användarlandskapet, varför din produkt måste kunna hantera dem — och vad du konkret kan göra för att bli agent-kompatibel.

Hans Brattberg
October 21, 2025
AIAW podcast - How We Build AI AgentsEnglish

AIAW podcast - How We Build AI Agents

On Oct 9 I was featured in the AI AW podcast with topic "How to Build Autonomous AI Agents". Here is a summary and some reflections.

Henrik Kniberg
October 13, 2025