# Compare members Source: https://neondeerdata.com/docs/platform/automations/steps/compare-members/ Step ยท Compare Compares two sets of workspace members: only in A, only in B, or in both. ## Inputs | Label | Key | Type | Required | Notes | | ----- | ------------------ | ----------------- | -------- | ----- | | Set A | `previous_members` | Workspace members | No | | | Set B | `new_members` | Workspace members | No | | ## Outputs | Label | Key | Type | Always set | Notes | | ----------- | ----------- | --------------------- | ---------- | ---------------------------------------------------------------- | | Only in B | `added` | Group: Count, Members | Yes | `added.count`, `added.members` (list of actors) | | Only in A | `removed` | Group: Count, Members | Yes | `removed.count`, `removed.members` | | Differences | `changed` | Group: Count, Members | Yes | Items in A or B but not both. `changed.count`, `changed.members` | | In both | `unchanged` | Group: Count, Members | Yes | `unchanged.count`, `unchanged.members` | ## How it behaves - Set comparison on the member ID (trimmed, lowercased). Duplicates count once; order is ignored. - Always takes the single outcome, even when nothing differs. ## Errors Fails when - Neither Set A nor Set B is wired. Wire at least one set. - Either set contains an actor that is not a workspace member, such as an API token, system, app or workflow. Wire workspace members only. - No wired entry can be read as a workspace member. The step fails rather than report no changes; check the variables wired into the sets. For errors that every step can return, see [Troubleshooting](https://neondeerdata.com/docs/platform/automations/troubleshooting/). ## Example Work out who was added to and removed from a task, using Task assignee changed outputs. **Example inputs** | Input | Value | | ----- | --------------------- | | Set A | Maya Chen, Sam Ortiz | | Set B | Sam Ortiz, Priya Shah | **Example outputs** | Output | Value | | ----------- | ------------------------------ | | Only in B | Count 1: Priya Shah | | Only in A | Count 1: Maya Chen | | Differences | Count 2: Maya Chen, Priya Shah | | In both | Count 1: Sam Ortiz |