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, an accounting and invoicing platform, to manage various resources such as contacts, invoices, items, payments, estimates, taxes, and bank accounts. Specifically, for the Contact - Get operation, it retrieves detailed information about a single contact (which can be a client or provider) by its unique ID.

Common scenarios where this node is beneficial include:

  • Fetching contact details to use in subsequent workflow steps, such as generating invoices or sending notifications.
  • Synchronizing contact data from Alegra into other systems.
  • Validating if a contact exists before performing operations like updates or deletions.

Practical example:

  • A workflow that triggers when a new order is received, uses this node to get the customer's contact details from Alegra by their Contact ID, and then sends a personalized email including their billing address.

Properties

Name Meaning
Contact ID The unique identifier of the contact to retrieve. This is required and must be provided as a string.

Output

The output of the Get Contact operation is a JSON object representing the contact's full details as returned by the Alegra API. This typically includes fields such as:

  • id: Contact's unique identifier.
  • name: Contact's name.
  • type: Type of contact (e.g., client or provider).
  • identification: Identification details including type and number.
  • address: Address information if available.
  • Other custom or additional fields associated with the contact.

The node outputs this data under the json property of the item. There is no binary data output for this operation.

Dependencies

  • Requires an active connection to the Alegra API via an API key credential configured in n8n.
  • The node expects the Alegra API base URL and authentication credentials to be set up properly.
  • Network access to Alegra's API endpoints is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing Contact ID will cause the API call to fail.
    • Incorrect or expired API credentials will result in authentication errors.
    • Network connectivity problems may prevent reaching the Alegra API.
  • Error messages:

    • "Unknown error occurred": Generic catch-all error; check network and API credentials.
    • Errors related to "contact not found" indicate the provided Contact ID does not exist.
  • Resolutions:

    • Verify the Contact ID is correct and exists in Alegra.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Check internet connectivity and firewall settings.

Links and References

Discussion