Dokka icon

Dokka

Interact with Dokka API

Overview

This node allows users to upload documents to the Dokka platform via its public API. It is designed for scenarios where companies need to programmatically submit various types of business documents such as purchase orders, delivery notes, warehouse entries, and invoices. The node supports attaching metadata, specifying document categories, tagging, and controlling confidentiality and duplication behavior.

Practical examples include:

  • Automatically uploading scanned invoices or delivery notes from an accounting system.
  • Submitting purchase orders with associated metadata and approval workflows.
  • Archiving warehouse entry documents with tags and notes for later retrieval.

Properties

Name Meaning
Company ID The unique identifier of the company in Dokka to which the document belongs (required).
Creator The name or identifier of the person who created the document.
Approvals Comma-separated list of usernames who must approve the document (e.g., "username1, username2").
Metadata Additional parameters related to the document such as PO ID, dates, line items, vendor ID, etc.
Document Type Type of the document being uploaded. Options: Po, Delivery Note, Warehouse Entry, Invoice, 10, 11, 12, 20. Default is "invoice".
Reference Id External document identifier like PO ID, delivery note ID, invoice number, etc.
Tags JSON array of tags associated with the document.
Ignore Duplicate Numeric flag (0 or 1) indicating whether to ignore duplicate files. Default is 1 (ignore).
Is Confidential Numeric flag (0 or 1) indicating if the document is classified/confidential. Default is 0.
Source Origin of the document. Options: Default, Scanner. Default is "default".
Notes Text for sticky notes or comments attached to the document.
Category Document category. Options: Inbox, Working, Done, Archive. Default is "inbox".
File The file to upload. This is a required property and expects a binary file path input.

Output

The node outputs JSON data representing the response from the Dokka API after uploading the document. This typically includes confirmation details about the uploaded document such as its ID, status, and any metadata returned by the API.

If the node handles binary data, it uses the file property to accept the file content for upload, but the output itself is JSON describing the result of the upload operation.

Dependencies

  • Requires an API key credential for authenticating with the Dokka API.
  • Needs the base URL of the Dokka API configured in the credentials.
  • Uses the n8n-openapi-node package internally to build request properties from the OpenAPI specification.

Troubleshooting

  • Missing Required Fields: Ensure that the "Company ID" and "File" properties are provided; these are mandatory.
  • Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Duplicate File Handling: If uploads fail due to duplicates, check the "Ignore Duplicate" flag; setting it to 1 will skip duplicates.
  • Invalid Document Type: Use one of the predefined document types; invalid values may cause API errors.
  • File Upload Issues: Confirm that the file path provided is correct and accessible by n8n.

Common error messages might include authentication failures, validation errors on document metadata, or file upload errors. Reviewing the API response in the node output can help diagnose these issues.

Links and References

  • Dokka API Documentation (general reference for document upload endpoints)
  • n8n Documentation on Binary Data Handling
  • n8n-openapi-node GitHub repository for understanding OpenAPI integration in nodes

Discussion