Poli icon

Poli

Node principal para interagir com a API da Poli

Overview

The node provides integration with the Poli API, allowing users to manage various resources such as apps, accounts, channels, messages, templates, contacts, tags, users, teams, and webhooks. Specifically, for the Webhook resource and the Create Webhook operation, this node enables users to create new webhooks in the Poli system.

This is useful when you want to set up event-driven workflows that react to changes or activities within the Poli platform. For example, you can create a webhook to receive notifications about updates to organizations, chats, contacts, users, or applications, enabling real-time synchronization or triggering downstream automation.

Practical examples:

  • Automatically trigger a workflow when a new contact is added or updated.
  • Receive chat message events to process or archive conversations.
  • Monitor user activity or application changes via webhook callbacks.

Properties

Name Meaning
Application ID The unique identifier of the application in Poli where the webhook will be created.
Webhook URL The URL endpoint where Poli will send webhook event payloads.
Subscriptions The types of events to subscribe to. Options include: Organizations, Chats, Contacts, Users, Applications.

Output

The node outputs JSON data representing the response from the Poli API after creating the webhook. This typically includes details about the newly created webhook such as its ID, subscribed event types, status, and possibly metadata confirming successful registration.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the Poli API using an API key or authentication token configured in n8n credentials.
  • The node depends on the Poli API being accessible and the provided Application ID being valid.
  • Proper permissions must be granted to the API key to create webhooks.

Troubleshooting

  • Common issues:

    • Invalid or missing Application ID: Ensure the Application ID is correct and exists in your Poli account.
    • Incorrect Webhook URL: The URL must be reachable and able to accept POST requests from Poli.
    • Insufficient permissions: The API key used must have rights to create webhooks.
    • Empty or invalid subscriptions array: At least one subscription type must be selected.
  • Error messages:

    • "Resource 'webhook' not found": Indicates the resource parameter was incorrect or missing.
    • "Operation 'create' not found for resource 'webhook'": Means the operation parameter was invalid.
    • API errors returned by Poli (e.g., 400 Bad Request) usually indicate validation issues; check input values carefully.

Links and References

Discussion