Actions25
Overview
The EspoCRM node allows users to interact with the EspoCRM API to manage CRM data. Specifically, for the Lead resource and the Get Many operation, this node fetches multiple lead records from the EspoCRM system based on various filtering, sorting, and pagination options.
This operation is useful when you want to retrieve a list of leads for reporting, analysis, or further processing in an automation workflow. For example, you might use it to:
- Fetch all leads created within a certain date range.
- Retrieve a limited number of leads sorted by creation date.
- Apply complex filters to get only leads assigned to a specific user or matching certain criteria.
Properties
| Name | Meaning |
|---|---|
| Return All | Whether to return all matching lead records or limit the results to a specified maximum number. |
| Limit | The maximum number of lead records to return if "Return All" is set to false. Must be at least 1. |
| Filter Options | A collection of optional parameters to refine the query: |
| - Boolean Filter List | Comma-separated predefined boolean filters such as onlyMy (leads assigned to the current user) or followed (leads followed by the user). |
| - Offset | Number of results to skip, useful for pagination. |
| - Order By | Field name to sort the results by (e.g., createdAt). |
| - Order Direction | Sort direction: Ascending (asc) or Descending (desc). |
| - Primary Filter | Context-specific base filter to apply (EspoCRM-specific). |
| - Select Fields | Comma-separated list of fields to include in the response (e.g., id,name,emailAddress). |
| - Skip Total Count | Whether to skip calculating the total count of matching records to improve performance on large datasets. |
| - Where (Filter Conditions) | JSON array defining advanced filter conditions according to EspoCRM API syntax. |
Output
The output is a JSON array where each element represents a lead record retrieved from EspoCRM. Each record contains fields as requested via the "Select Fields" property or defaults to all fields if none are specified.
If binary data were involved (not applicable here), it would be summarized accordingly, but this operation returns only JSON data representing lead entities.
Dependencies
- Requires an active connection to an EspoCRM instance via an API key or authentication token configured in n8n credentials.
- The node uses the EspoCRM REST API endpoints to perform queries.
- No additional external services are required beyond the EspoCRM API.
Troubleshooting
Common Issues:
- Incorrect or missing API credentials will cause authentication failures.
- Using invalid field names in "Select Fields" or "Order By" may result in API errors.
- Complex or malformed JSON in the "Where" filter can cause query failures.
- Requesting too many records without enabling pagination or limits may lead to timeouts or performance issues.
Error Messages:
"The operation "getAll" is not supported for resource type "lead": This indicates a misconfiguration; ensure the resource is set to "Lead" and operation to "Get Many".- API errors related to permissions or invalid filters will be returned from EspoCRM and surfaced by the node.
Resolutions:
- Verify API credentials and permissions.
- Double-check field names and filter syntax against EspoCRM API documentation.
- Use "Limit" and "Offset" properties to paginate large datasets.
- Enable "Skip Total Count" to improve performance on large queries.
Links and References
- EspoCRM API Documentation
- n8n Expressions Documentation (for dynamic parameter usage)
- EspoCRM Filtering Syntax Reference (available in EspoCRM docs linked above)