From manual to automated: how I do it

My Strategy on When and How to Automate Things

After having worked in both large and small companies, product teams and project teams, with gigantic codebases and some not so big, I feel confident to say that: every place has manual routines that could be automated. And there’s no escaping it: every process that is automated probably stemmed from some manual real-world task, gradually built up with different tasks and expectations. But what to do when faced with a large number of manual steps in a process that’s either too big or not a priority?

Here’s where I start my strategy to tackle such problems. Ready?

No Room for Laziness

That’s right, you read it correctly: no room for laziness. Ironically, “being lazy” is a common joke when it comes to developers automating things (supposedly, it’s the laziness to do manual work). But, just so I don’t leave anything out, let’s understand why I believe exactly the opposite.

To Avoid Work, You’ll Have to Work!

Before everything is automated or at least before you have an environment/platform that facilitates task automation, you will inevitably have work. My advice is to keep in mind where you want to get to. I always envision myself running a command and everything working perfectly and very quickly. This helps me keep doing what I’m doing to automate something.

You Need to Get Organized (Be Autonomous)

Also, if you want to automate a process, you’ll need documentation of everything that needs to be done and then plan all the necessary steps. Having this organization is essential to help you think about how to implement a good solution. Often, manual steps also need to be reconsidered and business processes adapted. But before that, it’s necessary to take a good look at the process.

Many Things Will Need to Be Done From Scratch

This section is just to let you know that many boring things need to be done before the fun ones come. Strength, warrior!

But Also… Take a Deep Breath

In the eagerness to no longer do that extremely tedious manual work, I fell into some traps, like spending a lot of time on automations that weren’t a priority for my team (although later I was able to do my job 20 times faster :)) or not thinking much about how to improve the process first instead of just automation.

In both cases, taking a deep breath, thinking about the process itself outside of codes and technologies, is essential.

With a Little Help from My Friends

And, of course, remember that this should be an initiative shared by the team, otherwise the burden of automating things falls on just one person, which, besides being unfair, is a business-level problem (bus factor).

Introducing… step

At metr, I had the opportunity to practice everything I mentioned above. In fact, it was through feedback from my boss that I realized how important it is to take a deep breath. :) There, I started an initiative to automate customer onboarding, which involves many steps. All the steps were already documented in a and involved different tasks: configuring DNS, setting up a project in Sentry, infrastructure, users…

In our internal CLI, I added an option metr customer new and created a structure where each step would have a function associated with it. Those that didn’t have automation would just display the manual instructions - just like they were in the Gradually, my team and I automated bits of the process. We haven’t finished yet, but a good portion has been automated, and we’ve already seen a significant reduction in the time it takes to onboard a new client. Moving from a 6 hours process to less than 1 hour was pretty great.

Using the same principle, I created an open-source library called step. With it, you can convert a list of steps into Markdown for a functional CLI! This way, you keep the steps documented and can gradually automate things at your own pace. Feel free to open an issue with questions or suggestions (and bugs too, of course).


Thanks to my team at metr for the feedback and support on this project. Also, thanks to Jesper Noehr for kindly give way the step project on pip.


comments powered by Disqus