Create a subflow for SAP GUI automation

Now, let's modularize our current flow by moving actions that carry out specific interdependent tasks (in our scenario, filling out a form) into a new subflow.

  1. Create a new subflow, name it ProcessHRMasterForm, and then select Save.

    Screenshot of Power Automate Desktop designer window with the Subflows area open and a new subflow added and named.

  2. Go to the Main tab for the Subflows area, select the highlighted actions shown in the following image (rows 4 through 11), right-click, and then select Cut.

    Screenshot of the Power Automate Desktop Designer window with rows 4 through 11 selected and the shortcut menu open with Cut selected.

  3. Go to the ProcessHRMasterForm tab, right-click to select it, and then select Paste.

    Screenshot of the Power Automate Desktop Designer window with the ProcessHRMasterForm subflow open and the copied rows pasted in.

  4. Go back to the Main tab.

  5. In the Actions search box, enter run subflow, and then drag the Run subflow action onto the canvas. For Call subflow, select ProcessHRMasterForm, and then select Save.

    Screenshot of the Power Automate Desktop designer window with Run subflow being added from the Actions pane.

  6. Create another subflow, name it ProcessEmployeeAddressForm, and then select Save.

    Screenshot of the Power Automate Desktop designer window with a new subflow named ProcessEmployeeAddressForm.

  7. Go back to the Main tab.

  8. On the Main tab, select the highlighted actions shown in the following image (rows 4 through 14), right-click, and then select Cut.

    Screenshot of the Power Automate Desktop designer window with rows 4 through 14 selected and the shortcut menu open with Cut selected.

  9. Go to the ProcessEmployeeAddressForm tab, right-click to select it, and then select Paste.

    Screenshot of the Power Automate Desktop designer window with the ProcessEmployeeAddressForm subflow open before the copied rows are pasted in.

    Screenshot of the Power Automate Desktop designer window with the ProcessEmployeeAddressForm subflow open after the copied rows are pasted in.

  10. Go back to the Main tab.

  11. In the Actions search box, enter run subflow, and then drag the Run subflow action onto the canvas. For Call subflow, select ProcessEmployeeAddressForm, and then select Save.

    Screenshot of the Power Automate Desktop Designer window with Run subflow being added from the Actions pane after the ProcessHRMasterForm subflow is added.