Automation Editor
...
Building Automations
Subroutines
Executing a subroutine
3min
From an automation, either search for the "execute subroutine" action or find it under the System Utility category:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/7hqEat2HkXUEzfDLWfXSq_image.png?format=webp)
In the System app:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/u3do26IxZQUsa5F_usRx5_image.png?format=webp)
Here:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/h8yYmsrOPhuANTOFBqD2S_image.png?format=webp)
It's generally easier to just search for "subr" after choosing "find an action":
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/WB73lXpB_noxrVm_rVrnk_image.png?format=webp)
Select the subroutine to use from the list:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/BOGMeSe8j7WzCbuP_rlp9_image.png?format=webp)
Then click the Fetch button:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/9MB6ugLzfQXbIj-FSqPD6_image.png?format=webp)
Then configure the input fields for the subroutine and save:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/jXxlTeLIpXYETQ-2fbgnD_image.png?format=webp)
Subsequent actions can access the subroutine's output fields:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/O-xEDMzXzX5R0vjnikWto_image.png?format=webp)
In the graphical automation history you can examine the subroutine's input and output:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/n6lRhx3LqI8fguM05xMux_image.png?format=webp)
Click on either the subroutine or the Details button to drill down and examine the processing performed by the subroutine:
![Document image Document image](https://images.archbee.com/Y2QGD8otsIOv4e0hQQnqa/EbtSjPlmlOyfVKkeptkhv_image.png?format=webp)
When the parent automation's history is searched, any subroutines it uses are also searched and included in the search results.
Updated 28 Nov 2023
Did this page help you?