I was using Muse to schedule some email searching and started noticing the Zoho connection would fail. I’d set it up, run it a couple of times, and then the next day it would be dead. There was a manual process to get it going, and it worked, until it didn’t.
Then I’d start getting authorization prompts from Muse wanting to fall back to web-scraping. That’s just not as good. I really just wanted my agent to be able to run things on a schedule, not do a bunch of browser scraping, just use the API. That all seemed reasonable, until the token started failing.
Zoho’s access tokens expire after an hour. The refresh token is supposed to handle that. In Muse it didn’t, so once the token started failing I was thinking, well, I need to work around this Muse limitation.
Why not use Zapier? I didn’t want yet another service. I didn’t want to build a Rube Goldberg pipeline of services, because I can just build my own without that much work.
So, I decided to just see if it was possible. I worked with Muse, created a repo, and walked through what the cheapest version of this would look like, using my favorite language, C#, and my cloud of choice, Azure. We came up with a plan to use Functions and Key Vault, and that all sounded very good to me.
It would be super cheap. I’m not running a SaaS product here. I’m just running my own scheduled tasks, a few a day, to monitor things like requests to update web sites, looking for comms from my bank, etc.
And I liked the idea of instead of putting all of my credentials inside of Muse, or Zapier, I could have them in my own little Key Vault. Then I would hand out my own auth key out to various agents, and if I ever needed to kill one, I would have that control. I wouldn’t have to run around to various agents to do it.
The building went really smoothly. It’s a simple OAuth function. It’s not that big a deal. It’s very straightforward. The function holds the refresh token in Key Vault, trades it in for a fresh access token when it needs one, and makes the mail call. My watches run on it now, on a schedule, using the API, which is all I wanted in the first place.
Of course, It would open source it and I’d give it a wiki, because that’s what I do. So that’s what we did today. It’s public, MIT licensed, and a template repo, and the wiki walks through setting up your own and adding other providers.
I also built it in a modular way, so I can add more connectors than just Zoho. Zoho was the one that was broken, but it won’t be the last token I need kept alive. If others want to get started, they can use this as a template repository and follow the guide in the wiki.


