List Channels

Definition

The List Channels action in Zenphi’s Microsoft Teams connector allows you to retrieve a complete list of channels within a specific team. This action makes it easy to gather details about channels, such as their names, descriptions, email addresses, visibility type, and creation date. You can also apply filters to refine the results—for example, showing only private channels, recently created channels, or channels that are not archived. This provides teams with better visibility and management of their Microsoft Teams environment, enabling automation scenarios like reporting, governance, or content organization.



Example Use Cases

1. Channel Inventory for Compliance

Automatically retrieve all channels within a team to maintain an up-to-date inventory for compliance or auditing purposes.

2. Reporting on Channel Usage

Generate reports that show all channels in a team, including their descriptions, creation dates, and visibility, to track usage and adoption trends.

3. Filter Active vs Archived Channels

Use the filtering option to separate active channels from archived ones, helping administrators focus on currently used collaboration spaces.

4. Manage Private and Shared Channels

List only private or shared channels to ensure governance policies (like access restrictions or naming conventions) are being followed.

5. Automate Documentation

Retrieve channel details dynamically and log them into SharePoint, Google Sheets, or other documentation systems for centralized tracking.



Inputs

1. Connection

This field establishes the link between Zenphi and your Microsoft Teams environment. By setting up the connection, Zenphi gains secure access to your Teams data so it can retrieve the list of channels. You only need to configure this once, and it will be reused across other Teams-related actions.


2. Team Id

Here, you specify the team whose channels you want to list.

  • Dropdown Selection: After the connection is established, Zenphi will display a list of all available teams you can pick from directly.
  • Hardcoding: If you already know the team’s unique identifier, you can enter it manually.
  • Dynamic Selection (Token Picker): Use the token picker (chain icon) to reference a team ID from a previous step in your flow. This is useful when working with multiple teams dynamically rather than hardcoding one.

3. Condition

The Condition field allows you to filter the list of channels based on specific criteria, making it easier to narrow down results and focus only on the channels that meet your requirements.

You can create one or multiple filters and define whether they should be combined using “AND” (all conditions must be met) or “OR” (any one of the conditions can be met).

Filter Components:

  1. First Parameter (Field to filter on): You can choose from a predefined list of channel attributes:

    • Display name – The visible name of the channel.
    • Description – The channel’s description text.
    • Email – The email address associated with the channel.
    • Is Archived – Whether the channel is archived or active.
    • Membership type – The channel type (standard, private, shared).
    • Created date/time – The date and time the channel was created.
  2. Expression (Comparison rule): Defines how the filter is applied. Options include:

    • Contains – The field contains the specified value.
    • Equal to – The field exactly matches the specified value.
    • Not equal to – The field does not match the specified value.
    • Starts with – The field begins with the specified characters.
    • Ends with – The field ends with the specified characters.
  3. Value (Filter input): The actual data you’re comparing against.

    • You can hardcode a value (e.g., "Project") to filter channels containing that word.
    • Or use the token picker (chain icon) to dynamically reference a value from a previous step (e.g., a project name submitted via a form).

Example Filter Setup:

  • Scenario: You want to retrieve all active standard channels in a team that include “Marketing” in their name.

  • Configuration:

    • Condition 1: Display Name Contains “Marketing”
    • Condition 2: Membership Type Equal to “Standard”
    • Condition 3: Is Archived Equal to “False”
    • Relation: AND (all conditions must apply).

This would return only the active standard channels with “Marketing” in their names.



Outputs

When the List Channels action runs, it provides detailed information about each channel retrieved. These outputs can then be used in later steps of your Zenphi flow to make decisions, populate reports, or trigger other actions.


1. Channels

A collection (list) of all the channels that match the criteria set in your inputs. Each channel includes detailed properties, such as:

  • Channel Id The unique identifier of the channel in Microsoft Teams. This value is essential when you need to reference or update a specific channel in later steps.

  • Channel Name The display name of the channel (e.g., "General" or "Marketing Updates"). This helps you easily recognize and work with channels in your automation.

  • Channel Description The text description assigned to the channel. Useful for providing context or categorizing channels when generating reports or automating channel-related workflows.

  • Channel Email The email address associated with the channel. This can be used if you want to send emails directly into the channel or integrate channel emails into other workflows.

  • Is Archived A status flag showing whether the channel is archived. Archived channels are read-only, so this output helps you avoid trying to post or update them.

  • Created Date/Time The exact date and time when the channel was created. Useful for tracking channel lifecycles, audits, or reporting.

  • Membership Type The type of channel. Possible values:

    • Standard – Accessible to all team members.
    • Private – Restricted to selected members.
    • Shared – Can be shared with users outside the team.
    • UnknownFutureValue – A placeholder for potential future types. This helps you identify the level of access and manage channels accordingly.
  • Web URL A direct hyperlink to the channel in Microsoft Teams. Perfect for creating shortcuts, notifications, or dashboard links that take users directly to the channel.


2. Count

The total number of channels returned in the current query. This can be useful for reporting, validating whether your filters worked correctly, or making automation decisions (e.g., branching flows if no channels are found).



Example

Imagine your organization wants to identify all private project-related channels within the "Marketing Team" so that you can track their usage or update permissions later. Instead of manually searching through Teams, you can automate this process in Zenphi using the List Channels action.

Step-by-Step Example

  1. Set up the action in your flow

    • Add the List Channels action from the Microsoft Teams category.
    • Select your Connection to Microsoft Teams.
  2. Choose the Team Id

    • From the dropdown, select the "Marketing Team" (or another team you want to analyze).
    • Alternatively, use the token picker to dynamically pass the Team Id from a previous step in your flow (e.g., retrieving a list of teams earlier).
  3. Configure the Condition (Filter) This is where you can narrow down results to only the channels that matter.

    • Add a filter where:

      • Field: Membership Type
      • Expression: Equal To
      • Value: Private
    • Add another filter where:

      • Field: Display Name
      • Expression: Contains
      • Value: Project
    • Combine these filters with an AND relation.

    ✅ This ensures only channels that are both Private and whose names include "Project" will be returned.

  4. Run the Flow Once the flow executes, the action returns a list of filtered channels that match your condition. For each channel, you’ll see details such as its name, description, membership type, and a direct web URL.

  5. Use the Results in Later Steps

    • Send the list of project channels in an email report.
    • Log channel details into a SharePoint list for tracking.
    • Trigger follow-up actions, like notifying channel owners or updating policies.

👉 In this example, the Condition section ensures your automation isn’t overloaded with unnecessary data. Instead, it focuses only on channels that are private and project-related, giving you a precise, actionable output.


Best Practices

1. Use Conditions to Limit Results

Always apply filters (Conditions) when possible instead of retrieving all channels. This reduces unnecessary data, speeds up the flow, and ensures the output is relevant. For example, filter by Membership Type = Private or Display Name contains “Project” if you only need specific channels.

2. Handle Archived Channels Thoughtfully

Some organizations archive channels rather than deleting them. If your use case doesn’t require them, add a filter with is Archived = False to exclude archived channels from your results.

3. Be Consistent with Membership Types

When filtering by Membership Type, ensure you use the exact supported values:

  • standard
  • private
  • shared
  • unknownFutureValue

Misspelled or incorrect values will result in no matches.

4. Use Dynamic Team Ids When Automating at Scale

Instead of hardcoding a Team Id, consider dynamically passing it from a previous step (e.g., after running a List Teams action). This makes your flow reusable across multiple teams without reconfiguration.

5. Manage Large Teams in Batches

For teams with many channels, break your process into smaller batches or apply filters to avoid hitting volume limits. If you truly need all channels, use the Count output to track how many were returned.

6. Store Results for Reporting

Use the returned channel data in downstream systems (e.g., logging into a SharePoint List or Google Sheet). This allows you to create a running history of channels over time for auditing or reporting.

7. Combine with Other Actions for Advanced Workflows

  • Pair List Channels with Send Email to notify admins of new private channels.
  • Use it with Update Channel to apply consistent descriptions across multiple channels.
  • Combine with Create Channel to check if a channel exists before creating duplicates.