Overview
This node integrates with the Vtiger CRM (Open Source) system, allowing users to perform various operations such as querying data, creating or updating records, managing sessions, and more. Specifically, the Query operation enables users to run custom queries against the Vtiger CRM database using its query language.
Common scenarios for this node include:
- Retrieving specific records or datasets from Vtiger CRM based on complex criteria.
- Automating data extraction workflows by running saved or dynamic queries.
- Integrating Vtiger CRM data into other systems or reports by fetching it programmatically.
For example, a user might use the Query operation to fetch all contacts created in the last month or to retrieve opportunities with a certain status.
Properties
Name | Meaning |
---|---|
Session Name | The session identifier string obtained through a prior Login operation; required to authenticate requests except during login. |
Query | The Vtiger CRM query string to execute; must be a valid query according to Vtiger's query syntax. |
Output
The output is a JSON array containing the response from the Vtiger CRM API for the executed query. This typically includes:
- A
success
boolean indicating if the query was successful. - A
result
field containing the queried data records matching the query. - Potentially error information if the query failed.
No binary data output is produced by this operation.
Example output structure (simplified):
[
{
"success": true,
"result": [
{
"id": "12x345",
"firstname": "John",
"lastname": "Doe",
...
},
...
]
}
]
Dependencies
- Requires an active connection to a Vtiger CRM instance via an API host URL.
- Needs an API authentication token (API key credential) configured in n8n credentials.
- Uses HTTP requests to communicate with the Vtiger webservice endpoint (
/webservice.php
). - The node depends on the
crypto-js
library internally for hashing during login but this is abstracted away from the user.
Troubleshooting
- Invalid Session Name: If the session name is missing, expired, or invalid, API calls will fail. Ensure you have performed a successful Login operation first and are passing the correct session name.
- Query Syntax Errors: Malformed or invalid queries will cause errors. Verify your query string matches Vtiger's expected query language.
- Authentication Failures: Incorrect API credentials or access keys will prevent login and subsequent operations.
- Network Issues: Connectivity problems to the Vtiger host URL will cause request failures.
- Error Messages: The node throws errors with messages returned from the Vtiger API, often including error codes. Use these messages to diagnose issues like permission problems or invalid parameters.