• Tools
Tools
  • Tools
loading...
No Results
  • ActiveCampaign
  • AirDroid Business
    • Index
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a group
    • Get a group id by group name
    • Get a device by name
    • Get a device app by name
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get device info push
    • Get device location report
    • Get device network connection history
    • Get device application usage duration
    • Get device application report
    • Get device online status report
    • Get device remote access report
    • Get data usage overview and trends
    • Get tag ids by tag names
    • Get top 10 apps by usage duration
    • Get top 10 data usage apps
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Set tags
    • Turn off device screen
    • Unenroll a device
    • Update a device name
    • Update a device remark
    • Update a group name
    • Update a group remark
  • Asana
  • AWS-S3
  • AWS Lambda
  • Appstore
  • BambooHR
  • Bitbucket
  • Brevo
  • Coda
  • Code
  • ConvertKit
  • CSV
  • Crypto
  • Clockify
  • Data Shaping
  • Date & Time
  • Delay
  • DingTalk
  • Discourse
  • Discord
  • Dropbox
  • Elastic Security
  • FeiShu
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Gitlab
  • Github
  • Grafana
  • Google Ads
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Harvest
  • HaloPSA
  • Hacker News
  • Hubspot
  • Help Scout
  • Intercom
  • Jira
  • Jenkins
  • Kafka
  • Lemlist
  • MySQL
  • Monday
  • Metabase
  • MailChimp
  • Microsoft Excel
  • Microsoft Outlook
  • Notion
  • Nextcloud
  • Odoo
  • Ortto
  • Okta
  • PayPal
  • Paddle
  • Pipedrive
  • PostHog
  • PostgreSQL
  • Qdrant
  • QRCode
  • QuickBooks
  • Redis
  • Stripe
  • Splunk
  • Shopify
  • Segment
  • ServiceNow
  • Search&Crawl
  • Text
  • Trello
  • Twilio
  • Todoist
  • Wikipedia
  • WordPress
  • WooCommerce
  • Xml
  • YouTube
  • Zulip
  • Zoom
  • Zendesk
  • Zammad
  • Zoho CRM
Home > Tools > AirDroid Business

Get a group id by group name

Tool Name: airdroid_business_get_group_id_by_group_name

Risk Level: 🟢 Low Risk

Execution Mode: ⚡ Synchronous

Category: Group Management

Quick Start (Copy & Use)

One-liner: Look up the GroupId by exact group name match for subsequent group operations.

You need: GroupName (group name, exact match, case-sensitive)

Success criteria: StatusCode == 200 AND ErrorMessage == "" AND GroupIds array is not empty

What to do next: Use the returned GroupId with Get a Group, Move Devices to a Group, or other tools that require a GroupId

Minimum request example:

{
  "GroupName": "Sales Team"
}

Minimum response example:

{
  "GroupIds": [24535],
  "StatusCode": 200,
  "ErrorMessage": ""
}

Recipes (Common Recipes)

Recipe 1: Look up a group's ID

Scenario: Get the ID of a group by its name

{
  "GroupName": "Sales Team"
}

Recipe 2: Look up the default group's ID

Scenario: Get the ID of the enterprise's default group (each enterprise has exactly one)

{
  "GroupName": "Default"
}

Note: The default group name is always "Default" (case-sensitive).

Recipe 3: Look up then get group details

Scenario: Get full group information by group name

Step 1: Call this tool to get the GroupId

{
  "GroupName": "Sales Team"
}

Step 2: Use the returned GroupId to call Get a Group

{
  "GroupId": 24535
}

1. Overview

1.1 Description

Look up a group ID in AirDroid Business by exact group name match. This is a commonly used helper tool that converts user-provided group names to system-internal GroupIds for calling other tools that require the GroupId parameter.

1.2 When to Use

  • Name to ID conversion: User provides a group name, but subsequent operations require a GroupId
  • Verify group existence: Check whether a group with a specific name exists
  • Create nested groups: Get the parent group ID for the ParentGroupId parameter of Create a Group
  • Move devices to a group: Get the target group ID for the Move Devices to a Group operation

1.3 Execution Mode & Response

This is a synchronous operation that returns the GroupId list immediately.

  • Return value: GroupIds array (integer array)
  • Typical latency: < 1 second

1.4 Prerequisites

Condition Description How to Check
Group exists The group to query must already be created An empty array indicates it does not exist
Sufficient permissions Account must have permission to view groups -

1.5 Prerequisite Tools

No direct dependencies. This tool is typically used as a prerequisite for other tools.

1.6 Comparison with Similar Tools

Tool Name Use Case Difference
Get a Group ID by Group Name Name → ID conversion Returns only a GroupId array
Get a Group ID → detail query Returns full group information

2. Inputs

2.1 Parameter List

Parameter Type Required Default Description
GroupName string ✅ Yes - Group name (exact match, case-sensitive)

2.2 Parameter Details

`GroupName`

The group name to query, using exact match.

  • Type: string
  • Format requirements:
    • Cannot be empty or contain only spaces
    • Exact match, case-sensitive
    • Default group name is "Default"
  • Source: User-provided or obtained from a business system
  • How to fill in a GI node:
    • Constant value: Enter a string directly, e.g. "Sales Team"
    • Upstream output reference: Get the group name field from an upstream node
  • Example:
"Sales Team"

Important notes:

  • Name matching is exact match; "sales team" and "Sales Team" are different
  • If duplicate-named groups exist (not recommended), multiple GroupIds will be returned

3. Outputs

3.1 Response Examples

Success response (group found):

{
  "GroupIds": [24535],
  "StatusCode": 200,
  "ErrorMessage": ""
}

Success response (group not found):

{
  "GroupIds": [],
  "StatusCode": 200,
  "ErrorMessage": ""
}

Success response (duplicate group names):

{
  "GroupIds": [24535, 24536],
  "StatusCode": 200,
  "ErrorMessage": ""
}

Error response (parameter error):

{
  "GroupIds": [],
  "StatusCode": 200,
  "ErrorMessage": "Invalid group_name."
}

3.2 Field Descriptions

Field Path Type Description
StatusCode number Status code. See 5.1 AB Three-Layer Error Codes
ErrorMessage string Error message. Empty string on success
GroupIds number-array Array of matched group IDs. Empty array if no match

3.3 GroupIds Return Value Explanation

Scenario GroupIds Value Description
Unique match found [24535] Normal case; use GroupIds[0]
Group does not exist [] Empty array; prompt user to check the group name
Duplicate names exist [24535, 24536] Multiple IDs; ask user to confirm which one to use

4. Examples

4.1 Basic Example: Look up a group ID

Request parameters:

{
  "GroupName": "Sales Team"
}

Response:

{
  "GroupIds": [24535],
  "StatusCode": 200,
  "ErrorMessage": ""
}

4.2 Advanced Example: Look up the default group

Request parameters:

{
  "GroupName": "Default"
}

Response:

{
  "GroupIds": [1],
  "StatusCode": 200,
  "ErrorMessage": ""
}

4.3 Error Example: Group not found

Request parameters:

{
  "GroupName": "Non Existent Group"
}

Response:

{
  "GroupIds": [],
  "StatusCode": 200,
  "ErrorMessage": ""
}

Agent handling advice: An empty GroupIds array means the group does not exist. Prompt the user to check the group name spelling or create a new group.

5. Error Handling

5.1 AB Three-Layer Error Codes

Core principle: AB uses a three-layer error code strategy. The Agent should decide its handling approach based on the StatusCode.

StatusCode Meaning Scenario Agent Action
200 Business success or business error HTTP request succeeded; check ErrorMessage Empty ErrorMessage = success; non-empty = business error
500 Network/request exception Timeout, connection failure ⚠️ Retry up to 2 times with 5-second intervals

5.2 Common Errors

StatusCode ErrorMessage Example Cause Fix
200 Invalid group_name. Group name is empty or contains only spaces Ensure GroupName is valid
200 access_token is invalid. Token is invalid or expired Refresh the AccessToken
500 Request timeout after 60 seconds. Request timed out Retry later

5.3 Agent Self-Healing Decision Table

StatusCode Auto-Retry Retry Strategy Requires Manual Intervention
200 (GroupIds is empty) ❌ - Prompt user to check group name
200 (non-empty ErrorMessage) ❌ - Fix based on error message
500 ⚠️ Retry up to 2 times with 5-second intervals Escalate if failures persist

6. Best Practices

6.1 Performance Optimization

  • Cache results: Group IDs rarely change; cache query results for reuse
  • Avoid redundant queries: Within the same workflow, store the GroupId in a variable for reuse

6.2 Security Considerations

🟢 Read operation: No special security concerns; this operation does not modify any data.

6.3 Name Matching Notes

  • Exact match: Name must match exactly, including case and spaces
  • Default group: The system default group name is "Default"
  • Duplicate names: Although not recommended, the system allows creating groups with duplicate names; in that case, multiple IDs will be returned

7. Related Tools

7.1 Prerequisite Tools

No direct dependencies. This tool is typically used as a prerequisite step for other tools.

7.2 Follow-up Tools

Tool Name Purpose
Get a Group Use GroupId to get detailed group information
Create a Group Use GroupId as ParentGroupId to create a sub-group
Update a Group Name Use GroupId to modify the group name
Update a Group Remark Use GroupId to modify the group remark
Delete Groups Use GroupId to delete the group
Move Devices to a Group Use GroupId to move devices into the group

7.3 Similar Tools Comparison

Tool Name Use Case Difference
Get a Group ID by Group Name Name → ID conversion Returns only a GroupId array
Get a Group ID → detail query Returns full group information

8. Tool Chains

8.1 Name to ID Then Get Group Details

Scenario: User provides a group name; need to retrieve full group information

Tool chain:

Get a Group ID by Group Name → Get a Group

Steps:

  1. Call Get a Group ID by Group Name with the group name
  2. Check that GroupIds is not empty
  3. Use GroupIds[0] to call Get a Group for details

8.2 Create Nested Groups

Scenario: Create a sub-group under an existing group

Tool chain:

Get a Group ID by Group Name → Create a Group

Steps:

  1. Call Get a Group ID by Group Name to get the parent group ID
  2. Use the returned GroupId as ParentGroupId
  3. Call Create a Group to create the sub-group

8.3 Move Devices to a Named Group

Scenario: User provides a target group name; need to move devices into that group

Tool chain:

Get a Group ID by Group Name → Move Devices to a Group

Steps:

  1. Call Get a Group ID by Group Name to get the target group ID
  2. Verify the group exists (GroupIds is not empty)
  3. Use the GroupId to call Move Devices to a Group

8.4 Verify Group Exists Before Deleting

Scenario: Safely confirm the group exists before deleting

Tool chain:

Get a Group ID by Group Name → Delete Groups

Steps:

  1. Call Get a Group ID by Group Name to confirm the group exists
  2. If GroupIds is empty, inform the user the group does not exist
  3. If it exists, use GroupIds to call Delete Groups (requires user confirmation)
Updated on: Feb 13, 2026
Was This Page Helpful?
Prev Get a group
Next Get a device by name
Discussion

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
On this page
  • Quick Start (Copy & Use)
  • Recipes (Common Recipes)
    • Recipe 1: Look up a group's ID
    • Recipe 2: Look up the default group's ID
    • Recipe 3: Look up then get group details
  • 1. Overview
    • 1.1 Description
    • 1.2 When to Use
    • 1.3 Execution Mode & Response
    • 1.4 Prerequisites
    • 1.5 Prerequisite Tools
    • 1.6 Comparison with Similar Tools
  • 2. Inputs
    • 2.1 Parameter List
    • 2.2 Parameter Details
  • 3. Outputs
    • 3.1 Response Examples
    • 3.2 Field Descriptions
    • 3.3 GroupIds Return Value Explanation
  • 4. Examples
    • 4.1 Basic Example: Look up a group ID
    • 4.2 Advanced Example: Look up the default group
    • 4.3 Error Example: Group not found
  • 5. Error Handling
    • 5.1 AB Three-Layer Error Codes
    • 5.2 Common Errors
    • 5.3 Agent Self-Healing Decision Table
  • 6. Best Practices
    • 6.1 Performance Optimization
    • 6.2 Security Considerations
    • 6.3 Name Matching Notes
  • 7. Related Tools
    • 7.1 Prerequisite Tools
    • 7.2 Follow-up Tools
    • 7.3 Similar Tools Comparison
  • 8. Tool Chains
    • 8.1 Name to ID Then Get Group Details
    • 8.2 Create Nested Groups
    • 8.3 Move Devices to a Named Group
    • 8.4 Verify Group Exists Before Deleting
loading...
No Results