You’ve likely seen people share screenshots of giant workflow trees, bragging about how much time they took to develop. Maybe you’ve even made some monster-sized workflows yourself. I don’t mean to squash your pride… these kinds of workflows should be avoided for a few different reasons. Time to learn about workflows and best practices from the perspective of a developer and LeadConnectorHQ user.
What’s an Acceptable Workflow Size?
Okay now you know that bigger isn’t always better 👀 but there’s also not really a goal size. Huge workflows are the byproduct of thinking about automations in the wrong way. So we have to start by changing how you think!
This is likely the way you currently think about workflows. I have this thing that happens (trigger) and when that happens I want a series of other things to happen (actions).
Things become much more efficient when you change your thinking to be: I have this thing that happens (trigger) and when that happens I want other tasks to start (functions). This is a subtle difference. Before we thought about actions but now we want to change our mindset to think about functions.
How is a Function Different from an Action?
A function is made up of actions, but first thinking about the function general purpose can make it much easier to imagine and build complex workflows. Let’s imagine I want something like this:
- When a contact is created (trigger)
- Add a tag (action)
- Send a welcome email (action)
- Wait 1 day (action)
- Send a second email (action)
Instead of thinking about all of the actions right away, we should think about the tasks (functions) we want:
- When a contact is created (trigger)
- Add tags (function)
- Send email sequence (function)
Now that we know the different types of jobs we want to be triggered, ask yourself if any of these may need to be used in the middle of other workflows you make, can run asynchronously (by itself while the rest of the workflow finishes), or if they are going to be long enough to be difficult to read.
Let’s build the above example with both actions and functions so you can see the difference. In this example we made a separate function for the email sequence. This way we can re-use this Email Sequence if we want other workflows to be able to trigger it. It also keeps the workflow easy to read if the Email Sequence gets enough email and wait actions added to it to make it lengthy. We chose to keep the add tag action intact since it’s just a single action, however, if there was complex logic at that stage to determine the type of tag we want to add to the contact that would make the workflow difficult to read, we would want to break that into its own function as well!
Synchronous and Asynchronous Tasks
Don’t be scared away by those big words in the heading. Synchronous means that something runs one after another (like the first example where we only use actions). Functions, however, allow you to make GoHighLevel workflows where certain sections run asynchronously. This means they will start running when that point is reached, but the original workflow keeps running as well. They no longer depend on one another. Let’s take a look at a slightly more complex example where we have logic to determine which tag should be added to a contact.
You start to see the true power of functions here. On the left, you have a workflow full of actions. It’s difficult to follow and the first email doesn’t send until the Choose Tag and Add Tag actions are complete. Actions in GoHighLevel workflows can sometimes take up to 5 seconds to run, so this adds unnecessary delay to the sending of the first email. The conversion to functions on the right is not only much easier to understand, but also runs much more efficiently! Just to make sure you understand this example, let’s take a look at how the Tag Selection and Email Sequence functions are set up.
Summary
Next time you see someone share an image of a monstrosity of a workflow, share this blog with them with love! Keep these workflow building lessons in mind as you customize your AI Workflows that you build with CloseBot! If you want to see examples of how I build custom workflows that work with bots, check out our Live Build video library HERE. Don’t forget to grab your free tier account with CloseBot to start playing around with conversational lead qualification and booking AI that rocks!
Comments are closed.