Actions25
Overview
This node integrates with the EspoCRM API to manage CRM data entities. Specifically, for the Lead resource with the Delete operation, it deletes a lead record identified by its unique ID from the EspoCRM system.
Common scenarios where this node is useful include:
- Automating cleanup of outdated or invalid leads in your CRM.
- Integrating with other workflows that require removing leads after certain conditions are met (e.g., after conversion or disqualification).
- Synchronizing lead data by deleting records that no longer exist in an external system.
Example: Automatically delete a lead when it has been marked as "Lost" in a sales pipeline, ensuring your CRM only contains active prospects.
Properties
| Name | Meaning |
|---|---|
| Lead ID | The unique identifier of the lead to delete. This is a required string input. |
Output
The output is a JSON array where each item corresponds to the result of the delete operation for each input item processed. For the Delete operation on a Lead, the output JSON object includes:
success: A boolean indicating if the deletion was successful (true).id: The ID of the deleted lead.entityType: The type of entity deleted, which will be"lead"in this context.
Example output JSON:
[
{
"success": true,
"id": "12345",
"entityType": "lead"
}
]
No binary data is output by this node.
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 operations.
- No additional external services are required beyond EspoCRM itself.
Troubleshooting
Common issues:
- Invalid or missing Lead ID: The node requires a valid lead ID; ensure the ID exists in EspoCRM.
- Authentication errors: Verify that the API credentials are correctly set up and have sufficient permissions to delete leads.
- Network or connectivity problems: Ensure the EspoCRM server is reachable from the n8n environment.
Error messages:
"The operation "delete" is not supported for resource type "lead": This would indicate a misconfiguration or unsupported operation; however, the code supports delete for leads, so check the resource and operation parameters.- API errors returned from EspoCRM (e.g., 404 Not Found if the lead does not exist): Confirm the lead ID is correct.
To handle errors gracefully, enable the "Continue On Fail" option in the node settings to allow the workflow to proceed even if some deletions fail.
Links and References
- EspoCRM API Documentation
- n8n Expressions Documentation (useful for dynamic parameter values)