Alegra (Unofficial - BETA) icon

Alegra (Unofficial - BETA)

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

Overview

This node integrates with the Alegra API to manage invoices, among other resources. Specifically, the Invoice - Get operation retrieves detailed information about a single invoice by its ID. This is useful in scenarios where you need to fetch invoice data for reporting, auditing, or further processing within an automation workflow.

For example, you might use this node to:

  • Retrieve an invoice's details after it has been created elsewhere.
  • Fetch invoice data to send it via email or generate a PDF.
  • Use invoice information to update another system or trigger conditional logic based on invoice status.

Properties

Name Meaning
Invoice ID The unique identifier of the invoice to retrieve. This is a required string input.

Output

The output JSON contains the full invoice object as returned by the Alegra API for the specified invoice ID. This typically includes fields such as:

  • Invoice date and due date
  • Client information (ID and details)
  • Payment form and method
  • Items included in the invoice (with quantity, price, description, taxes, discounts)
  • Currency code
  • Optional fields like seller, observations, annotations, terms and conditions, number template, cost center, exchange rate, type, and retentions

The node does not output binary data for this operation.

Dependencies

  • Requires an active connection to the Alegra API using an API key credential configured in n8n.
  • The node uses the base URL from the credential environment setting to make authenticated HTTP requests.
  • No additional external dependencies are needed beyond the Alegra API access.

Troubleshooting

  • Common issues:

    • Invalid or missing Invoice ID will cause the API call to fail.
    • Network connectivity problems or incorrect API credentials will result in authentication errors.
    • If the invoice ID does not exist, the API will return a "not found" error.
  • Error messages:

    • "Unknown error occurred": Generic catch-all; check network and credential configuration.
    • API-specific errors will be passed through, e.g., "Invoice not found" if the ID is invalid.
  • Resolution tips:

    • Ensure the Invoice ID is correct and exists in Alegra.
    • Verify that the API key credential is valid and has necessary permissions.
    • Check network connectivity and endpoint URL correctness.

Links and References

Discussion