Streamlining Credit Card Reports with Claude.ai

by Harri Lammi

I get to use a lot of my company credit card in our daily business - service subscriptions, representation expenses, office equipment and so on. At the beginning of every month, I find myself using two hours writing statements of every purchase for our accounting. In the middle of this task I was struck by an idea: what if I just dumped my calendar events and credit card bill to AI? Would it do the job automatically?

 

My Monthly Report Nightmare

Every month, I have the "pleasure" of going through my company credit card statement. This involves sorting through various online service subscriptions, equipment purchases, and business entertainment expenses. I'd long dreamed of a way to combine credit card statements, calendar data, and common expense details into a neat, accounting-ready report. This process still requires attaching photos of receipts with the written explanations. 

The Current Manual Process

Let me walk you through my current process:

  • I take photos of receipts with my phone at the time of purchase. Some receipts come directly to my email. For recurring PDF receipts in my email, I can forward them to our accountant's scanning email address.

  • At the beginning of each month, I download a CSV file from the First Card service containing all my credit card purchases from the previous month.

  • I copy the purchases from the First Card file into a Google Sheets template where I've set up some automation (certain recurring transactions are pre-saved and automatically populated based on a lookup function).

  • I review each line item to ensure there's an explanation for every charge. For entertainment or business meeting expenses, I need to add participant names and companies, which I dig out from my calendar.

  • Next, I open the accounting app on my phone to input the transactions. The most time-consuming part is scrolling through receipt photos on my phone. Fortunately, I can now search for "receipts" in the album, but I still have to type the search term each time. Sometimes I just open Google Photos on my computer and take photos of my computer screen; it's way faster that way.

  • Once I find a receipt, I use Apple's Handoff feature: I copy the credit card purchase explanation on my computer and paste it on my phone. This saves a lot of typing.

  • I double-check that the purchase amount and date match. The mobile app correctly scans this information from the receipts about 70% of the time.

  • Finally, I save the transaction with its explanation and image, crossing my fingers that it goes through on the first try and I don't have to repeat the entire process.

This entire process takes about two hours each month, time that could be better spent doing something useful.

Turning to AI for Help

One day, it dawned on me that I could try using Claude.ai for this process. Since it can understand CSV files, I thought I could export my calendar data, fetch my credit card statement from our bank, and export explanations for the most common credit card transactions.

I use the Professional Plan on Claude, which has a feature called Projects. You can upload files to a project, and Claude can use that information in every chat which is started in the project's context. So this would be ideal for uploading calendar and credit card information.

Data Collection and Preparation

I started by exporting my credit card statement and calendar events. While the credit card data was easy to obtain, I hit a snag with the calendar exports. I discovered that Google Calendar only allows exporting in ICS format, and it includes all calendar data without date restrictions. Moreover, Claude couldn't handle such large files.

I spent some time juggling files in Claude's service, also trying to reduce file sizes. I learned that while AI models can consider many parameters, they quickly reach their limits with multi-megabyte files. With calendar files, it was obvious that filtering out unnecessary events would decrease the file size a lot. It also became clear that I could not filter the information just by prompting; I would need to manipulate the files.

Overcoming Hurdles

Filtering a 4 MB ICS file manually is a tedious process. So I asked Claude to write a script to convert the ICS file to CSV. Also, it should only include date, description, and participants information. After about 20 iterations, the script was ready. Along the way, Claude tried to solve two problems at the same time (convert multi-lines into one-liners and scrape participants into a comma-separated list). This was too hard for Claude, but when the problems were solved separately, it could eventually include them in a single solution.

Overall advice for data files: only include the lines that are necessary to solve the problem. Filter out / delete everything else.

Fine-tuning the Process

When I finally asked Claude to create a table of credit card transactions and their explanations, I encountered another problem: not all transactions had clear explanations. This was partly because some expense-related calendar events weren't straightforward (e.g., a lunch restaurant missing from calendar data, or the credit card transaction showing a different name than the biller).

Then I had a moment of revelation: when I asked Claude to write explanations for a specific day's receipts and told it which calendar event they related to (using the event title or participant), it started producing accurate explanations with correct information.

Conclusion

Claude doesn't automatically generate credit card explanations just by feeding it calendar and credit card files. However, I've found that by combining scripts for file preprocessing generated by Claude and providing additional prompts, we can automate some portion of the credit card statement process. It's not perfect yet, but it's a small step forward in streamlining this time-consuming task.

Previous
Previous

Rapid Prototyping and AI

Next
Next

Reimagining Developer Experience - Understanding the Why Behind the What