Terminate action is a simple action with no fields to configure, as it basically does one thing: immediately stops the Flow execution at any given point. Just drag and drop it into the Flow and you're done! This action doesn't have any Output data as well.
Note: Each Flow will end automatically when reaching the Stop sign, so you don't have to put the Terminate action for each of your Flow - only when you need to stop it earlier than that.
Let's review when this action may be useful and how it works in more detail.
Use Case 1
This action is especially handy when you use conditional paths and want to terminate the Flow immediately for a given conditional path.
💡 Pro tip: you can build conditional paths within your Flow with the following actions:
For example, let's review the Employee Offboarding from Google Workspace scenario.
As you can see, after the Switch by Value action, there are four different paths for each value that will suspend, delete, archive or do nothing with the Google Workspace users.
Let's say that after completing three paths, we want to send a notification email, and for the first path, we want to stop the Flow and not perform any other actions. For that, we drag and drop the Terminate action right to the end of the first path.
💡 You can learn more about the Employee Offboarding from Google Workspace scenario and automation of the other Google Workspace Administrator tasks in this webinar recording.
Use Case 2
Another popular case for the Terminate action is using it for the Test Runs. When you have a multi-step complicated Flow, sometimes, you want to test only the part of it.
For that, just drag and drop the Terminate action to the end of the chosen Test part and click on a Test Run button.
How "Terminate" action works
In the Flow Designer, let's drag and drop the ‘Terminate’ action available under the ‘Control Flow’ category. There are no configurations associated with this action.
Next, let's add the ‘Send Email (Gmail)’ action as shown in the following.
Now, let's save and run the Flow. As expected, the Flow has been immediately terminated at the ‘Terminate’ step. It has not reached the ‘Send Email’ action in the flow.
Check out more zenphi tutorials here.
Follow us on Social Media to not miss a thing about automation tips and best practices:
Have any other questions? Just drop a message in the support chat.