Overview
This node allows users to update participants in a chat group by interacting with an external Chat API. It supports actions such as adding, removing, promoting, or demoting participants within a specified group. This is useful for automating group management tasks in messaging platforms, for example:
- Automatically adding new members to a chat group when they register on a platform.
- Promoting certain users to admin status based on their role changes.
- Removing inactive or banned users from the group.
Properties
| Name | Meaning |
|---|---|
| Group ID | The unique identifier of the chat group where participants will be updated. |
| Participants | An array of phone numbers representing the participants to be affected by the action. |
| Action | The operation to perform on the participants. Options: Promote, Demote, Remove, Add. |
Output
The node outputs a JSON object containing the response data returned by the Chat API after performing the requested participant update. This typically includes confirmation of the action taken and any relevant metadata about the updated group or participants.
If the API returns binary data (not indicated here), it would represent related media or files, but this node primarily deals with JSON responses.
Dependencies
- Requires an external Chat API service accessible via HTTP POST requests.
- Needs an API authentication token and base URL configured through credentials.
- Uses Axios library for making HTTP requests.
Troubleshooting
- Common issues:
- Invalid or missing Group ID can cause the API call to fail.
- Incorrectly formatted Participants list (should be an array of phone numbers) may lead to errors.
- Insufficient permissions or invalid API token will result in authorization errors.
- Error messages:
- Authorization failures usually indicate problems with the API token; verify credentials.
- Network or connection errors suggest checking the base URL and network availability.
- If the node throws an error with item index information, it indicates which input item caused the failure.
- To handle errors gracefully, enable "Continue On Fail" to allow processing of subsequent items even if one fails.
Links and References
- Axios HTTP Client
- Documentation for the specific Chat API should be consulted for detailed information on request payloads and response formats (not provided here).