EspoCRM icon

EspoCRM

Interact with EspoCRM API

Overview

This node integrates with the EspoCRM API to manage various CRM resources, including custom entities. Specifically, for the Custom Entity - Create operation, it allows users to create new records of any custom entity type defined in their EspoCRM instance. This is useful when you want to programmatically add new data entries such as Opportunities, Cases, Products, or any other custom-defined entity without manual input.

Typical use cases include:

  • Automating the creation of new leads or opportunities from external sources.
  • Adding support tickets or cases automatically when triggered by external events.
  • Creating product records or inventory items based on data from other systems.

For example, you could use this node to create a new "Opportunity" record by specifying the entity type as "Opportunity" and providing the relevant data fields in JSON format.

Properties

Name Meaning
Entity Type Name or ID The type of custom entity to interact with (e.g., Opportunity, Case, Product). Choose from a list or specify an ID using an expression.
Data JSON object containing the data fields and values for the new record to be created in the specified entity.

Output

The output is a JSON array where each element corresponds to the result of creating a record. Each element contains the newly created record's data as returned by the EspoCRM API. This typically includes the record's unique ID and all fields that were set or defaulted by the system.

If multiple input items are processed, the output will contain multiple JSON objects, one per created record.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to an EspoCRM instance via its REST API.
  • Requires an API authentication credential configured in n8n to authorize requests to EspoCRM.
  • The node dynamically loads available entity types from EspoCRM metadata to populate options.
  • The node uses internal helper functions to make HTTP requests to the EspoCRM API endpoints.

Troubleshooting

  • Error loading entity types: If the node cannot load entity types, ensure the API credentials are correct and the EspoCRM instance is reachable.
  • Invalid entity type: Selecting or specifying an invalid entity type will cause the API request to fail. Verify the entity type exists in your EspoCRM.
  • Malformed JSON data: The "Data" property must be valid JSON representing the record fields. Invalid JSON or missing required fields may cause errors.
  • API errors: Errors returned by EspoCRM (e.g., permission denied, validation errors) will be surfaced. Check the error message for details and verify user permissions and data correctness.
  • Continue on Fail: If enabled, the node will continue processing subsequent items even if some fail, returning error messages inline.

Links and References

Discussion