Poli icon

Poli

Node principal para interagir com a API da Poli

Overview

This node, named "Poli," is designed to interact with the Poli API, providing a unified interface for various resources and operations. Specifically, for the Template resource with the List Templates operation, it allows users to retrieve a list of message templates associated with a given account.

Common scenarios where this node is beneficial include:

  • Fetching available message templates to display or select from in automated workflows.
  • Integrating template management into customer communication pipelines.
  • Paginating through large sets of templates with filtering and sorting options.

For example, a user might want to list all templates for a specific account, filter them by a search term, sort by creation date descending, and include additional metadata fields in the response.

Properties

Name Meaning
Account ID The unique identifier of the account whose templates are to be listed. (Required)
Options A collection of optional parameters to refine the listing:
- Search Text string to filter templates by matching content or name.
- Order Sorting criteria specifying field and direction, e.g., created_at desc.
- Page Page number for paginated results (default is 1).
- Per Page Number of items per page to return (default is 50).
- Include Additional fields to include in the response; possible values: key, version, status, message, team, metadata.
- Query Raw query string for advanced filtering, e.g., id=18&name=gabriel.

Output

The node outputs JSON data representing the list of templates retrieved from the Poli API. Each item in the output typically includes standard template information such as identifiers, names, and optionally additional fields if requested via the "Include" property.

If binary data were involved (not indicated here), it would represent attachments or media related to templates, but this operation focuses on JSON data only.

Dependencies

  • Requires an active connection to the Poli API using an API key or token configured in n8n credentials.
  • The node depends on the Poli API being accessible and the provided Account ID being valid.
  • No other external services or environment variables are explicitly required.

Troubleshooting

  • Common Issues:

    • Invalid or missing Account ID will cause the API call to fail.
    • Incorrect formatting in the "Order" or "Query" fields may result in errors or empty responses.
    • Requesting pages beyond the available range will return empty results.
  • Error Messages:

    • "Resource 'template' não encontrado": Indicates the resource was not recognized; ensure the Resource parameter is set correctly.
    • "Operação 'list' não encontrada para o resource 'template'": Means the operation is invalid for the selected resource; verify the Operation parameter.
    • API authentication errors suggest checking the configured API key credential.
  • Resolution Tips:

    • Double-check the Account ID and ensure it exists in the Poli system.
    • Validate query strings and ordering syntax.
    • Confirm API credentials are properly set up and have necessary permissions.

Links and References

Discussion