Alegra (Unofficial - BETA) icon

Alegra (Unofficial - BETA)

Consume Alegra API - UNOFFICIAL BETA community node. NOT officially supported by Alegra.

Overview

The node integrates with the Alegra API to manage invoices. Specifically, the "Invoice - Get Many" operation retrieves multiple invoices from the Alegra system based on user-defined filters and pagination options.

This operation is useful for scenarios such as:

  • Fetching a list of invoices within a specific date range.
  • Retrieving invoices filtered by status (e.g., draft, open, closed).
  • Getting invoices related to a particular client.
  • Sorting invoices by date, ID, or number in ascending or descending order.
  • Controlling the number of invoices returned per execution or retrieving all available invoices.

Practical examples include generating reports of recent invoices, syncing invoice data with other systems, or monitoring outstanding invoices for follow-up.

Properties

Name Meaning
Return All Whether to return all matching invoices or limit the number of results.
Limit Maximum number of invoices to return if not returning all. Value between 1 and 100.
Filters Collection of filters to narrow down the invoices retrieved:
  Start Date Filter invoices created on or after this date.
  End Date Filter invoices created on or before this date.
  Status Filter invoices by their status. Options: Draft, Open, Closed, Void.
  Client Name or ID Filter invoices by client. Can select from a list of contacts or specify an ID via expression.
  Order By Field to sort the results by. Options: Date, ID, Number. Default is Date.
  Order Direction Sort direction. Options: Ascending, Descending. Default is Descending.

Output

The output is an array of JSON objects, each representing an invoice retrieved from Alegra. Each invoice object contains fields as returned by the Alegra API, including but not limited to invoice ID, date, due date, client information, status, items, totals, and any additional metadata.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to the Alegra API using an API key credential configured in n8n.
  • The node uses the Alegra API base URL defined in the credential's environment setting.
  • The node depends on network connectivity to the Alegra service endpoint.

Troubleshooting

  • Common Issues:

    • Authentication errors if the API key credential is missing, invalid, or expired.
    • Network errors if the Alegra API endpoint is unreachable.
    • Invalid filter values may cause the API to reject the request.
    • Exceeding rate limits imposed by Alegra API could result in temporary failures.
  • Error Messages:

    • Errors from the API are surfaced as node operation errors with messages from Alegra.
    • If the node is set to continue on fail, errors will be included in the output JSON under an error field.
  • Resolutions:

    • Verify that the API key credential is correctly configured and has necessary permissions.
    • Check network connectivity and Alegra service status.
    • Validate filter inputs, especially date formats and client IDs.
    • Respect API rate limits by limiting request frequency or enabling pagination.

Links and References

Discussion