Adding invoices from saas apps to freeagent

I’m a very happy FreeAgent user. I’ve been using it for just over one year now and can’t complain too much. Okay, so I’d love to be able to set the currency of bills, but that’s not a deal breaker for me right now.

I’m a freelance developer, so I’m responsible for my own accounts. Keeping your accounts up-to-date is important, but can be time consuming. One of the things that I find most annoying is that for each SaaS or advertising platform I use, I have to manually import the invoices and create a bill. It takes a few steps, so individually it’s not very complicated. The drawback is that I have to do it on four or five different sites. Find the invoice, export the PDF, return to FreeAgent, create the bill, import the PDF and set a few other details. Like I said, it’s not hard, but it’s repetitive.

As a developer, I know that anything repetitive can be automated.

My first instinct was to create a simple web application that would left me connect to FreeAgent and then import the invoices by using HTML scraping from the various pages. This, however, was going to be impossible since I use two-factor authentication on almost every site and NONE of the providers I want invoices for offer an API for that sort of thing.

My next idea was a local Windows8 application, but that suffered from the same limitations as the web app, thought it would have been possible using WebViews to get past the authentication steps.

After a little time reflecting, I was reminded of the Buffer App Chrome extensions that lets you buffer images etc. inline. This seemed like it might be adaptable. A quick bit of reading and 2 hours of experimentation and I had this working in GitHub!


The button Add to Bills is automatically inserted by my extension. It can read the row, pick up the date, download the PDF invoice automatically and upload it to my FreeAgent account. Things like the Currency still need to be manually modified, but the bulk of the work is done.

Another thirty minutes and I had Azure billing support to!


There is a lot of work to do before this Extension can be released to the Chrome Store and I’d like to add support for more accounting platforms (extending beyond FreeAgent) and billing sources, but I’m happy with this as a starting point.

If you’re a FreeAgent user who suffers from invoice importing fatigue, I’d love to hear your thoughts on this.

2 thoughts on “Adding invoices from saas apps to freeagent

  1. Hi Tomas, that is really great work. I have the same time consuming issue of adding invoice information in to Kashflow, the accounts package that we use.

    I am curious about how much information your approach can pull from the invoice to push in to the Accounts package, and can this extension send to Kashflow instead of FreeAgent (Which supports multiple currencies by the way! 🙂

    For example, I would like to send the Supplier name, invoice date, item rate, item quantity, vat rate, final amount, supplier reference all in to Kashflow.

    I was considering doing something similar to you, to parse the actual PDF invoices that are provided by the services I use, but your system skips that and is much more efficient, but as I understand it, your extension needs the information you want to get is on-screen, when it is more likely in the invoice itself?

    1. I hope that other platforms such as Kashflow can be supported. Once they have an API and they support OAuth2, I’d be comfortable. I’m writing the parsers to be agnostic to the API, so it should be easy enough.

      I think that extending the extension to the parse the PDF itself would be amazingly useful! You’re right. References/VAT etc. are all in the invoice, so digging them out would save even more time. I’ll certainly keep an eye on that.

      For now, just getting the damn PDF into FreeAgent would save me time 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.