Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Remove from Group

Use this node to remove the message originator from an entity group — for example, removing a device from the Active devices group when it goes offline, or revoking access by removing a user from a group that governs dashboard visibility.

  • Group name pattern — required. Name of the target entity group. Supports templatization — use ${metadataKey} and $[dataKey] to resolve dynamically.
  • Groups cache expiration time (sec) — how long group lookups are cached. 0 = never expire. Caching reduces database calls for high-throughput flows.
  1. Identify the owner of the message originator (tenant or customer).
  2. Resolve the group name pattern from message data and metadata.
  3. Search for an entity group matching the resolved name, entity type, and owner.
  4. If the group is not found, route via Failure.
  5. If the originator is a member of the group, remove it (the special All group is never modified).
  6. If the originator is not a member, treat this as success (idempotent).
  7. Route via Success.
Connection Condition
Success Entity removed from the group (or was already not a member).
Failure Group not found, unsupported entity type, ownership mismatch, or unexpected error.

Example 1 — Remove device from a named group

Section titled “Example 1 — Remove device from a named group”

State: device is a member of My device group (tenant-owned).

{
"groupNamePattern": "My device group",
"groupCacheExpiration": 300
}

Result: device removed from My device group. Routes via Success.


Example 2 — Dynamic group name from message data

Section titled “Example 2 — Dynamic group name from message data”

Data: { "location": "Warehouse" } | State: group Warehouse devices exists under the tenant.

{
"groupNamePattern": "$[location] devices",
"groupCacheExpiration": 300
}

Result: pattern resolves to Warehouse devices; device removed. Routes via Success.


Example 3 — Device not in the group → Success (idempotent)

Section titled “Example 3 — Device not in the group → Success (idempotent)”

Device is not a member of Target Group. Result: removal succeeds with no-op. Routes via Success.


Example 4 — Group does not exist → Failure

Section titled “Example 4 — Group does not exist → Failure”
{
"groupNamePattern": "Non-existent group",
"groupCacheExpiration": 300
}

Result: group not found. Routes via Failure.


Example 5 — Ownership hierarchy mismatch → Failure

Section titled “Example 5 — Ownership hierarchy mismatch → Failure”

State: group Customer Group is owned by a customer, but the device belongs to the tenant. Result: lookup finds no matching group at the tenant level. Routes via Failure.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbRemoveFromGroupConfiguration",
"type": "object",
"required": ["groupNamePattern", "groupCacheExpiration"],
"additionalProperties": false,
"properties": {
"groupNamePattern": { "type": "string" },
"groupCacheExpiration": { "type": "integer" }
}
}