My work on the Pi-hole project led me to a start a Patreon page. Like many creators, I spent a while determining what rewards users would want. But unlike most users, I did not have a problem fulfilling orders.
Apparently, this is a big problem: project creators spend more time shipping and fulfilling orders than actually working on their project. But for me, fulfilling the orders my patrons took me all of 5 minutes. In this post, I’ll explain how I did it using an API.
Patreon projects usually depend on their patron’s cash to fund whatever it is they are doing. Spending time and money on shipping physical rewards is not what they should be focusing on. My method involves two key technologies: Ansible and a Website called kite.ly.
Ansible is software used for automation of Linux and Windows machines, but for my purpose, you can also use it to call an API.
kite.ly is a Website where you can submit orders through an API for a variety of merchandise like shirts, mugs, stickers, pillow, and more. You just send them a request with the users address and the assets you want printed on said merchandise. That’s it.
You need to pay for this service, of course, but if you set your reward levels correct, you can still make a profit, while they do all the fulfillment work for you.
My workflow goes like this:
- Download Patreon user infomation in .csv format
- Modify the header columns to match the variables in my playbook
- Modify the country code to the three letter code instead of two (kite.ly expects a three letter country code)
- Run then Ansible playbook to:
- turn the .csv into Ansible variables
- send an API request to kite.ly using the variables above
- repeat for each user in the CSV
It literally takes less than 5 minutes. After user payment is collected on the first, I download the .csv, run my playbook, and then get back to my project. Ideally, I will expand the playbook to modify the headers and country codes for me, but that’s in v2.0.