For-each function is used in performing multiple actions from a single workflow.
For example
Let’s say, IT Admin wants to create tickets in ITSM tool on every new email received in Gmail, for-each function is very helpful to capture individual email details using ‘Get new email’ action and then ‘Create a ticket’ in ITSM tool.
Note: Since, Gmail supports only polling trigger, Workativ will poll Gmail every 30 min for new emails. We might get more than 1 email from the output.
1. Once Admin sets up the input field in Step – 1.
2. Click on ‘Add For-Each’ function from the list.

3. Name your collection and then map the output field from variable picker box and then describe your for-each function and then click on save.

4. Click on the ‘+’ symbol and select ‘Add Action’.

5. Select the application (Freshservice) from the list and choose the action (Create ticket) and then connect your app (Freshservice).

6. Map the appropriate fields using ‘Variable Picker’ box and click on Save.

This creates a new ticket in Freshservice upon every email that is received in Gmail account.