Actions4
- Generic Table Actions
Overview
This node allows interaction with Perfex CRM's generic tables via the Won API module. Specifically, for the "Create Record" operation on a generic table, it enables users to add new records to any specified table within Perfex CRM by providing the table name and the data as a JSON object.
Common scenarios include:
- Adding new clients, invoices, or staff entries dynamically from workflows.
- Automating record creation based on external triggers or data sources.
- Integrating Perfex CRM with other systems where new data needs to be pushed into CRM tables.
For example, you could create a new client record by specifying the "clients" table and providing client details such as company name and phone number in JSON format.
Properties
| Name | Meaning |
|---|---|
| Table Name | The name of the target table in Perfex CRM (e.g., clients, invoices, staff). Do not include the tbl prefix. |
| Data (JSON) | A JSON object containing the fields and values for the new record to be created in the specified table. Example: json { "company": "New Client Inc.", "phonenumber": "1234567890" } |
Output
The node outputs an array of JSON objects representing the response from the Perfex CRM API after creating the record(s). Each object corresponds to a created record and typically contains the newly created record's data including its ID and any other fields returned by the API.
If the API supports binary data output, it is not indicated here; this node primarily deals with JSON data.
Dependencies
- Requires an active connection to a Perfex CRM instance via the Won API.
- Needs credentials that provide the base URL of the Perfex CRM instance and a valid API token for authentication.
- The node uses HTTP requests to interact with the Perfex CRM API endpoints.
Troubleshooting
- Missing or incorrect Table Name: Ensure the table name is correct and does not include the
tblprefix. An invalid table name will cause API errors. - Invalid JSON in Data property: The JSON must be well-formed and match the expected schema of the target table. Malformed JSON or missing required fields can cause the API to reject the request.
- Authentication errors: Verify that the API token and URL credentials are correctly configured and have sufficient permissions.
- API endpoint errors: If the API returns errors, check the network connectivity and the correctness of the API URL.
- NodeOperationError for missing Record ID: This error does not apply to the Create operation but may appear if mistakenly used with update or delete operations without specifying a record ID.
Links and References
- Perfex CRM Official Website
- Perfex CRM API Documentation (if publicly available)
- n8n Documentation on Creating Custom Nodes