Vtiger API icon

Vtiger API

Vtiger CRM (Open Source) Node

Overview

This node integrates with the Vtiger CRM API, enabling users to perform various operations on Vtiger entities. Specifically, the Create Document operation allows uploading a document file into Vtiger CRM, associating it with metadata such as title, type, and assigned user.

Typical use cases include:

  • Automatically uploading generated reports or invoices as documents into Vtiger.
  • Archiving email attachments or scanned files directly into the CRM.
  • Assigning documents to specific users for collaboration or review within Vtiger.

For example, after generating a PDF report in a workflow, this node can upload that file as a new document record in Vtiger, setting its title and type, and assigning it to a responsible user.

Properties

Name Meaning
Document Title The title of the document to be created in Vtiger.
Document Type The type of the document; options are Internal or External.
File Key The key referencing the binary file data to upload (from previous nodes).
Filename The filename as it will appear in Vtiger CRM.
Mime Type The MIME type of the file (e.g., application/pdf, image/png).
Assigned User ID The ID of the user in Vtiger to whom the document will be assigned (format like 19x5).

Output

The node outputs a JSON array containing the response from the Vtiger API after attempting to create the document. This response typically includes success status and details about the newly created document record.

If the operation is successful, the output JSON contains information about the created document entity in Vtiger.

The node also supports uploading binary data by reading the file content from the specified binary property (File Key) and sending it as multipart form data to the Vtiger API.

Dependencies

  • Requires an active connection to a Vtiger CRM instance via an API authentication credential (API key and username).
  • The node uses HTTP requests to communicate with the Vtiger webservice endpoint.
  • The binary file to upload must be available in the workflow's binary data under the specified File Key.
  • No additional external libraries beyond those bundled with n8n are required.

Troubleshooting

  • Authentication errors: If the node fails at the login challenge step, verify that the API credentials (username and access key) are correct and have sufficient permissions.
  • File not found: Ensure the binary data referenced by File Key exists and contains valid file content.
  • Invalid MIME type or filename: Confirm that the MIME type matches the actual file content and the filename is properly formatted.
  • API errors: The node throws errors if the Vtiger API returns failure responses, including error messages and codes. Check the message for clues (e.g., permission denied, invalid parameters).
  • Multipart form data issues: Some environments may require special handling of multipart headers; ensure the environment supports FormData and Blob objects as used here.

Links and References

Discussion