List Teams
Definition
This action retrieves a complete list of all teams that exist within a specified Asana workspace. It allows you to programmatically access team data, which is fundamental for automating user management, project assignments, and reporting tasks related to team structures in Asana.
- Key capabilities:
- Fetches all teams associated with a specific Asana workspace.
- Returns detailed information for each team, including its unique ID, name, description, and privacy status.
This action serves as a crucial starting point for any automation that needs to interact with or make decisions based on the teams within your Asana organization.
Inputs
- Connection
- Purpose: This field is for establishing a secure and authenticated link to your Asana account. It authorizes zenphi to access the data within your Asana environment on your behalf.
- Practical Guidance: You will typically select a pre-existing Asana connection from a dropdown list. If you haven't connected your Asana account before, you will be prompted to create a new connection, which involves signing in to Asana and granting permissions.
- Use Case Context: You would use the 'Connection' field to give zenphi the necessary permissions to read the list of teams from your Asana account.
- Workspace
- Purpose: This field specifies the exact Asana workspace from which you want to retrieve the list of teams. An organization can have multiple workspaces, so this ensures the action targets the correct one.
- Practical Guidance: After you select a valid connection, this field will become a dropdown menu populated with the workspaces available to you. You can select one directly. Alternatively, you can use a dynamic value from a previous step by clicking the token picker icon, such as using the 'Workspace ID' from a "Get Workspace" action.
- Use Case Context: You would use the 'Workspace' field to tell zenphi precisely which workspace's teams you need to list for your workflow.
Outputs
- teams
- Data Description: This output is a list of all the teams found in the specified Asana workspace. Each item in the list is an object containing detailed information about a single team.
- Workflow Utility: This list is most commonly used with a 'For Each' loop to perform an action on every team, such as checking its members or creating a standard project within it.
- Properties:
- Team id: The unique identifier for the team. This ID is essential for interacting with the team in subsequent Asana actions, such as 'Get Team Members' or 'Add User to Team'.
- Team name: The display name of the team. This is useful for logging purposes, creating dynamic task names, or in conditional logic (e.g., "If Team name contains 'Marketing', then...").
- Description: The description of the team as set in Asana. This text can be used to provide context in notifications or reports generated by your workflow.
- Permalink URl: A direct web link to the team's page within the Asana application. This URL is useful for including in emails or messages to provide users with a quick way to navigate to the team.
- Team Privacy Types: Indicates the visibility of the team within the organization (e.g., public or private). This can be used in a conditional step to route the workflow differently based on a team's privacy setting.
- Organization: An object containing details about the parent organization the team belongs to.
- Id: The unique identifier for the organization. This can be used for logging or for passing to other advanced actions that require an organization ID.
- Name: The name of the organization. This is useful for verification and display purposes in notifications or logs.
Example Use Cases:
- Automate Team Audits Periodically retrieve a complete list of teams to review for compliance with naming conventions, privacy settings, and ownership.
- Standardize Project Creation Fetch all teams within a workspace to automatically create a standardized "Q4 Planning" project for each one.
- Sync Team Data to External Systems Pull the list of Asana teams and their properties to update an internal company directory or a BI dashboard.
- Generate Team Directory Reports Create and distribute a report containing the name, description, and direct URL for every team in a workspace for easy reference.
Example:
Scenario: An IT administrator needs to perform a quarterly audit of all teams within the main company Asana workspace. The goal is to create a report in a Google Sheet that lists each team's name, its privacy setting, and a direct link to its Asana page to ensure all teams comply with internal governance policies.
Steps to Implement:
- Create a new zenphi Flow and use a Schedule Trigger configured to run once every quarter.
- Add the Asana List teams action to the canvas.
- Configure the action with the following settings:
- Connection: Select the appropriate authenticated Asana connection.
- Workspace: Choose the primary company workspace from the dropdown list that needs to be audited.
- Add a For Each loop action and configure it to iterate through the
teams
output from the List teams action. - Inside the loop, add a Google Sheets Add a Row action. Map the properties from the current team item in the loop to the corresponding columns in your audit sheet:
- Team Name Column: Map the
Team name
token from the loop. - Privacy Column: Map the
Team Privacy Types
token. - URL Column: Map the
Permalink URl
token.
Outcome: The workflow automatically generates a comprehensive and up-to-date team audit report every quarter without any manual intervention. This saves the IT administrator hours of manual data collection, eliminates human error, and provides a consistent, accurate record for compliance and governance reviews.
Best Practices:
- Target the Correct Workspace Always double-check that you have selected the correct Asana workspace in the action's input. Retrieving teams from the wrong workspace will lead to incorrect data and failed workflow logic. For dynamic flows, pass the Workspace ID from a previous step to ensure accuracy.
- Use a "For Each" Loop for Processing The action's primary output is a list (or array) of teams. To perform an action on each team individually—such as getting its members or creating a project—you must process this output using a "For Each" loop.
- Store and Use the Team ID
When iterating through the list, remember that the
Team id
is the unique identifier required by most other Asana actions. If you need to update or retrieve information about a specific team later in the Flow, use itsTeam id
. - Filter for Relevant Teams If you only need to process specific teams (e.g., those containing "Marketing" in the name), add a conditional "If" action inside your "For Each" loop. This prevents the workflow from running unnecessary actions and makes your automation more efficient.
Updated about 2 hours ago