How I saved 120 hours and $600 on Xero with Python Automation and Zapier
Money can’t buy you time, but Python can (for free).
Let's cut to the chase:
Automation of forex conversion: Saved 20 hours ⏰
Not using the multi-currency feature in Xero: Saved $600 💰💰
Automating receipts attachments: 100 hours ⏰⏰⏰⏰⏰
I have been running a small preschool business in Jakarta, Indonesia for the past 5 years, and have been using Xero as my primary accounting tool. The main currency is Indonesia Rupiah, but I make several purchases through Singapore dollars from time to time as well. To handle this multi-currency, I have to subscribe to Xero’s most expensive package — which costs me $40/month.
I’ll let Steve Carell replay my reaction.
Here are my three objectives:
Objective 1: Convert 🇸🇬 SGD to 🇮🇩 IDR based on the exchange rate of the day of purchase
Objective 2: Lowest price possible (Hey, we’re running a business here) 💸
Objective 3: Attach receipts for every transaction at the quickest possible way 📌
Tool used: Python 3
Time-wasting-soul-numbing way: For each transaction, I get the forex-of-the-day from any forex website, multiply that with the SGD to get the corresponding IDR. Assuming I take 1 minute for each row, it will take me 20 minutes for 20 transactions.
1 min x 20 transactions x 12 months x 5 years = 1200 minutes (20 hours)
Using Python: I would rather spend the 20 hours watching the entire Harry Potter series, so I pulled up my Python script and started coding, which took me an hour to complete. I am not going to explain my code in too much detail here as it requires certain basic understanding of programming on your end. If you are a geek like me, you can find the full documentation and code here.
Basically, the flow of the code is simple.
How long does it take? Well, let’s take a look at the following GIF:
It only took me 20 seconds! That’s 3 times faster than any Nas Daily video!
Now that I can convert multiple currencies by myself (I mean Python), I can use the $30/month subscription plan instead. This means I have saved $600 in the past 5 years time and counting.
$10 x 12 months x 5 years = $600 (but still cannot buy an iPhone 11)
Tool used: Zapier
It’s always a good accounting practice to attach receipts for every transaction you’ve made, even if it pisses some people off in the organisation. However, searching for those receipts is still a pain in the ass.
FAQs that I have in my mind whenever I search for those receipts:
It took me about 5 to 10 minutes to find one single receipt. Let’s do the math again…
Quick Math of the best-case scenario:
5 minutes x 20 transactions x 12 months x 5 years = 100 hours
So I used Zapier to do this. Zapier is an incredible tool to automate things without Python. One downside: Zapier is a freemium software and it costs $20/month if your automation process requires more than 2 steps (but for the time it saves, I don’t mind 🤷♂)
This is how a typical workflow in my Zapier account looks like:
In plain English, these are the steps:
1. When I receive an email from my gmail
2. Only continue if the email’s subject head is <a_subject_head_that_you_need_to_figure_it_out>
3. Save the screenshot (technically the HTML) of the email and save it to a Google Drive folder.(Yes, saving the HTML is equivalent to saving the entire screenshot of the email view)
4. Locate that image in that Google Drive folder mentioned in step 3
5. Create a Bill in Xero that attaches the file mentioned in step 4
6. Move the file to an archive folder in Google Drive (Cleanliness is important ☝🏻)
That’s it. That’s how I saved my money and time — the world’s most scarce resource.
Now if you’ll excuse me, I’m going to watch the Chamber of Secrets.
We just sent you an email. Please click the link in the email to confirm your subscription!