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 estimates (quotes). Specifically, the "Get Many" operation under the "Estimate" resource retrieves multiple estimate records from Alegra. It supports filtering by date range, status, client, and ordering options, as well as limiting the number of results or returning all available data.

Common scenarios for this node include:

  • Fetching a list of all estimates within a specific period for reporting or analysis.
  • Retrieving open or accepted estimates to follow up on pending sales opportunities.
  • Filtering estimates by client to review quotes sent to a particular customer.
  • Sorting estimates by date or ID in ascending or descending order for display or processing.

Practical example:

  • A user wants to get all accepted estimates created last month for a specific client to generate a summary report.
  • Another use case is fetching the latest 30 estimates sorted by date descending to show recent quotes in a dashboard.

Properties

Name Meaning
Return All Whether to return all matching estimates or only up to a specified limit.
Limit Maximum number of estimates to return when "Return All" is false. Value must be between 1 and 100.
Filters Collection of filters to narrow down the estimates returned:
- Start Date Only return estimates created on or after this date.
- End Date Only return estimates created on or before this date.
- Status Filter estimates by their status. Options are: All (no filter), Open, Accepted, Rejected, Invoiced.
- Client Name or ID Filter estimates by client. User can select from a loaded list of contacts or specify an ID via expression.
- Order By Field to order the results by. Options: Date, ID.
- Order Direction Direction to order the results. Options: Ascending, Descending.

Output

The output is an array of JSON objects, each representing an estimate retrieved from Alegra. Each object contains the full data structure of an estimate as returned by the Alegra API, including fields such as date, due date, client info, items, status, currency, and any additional metadata.

No binary data is output by this operation.

Example output JSON snippet (simplified):

{
  "id": 123,
  "date": "2024-05-01",
  "dueDate": "2024-05-15",
  "client": {
    "id": 456,
    "name": "Client Name"
  },
  "items": [
    {
      "id": 789,
      "price": 100,
      "quantity": 2,
      "description": "Product description"
    }
  ],
  "status": "open",
  "currency": {
    "code": "COP"
  },
  "observations": "Some notes",
  "termsConditions": "Terms text"
}

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 and authentication token from the configured credentials.
  • The "Client Name or ID" filter loads contact options dynamically from Alegra contacts endpoint.

Troubleshooting

  • API Authentication Errors: If the node fails with authentication errors, verify that the API key credential is correctly set up and has sufficient permissions.
  • Rate Limits or Timeouts: Large requests with "Return All" enabled may hit API rate limits or time out. Use the "Limit" property to restrict result size if needed.
  • Invalid Filter Values: Ensure date filters are valid ISO date strings and client IDs exist in Alegra.
  • Empty Results: If no estimates are returned, check filter criteria and confirm that matching data exists in Alegra.
  • Unknown Errors: The node wraps unknown errors into generic messages; reviewing the raw API response or enabling debug logging may help diagnose issues.

Links and References

Discussion