EspoCRM icon

EspoCRM

Interact with EspoCRM API

Overview

This node integrates with the EspoCRM API to perform various operations on CRM entities dynamically. Specifically, for the "Dynamic" resource and the "Delete" operation, it allows users to delete a record of any entity type by specifying the entity type and the record ID. This is useful in scenarios where you want to programmatically remove records from EspoCRM without hardcoding entity types, enabling flexible automation workflows.

Practical example:

  • Automatically deleting outdated or invalid customer records based on certain criteria.
  • Cleaning up test data after automated testing runs.

Properties

Name Meaning
Entity Type Name or ID The type of entity to interact with (e.g., Account, Contact, Opportunity). Choose from a list or specify an ID using an expression.
Record ID The unique identifier of the record to delete within the specified entity type.

Output

The output JSON contains an object confirming the deletion with the following structure:

{
  "success": true,
  "id": "<record ID>",
  "entityType": "<entity type>"
}
  • success: Indicates whether the deletion was successful (true).
  • id: The ID of the deleted record.
  • entityType: The entity type from which the record was deleted.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to an EspoCRM instance via an API key credential configured in n8n.
  • The node uses internal helper functions to make HTTP requests to the EspoCRM REST API.
  • The user must have appropriate permissions in EspoCRM to delete records of the specified entity type.

Troubleshooting

  • Common issues:

    • Invalid or missing record ID: The node will fail if the provided record ID does not exist or is empty.
    • Insufficient permissions: Deletion may fail if the API user lacks rights to delete the specified entity.
    • Incorrect entity type: Specifying an invalid or unsupported entity type will cause errors.
  • Error messages:

    • "The operation "delete" is not supported for resource type "dynamic": This indicates a misconfiguration; ensure the resource is set to "dynamic" and operation to "delete".
    • API errors returned from EspoCRM (e.g., 404 Not Found) typically mean the record ID does not exist.
  • Resolution tips:

    • Verify the entity type and record ID are correct and exist in EspoCRM.
    • Check API credentials and permissions.
    • Use expressions carefully to ensure dynamic values resolve correctly.

Links and References

Discussion