Overview
This node acts as a trigger to receive webhook events from the Poli API. It allows users to create or link an app in Poli, register a webhook URL with custom path, and listen for specific event types such as message reception, message status updates, and contact changes.
Common scenarios include:
- Automating workflows based on incoming messages or contact updates in Poli.
- Integrating Poli messaging events into other systems via n8n.
- Monitoring message delivery statuses to trigger follow-up actions.
For example, you can set up this node to trigger whenever a new message is received in Poli, then process that message data downstream in your workflow.
Properties
| Name | Meaning |
|---|---|
| App Name | The name of the Poli app to create or use for receiving webhook events. |
| Eventos | The list of event types to monitor. Options: "Message Received", "Message Status Updated", "Contact Updated", "Contact Created". |
| Webhook Path | Custom path segment for the webhook URL where Poli will send events (e.g., "poli"). |
| Page | Page number when listing Poli applications (used internally to find existing apps). Optional. |
Output
The node outputs JSON data representing the received webhook event. The structure includes:
event: The event type string (e.g., "message.received").timestamp: ISO timestamp when the event was processed.payload: An object containing all relevant event data fields except some internal metadata keys.
Example output JSON:
{
"event": "message.received",
"timestamp": "2024-06-01T12:00:00.000Z",
"payload": {
"id": "12345",
"content": "Hello world",
"sender": "contact_abc",
"...": "other event-specific fields"
}
}
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Poli API.
- Needs environment variables or n8n settings to determine the base webhook URL (
WEBHOOK_URLor defaults). - Uses Poli API endpoints to manage apps and webhooks:
- List/create applications
- List/create/delete webhooks for those applications
Troubleshooting
- No data received in webhook: If the webhook receives no body data, the node throws an error. Ensure Poli is correctly sending POST requests with JSON payloads.
- Webhook activation errors: Errors during activation usually relate to API authentication issues or network problems. Verify the API key credential and network connectivity.
- App not found or created: If the specified app name does not exist, the node attempts to create it. Failure here may indicate insufficient permissions or invalid API credentials.
- Webhook already registered: The node checks if the webhook URL is already registered to avoid duplicates; if you change the webhook path, ensure it matches the configured value.
- Page parameter: Used internally to paginate through apps; normally should remain default unless managing many apps.
Links and References
- Poli API documentation (general reference): https://docs.poli.digital/
- n8n webhook documentation: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/