Actions37
- Contact Actions
- Invoice Actions
- Item Actions
- Payment Actions
- Estimate Actions
- Tax Actions
- Bank Account Actions
Overview
This node integrates with the Alegra API to manage contacts, specifically clients and providers. The "Get Many" operation under the "Contact" resource allows users to retrieve multiple contact records from Alegra, optionally filtered and sorted according to various criteria.
Typical use cases include:
- Fetching a list of all clients or providers for reporting or synchronization purposes.
- Retrieving a subset of contacts based on filters like name, identification number, email, or type.
- Ordering contacts by name, ID, or identification in ascending or descending order.
- Limiting the number of returned contacts to optimize performance or meet pagination requirements.
For example, a user might want to get all client contacts whose names contain "Smith", ordered by their identification number in descending order, returning only the first 50 results.
Properties
| Name | Meaning |
|---|---|
| Return All | Whether to return all matching contacts or limit the number of results. |
| Limit | Maximum number of contacts to return (only used if "Return All" is false). Range: 1 to 100. |
| Filters | Collection of optional filters and sorting options: |
| - Name | Filter contacts by their name (string match). |
| - Identification | Filter contacts by their identification number. |
| - Type | Filter by contact type; options are: All (no filter), Client, Provider. |
| Filter contacts by email address. | |
| - Order By | Field to order results by; options: Name, ID, Identification. |
| - Order Direction | Direction to order results; options: Ascending, Descending. |
Output
The output is an array of JSON objects, each representing a contact retrieved from Alegra. Each object contains the full contact data as returned by the Alegra API, including fields such as name, identification, type, email, and other contact details.
No binary data is output by this node.
Example output snippet (simplified):
[
{
"json": {
"id": 123,
"name": "John Smith",
"type": "client",
"identification": "987654321",
"email": "john.smith@example.com",
...
}
},
{
"json": {
"id": 124,
"name": "Acme Corp",
"type": "provider",
"identification": "123456789",
"email": "contact@acmecorp.com",
...
}
}
]
Dependencies
- Requires an API key credential for authenticating with the Alegra API.
- The node uses the Alegra API base URL configured via the credential's environment setting.
- No additional external dependencies beyond the Alegra API and n8n core modules.
Troubleshooting
- Authentication errors: Ensure the API key credential is correctly configured and has sufficient permissions.
- Rate limiting or API errors: The Alegra API may impose rate limits; handle errors gracefully or implement retries.
- Invalid filter values: Using unsupported filter values may result in empty responses or errors.
- Limit out of range: The "Limit" property must be between 1 and 100; values outside this range may cause errors.
- Network issues: Connectivity problems can cause request failures; verify network access to Alegra API endpoints.
Common error messages:
"Unauthorized": Check API key validity."Unknown error occurred": Generic catch-all; check network and API status."NodeOperationError": Indicates an issue during execution; review input parameters and API response.
Links and References
- Alegra API Documentation: https://developer.alegra.com/
- n8n Documentation on Creating Nodes: https://docs.n8n.io/integrations/creating-nodes/
- n8n Community Forum: https://community.n8n.io/