Automation Editor
...
Building Automations
Subroutines

Creating a subroutine

4min

To create a new subroutine, start by opening the subroutine catalog by either clicking the link at the top left of the automation editor, or by clicking or dragging the catalog's vertical splitter on the left side of the screen:

Document image


Then click the Create button above the catalog at the top left:

Document image


The editor creates a skeleton subroutine with the needed input trigger and output action:

Document image


Edit the trigger and add the needed input data fields for the subroutine:

Document image


When done adding fields, click the Fetch button to configure the trigger with those fields:

Document image


Now you can optionally add any needed trigger filters. Click the Save button when done.

For this example, we'll just use two actions to uppercase both the input title and description. Their input values are mapped to the two subroutine inputs:

Document image


Edit the subroutine output action and add two output fields:

Document image


Then click the Fetch button to configure those fields:

Document image


The output fields are then mapped to the two uppercased values from the preceding actions:

Document image


This is the finished subroutine that is ready to save:

Document image


Give the subroutine a name and description that will appear in the subroutine catalog.

Document image


Accounts having the "Public content" permission can optionally save the subroutine as public. Otherwise it will be private to your account.

Now the subroutine can either be tested or used within an automation:



Subroutines can be nested, but don't nest the same routine within itself. Otherwise an infinite loop will occur!