Overview
The node named "EAVFW" is designed to interact with the EAVFW environment, specifically allowing users to upsert records in a specified table. The "Upsert Record" operation enables users to either update an existing record if it matches certain search criteria or create a new record if no match is found. This functionality is useful in scenarios where data synchronization or conditional updates are required, such as integrating external data sources, maintaining user profiles, or managing inventory records.
Practical examples include:
- Updating customer information if the customer already exists based on a unique identifier, or creating a new customer record otherwise.
- Synchronizing product details from an external system by searching for existing products and updating them or adding new entries.
- Managing event registrations by checking if a participant's record exists and updating their status or creating a new registration.
Properties
| Name | Meaning |
|---|---|
| Table | The target table in which the record will be created or updated. Users select from available tables dynamically loaded via the node's options method. |
| Search Builder | Method to define how to search for existing records. Options: - Field Builder: Define search criteria by specifying fields and values. - OData: Use an OData filter string to specify search conditions. |
| Search Criteria | (Shown when Search Builder is "Field Builder") A collection of field-value pairs used to find existing records. Multiple criteria can be defined to refine the search. |
| OData Filter | (Shown when Search Builder is "OData") A string representing an OData filter expression to locate existing records. |
| Input Type | Method to input the data for the record to be upserted. Options: - Field Builder: Specify fields and their values individually. - JSON: Provide a raw JSON payload matching the logical field names. |
| Fields | (Shown when Input Type is "Field Builder") A collection of fields and their corresponding values to set on the record. |
| JSON Payload | (Shown when Input Type is "JSON") A JSON object representing the entire record data to send. Field names should correspond to the logical names defined in the manifest for the selected table. |
Output
The node outputs the result of the upsert operation in the json output field. This typically includes the record data after creation or update, reflecting the current state in the EAVFW environment. The structure corresponds to the fields of the table involved, including any system-generated identifiers or metadata returned by the API.
If binary data were involved, it would represent attachments or files related to the record, but this node focuses on JSON data representing database records.
Dependencies
- Requires an OAuth2 API credential configured in n8n to authenticate with the EAVFW environment.
- Depends on dynamic loading methods (
getTables,getFields) to populate selectable options for tables and fields. - Uses OData filtering capabilities if the OData search builder option is chosen.
Troubleshooting
Common Issues:
- Incorrect or missing authentication credentials will prevent access to the EAVFW environment.
- Invalid table or field names may cause errors; ensure selections are made from dynamically loaded options.
- Malformed OData filters can lead to query failures; verify filter syntax carefully.
- When using JSON input, mismatched field names or invalid JSON structure can cause the request to fail.
Error Messages:
- Authentication errors typically indicate issues with the OAuth2 token or permissions.
- Validation errors may point to missing required fields or incorrect data types.
- API errors might return messages about non-existent tables or fields, indicating configuration issues.
To resolve these, verify credentials, use the provided dynamic selectors for tables and fields, validate OData filters with external tools if needed, and ensure JSON payloads conform to expected schemas.
Links and References
- OData Filter Syntax Reference
- EAVFW Environment Documentation (Replace with actual URL if available)
- n8n OAuth2 Credential Setup Guide