Condition: the agent belongs to a team

Use the Agent belongs to team node to branch your workflows by which team the conversation's assigned agent is on.

Jun 26, 2026

Watch this step in the video · Detect language and agent in team

What it is and when to use it

The Agent belongs to team node is a condition (router) that checks whether an agent is on a team and sends the flow down the Yes or No branch. It's the key building block for advanced routing: apply different SLAs per team, notify the right lead, escalate beyond the sales team, or tag conversations by area.

By default it evaluates the agent assigned to the conversation, but it can also check a specific user. The check can be belongs to any team or belongs to a specific team.

Requirements

  • At least one team created in the workspace (Settings → Teams menu) with members.
  • A workflow where the conversation already has (or can have) an assigned agent, so the node has someone to evaluate.

Steps to set it up

  1. Open Workflows and enter your workflow editor.
  2. Drag the Agent belongs to team node from the palette (Condition category).
  3. In Configure, choose the Agent to evaluate:
    • Assigned to the conversation (recommended): uses the current agent.
    • Specific user: provide a user by ID or a $variable.
  4. Choose the Team mode:
    • Any team: takes Yes if the agent is on at least one team.
    • Specific team: select the team to check.
  5. Wire the Yes and No branches to the next nodes per your logic.
  6. Save and activate the workflow.

Variables it exposes

After evaluating, the node makes these variables available downstream:

  • $agent_in_team (boolean)
  • $agent_id (the evaluated user)
  • $agent_team_ids and $agent_team_names
  • $agent_team_count
  • $matched_team_name and $agent_team_role (member or lead)
  • $agent_team_members (teammate names)

Use them, for example, to compose a message like: "Your case was routed to the $matched_team_name team."

Verification

Activate the workflow and trigger it on a conversation with an agent you know is (or isn't) on the team. Check the execution history: you'll see the branch taken and the value of $agent_in_team. Test with an agent on no team too, to confirm the No branch.

If it doesn't work

  • Always takes No: the conversation probably has no assigned agent yet. Place the node after an assignment, or use Specific user mode.
  • Wrong team doesn't match: in Specific team, verify you selected the active workspace's team; an agent may be on several teams but only this workspace counts.
  • No members show: confirm the team has members under Settings → Teams.

Tips

  • Combine this node with Detect language or Business hours for truly fine routing (language + area + availability).
  • Because the node is workspace-isolated, it's safe to reuse the same team across workflows without mixing data between workspaces.

Related articles

Was this helpful?

Related articles

Message us on WhatsApp