Switch icon

Switch

Switch API Integration

Overview

This node integrates with the Switch API to manage communication groups and channels, send messages, and perform related operations within a community platform. Specifically, the "Create Group" operation allows users to create a new group by specifying its name, description, and privacy setting.

Common scenarios for this node include automating community management tasks such as creating new discussion groups dynamically based on user input or external triggers, organizing members into private or public groups, and integrating group creation into broader workflows like onboarding or event management.

For example, an organization could use this node to automatically create private groups for project teams when new projects are initiated, ensuring that only relevant members have access.

Properties

Name Meaning
Group Name The name of the group to create (required).
Description A textual description of the group.
Is Private Boolean indicating whether the group is private (true) or public (false).

Output

The node outputs a JSON object representing the response from the Switch API after attempting to create the group. This typically includes details about the newly created group such as its ID, name, description, privacy status, and any other metadata returned by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Switch API via an API key credential.
  • The node makes HTTP POST requests to a local server endpoint (http://localhost:8000/createGroup) which acts as a proxy or middleware to the actual Switch API.
  • Proper configuration of the API authentication token is necessary for successful requests.

Troubleshooting

  • Common issues:

    • Network connectivity problems to the local server endpoint may cause request failures.
    • Missing or invalid API authentication token will result in authorization errors.
    • Providing an empty or invalid group name (which is required) will likely cause the API to reject the request.
  • Error messages:

    • "Operation "createGroup" not supported": Indicates the operation parameter was set incorrectly; ensure it is exactly "createGroup".
    • Errors containing "error": "<message>" in the output JSON indicate API or network errors; check credentials and endpoint availability.
  • Resolutions:

    • Verify the API key credential is correctly configured and valid.
    • Ensure the local server at http://localhost:8000 is running and accessible.
    • Validate all required parameters before execution, especially the group name and privacy flag.

Links and References

Discussion