Winker Node

Winker Node

Overview

This n8n custom node, "Winker Node", is designed to create a user within a specific unit of the Winker platform via its API. It collects user and location details (such as portal, division, and unit IDs) along with personal information, then sends a POST request to the Winker API to register the user in the specified context.

Common scenarios:

  • Automating onboarding of new users into residential or corporate portals managed by Winker.
  • Integrating external systems (like CRMs or HR tools) with Winker for seamless user provisioning.
  • Bulk creation of users based on data from other workflows.

Practical example:
When a new resident is added to a property management system, this node can automatically create their account in the corresponding Winker portal, assign them to the correct division and unit, and set up their contact information.

Properties

Name Type Meaning
Token De Autorização String Authorization token for accessing the Winker API.
ID Do Portal Number Identifier for the target portal in Winker.
ID Da Divisão Number Identifier for the division within the portal.
ID Da Unidade Number Identifier for the specific unit within the division.
Nome String First name of the user to be created.
Sobrenome String Surname (last name) of the user.
E-Mail String Email address of the user.
Perfil String User profile type or role.
Tipo De Telefone String Type of phone (e.g., mobile, landline).
Número De Telefone String Phone number of the user.

Output

The node outputs the response from the Winker API as the json field of each item. The structure of this output depends on the Winker API's response when creating a user. Typically, it may include:

{
  "id": 12345,
  "name": "John",
  "surname": "Doe",
  "email": "john.doe@email.com",
  "profile": "Resident",
  "phones": [
    {
      "type": "mobile",
      "number": "+5511999999999"
    }
  ],
  // ...other fields returned by the API
}

If the API returns an error, the node will throw an error and not output a result for that item.

Dependencies

  • External Service: Requires access to the Winker API.
  • API Key: A valid authorization token ("Token De Autorização") is required for authentication.
  • npm Dependency: Uses the axios library for HTTP requests (bundled with the node).

Troubleshooting

Common issues:

  • Invalid or missing authorization token: Results in authentication errors from the API. Ensure the "Token De Autorização" is correct and has sufficient permissions.
  • Incorrect IDs (portal, division, unit): If any of these are invalid or do not exist, the API will likely return a 404 or similar error.
  • Missing required fields: The API may reject requests if mandatory fields (like email or name) are empty.
  • Network issues: Connectivity problems between n8n and the Winker API endpoint.

Error messages:

  • Errors thrown by the node are wrapped in NodeOperationError and typically include the original error message from the Winker API or network layer. Check the error details for hints (e.g., "Unauthorized", "Not Found", "Validation Error").

How to resolve:

  • Double-check all input parameters for correctness.
  • Verify the authorization token is active and has the necessary scope.
  • Consult the Winker API documentation for required fields and value formats.

Links and References

Discussion