Using the For each chat of the user iterator
- Última atualização2025/09/11
Use the For each chat of the user iterator to automate tasks by looping through all chat conversations of a specified user. This feature allows for actions such as reading messages and processing chats individually, facilitating efficient management of multiple chat threads within an automation workflow.
Prerequisites
Ensure a valid Microsoft Teams session is already be created. See Connect action in the Microsoft Teams package.
Procedure
- Double-click or drag the Loop action from the Loop package in the Actions palette.
- Select the For each chat of the user option from the Iterator list.
- Use the Session name field to select one of the following
options:
-
Session name: Enter the name of the session you
used in the Connect
action.
(Optional) Click the Insert a value icon to select an existing variable that you have used to store the Microsoft Teams session name.
- Variable: Enter the name of the variable that you have used to store the session name.
-
Session name: Enter the name of the session you
used in the Connect
action.
- Select one of the following Chat type options:
- One-on-One: Loops only through individual (1:1) chats.
- Group: Loops only through group chats (more than two participants).
Note: If you do not select an option, then no chat will be retrieved. Ensure you select atleast one option. - Use the Start date and End date options to filter messages within a specified date range.
- In the Assign chat details to variable field, choose either
Multiple variables or Dictionary
variable to save the chat details in the output variable:
-
Multiple variables: Assigns each retrieved value
of a specific key (for example, ID, chatType, and webURL) to a separate
variable enabling you to map each team detail to a specific variable. Do
following steps for each variable:
- Click Add variable mapping.
- Enter the Key of the variable.
- In the Map to variable field, choose a variable where the data will be saved.
- Click Add for this data to be saved to the configured variable.
- Dictionary: stores all values in a dictionary object with key-value pairs.
-
Multiple variables: Assigns each retrieved value
of a specific key (for example, ID, chatType, and webURL) to a separate
variable enabling you to map each team detail to a specific variable. Do
following steps for each variable: