Telegram GramJS icon

Telegram GramJS

Interact with Telegram using GramJS

Actions9

Chat → Get Members

AI-generated

Overview

This node integrates with Telegram using the GramJS library to perform various chat-related operations. Specifically, for the Chat - Get Members operation, it retrieves the list of members (participants) from a specified Telegram chat. This is useful when you want to analyze or process the members of a group or channel, such as for community management, analytics, or automated messaging workflows.

Practical examples:

  • Extracting all members of a Telegram group to export their usernames or IDs.
  • Monitoring membership changes by periodically fetching chat participants.
  • Filtering or segmenting users based on their presence in specific chats.

Properties

Name Meaning
Chat ID The identifier of the chat (can be chat ID, username, or phone number)
Additional Options Collection of optional parameters (not used specifically in this operation)

Note: For this operation, only the Chat ID is required and used.

Output

The output is an array of JSON objects, each representing a member (participant) of the specified Telegram chat. Each object contains detailed information about a user, such as their Telegram ID, username, and other profile details as provided by the Telegram API.

Example output structure (simplified):

[
  {
    "json": {
      "id": 123456789,
      "username": "exampleuser",
      "firstName": "John",
      "lastName": "Doe",
      "status": { /* user status info */ },
      // ... other user properties
    }
  },
  {
    "json": {
      "id": 987654321,
      "username": "anotheruser",
      "firstName": "Jane",
      "lastName": "Smith",
      "status": { /* user status info */ },
      // ... other user properties
    }
  }
]

No binary data is output for this operation.

Dependencies

  • Requires a valid Telegram API authentication via a session string credential along with API ID and API hash.
  • Uses the GramJS Telegram client library internally.
  • No additional external services are needed beyond Telegram itself.

Troubleshooting

  • Authentication errors: If the node throws errors related to authentication, ensure that a valid session string is provided. Phone code or password authentication is not supported within this node.
  • Invalid Chat ID: Errors may occur if the provided Chat ID is incorrect or the bot/user does not have access to the chat.
  • Rate limits: Telegram may impose rate limits; repeated calls in a short time might cause temporary failures.
  • Empty results: If the chat has no members or the user lacks permission, the output may be empty or incomplete.

Links and References

Discussion