How I Built an AI Agent to Automate Weekly Payment Reports

Hans Brattberg
Co-founder, Product & AI Strategy
·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, join our wait list and we’ll get you started.

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

The Trust Ladder: how to onboard AI agents like new colleagues

The Trust Ladder: how to onboard AI agents like new colleagues

What data should we let them access? What if the agent gets it wrong? What holds organisations back is rarely the technology — it's the uncertainty. Think of AI agents as new colleagues and extend their remit one rung at a time, along the Trust Ladder.

Hans Brattberg
April 24, 2026
The First 100 Days as an AI Lead: The Playbook in 5 Minutes

The First 100 Days as an AI Lead: The Playbook in 5 Minutes

You got the role. The mandate is clear: make AI agents work across the organization. Now what? A short teaser of the four conditions, three phases, and the patterns that separate AI initiatives that ship from the ones that stall — with a link to the full 100-day playbook.

Nils Janse
April 24, 2026
Demo: The Human + AI-Agent Dev Team

Demo: The Human + AI-Agent Dev Team

How we use AI agents internally at Abundly - both for coding, backlog management and release management. It's a system of AI agents & human engineers working together, building on each other's strengths. This not only enables us to release a new version of our platform every day, but also makes the work really fun.

Henrik Kniberg
April 23, 2026
Webinar slides: AI Powered Software Development from the Trenches

Webinar slides: AI Powered Software Development from the Trenches

Slides and recording from Henrik's webinar "AI Powered Software Development from the Trenches.

Henrik Kniberg
April 10, 2026
One File to Rule Them All — A Lesson in AI Agent Unsafety

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 Lifespan

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