Skip to main content
Version: 8.7

Store, track, and manage documents

Offering robust document handling capabilities within Camunda SaaS and Self-Managed, users can efficiently manage large volumes of binary data such as PDFs and images across both development and production environments.

In this guide we will cover three main use cases:

Upload a document to a BPMN process

You can implement document uploads in your BPMN processes using forms, inbound Connectors, and Camunda 8 REST API.

Build a form for document upload

When building a form for a process, you can use the Filepicker form component to allow users to upload files.

In the Filepicker configuration, you can specify whether users can upload a single file or multiple files and define the list of supported file formats.

Form with Filepicker

A designed form can be linked to a user task or used to start a process. Documents uploaded with the form can then be referenced later in the process.

Upload a document from a user task in Tasklist

When the process is deployed and running, users can access and complete user tasks that include a form with the Filepicker component in Tasklist:

document handling in tasklist

Upload a document to start a process

You can configure a form with the Filepicker for a start event of a BPMN process to allow users to upload documents when initiating the process. This is supported in Tasklist and is available to logged-in users.

note

Only logged-in users can upload files. Publicly accessible processes with a start form do not support file upload using the Filepicker.

Get reference to an uploaded document

Uploaded documents can be referenced later in the process.

Filepicker's output variable is an array of objects with document metadata. It always returns an array of objects, either a user uploads a single document or multiple documents.

Single document uploads are accessible using value[1] (since FEEL uses 1-based indexing).

Upload a document via inbound webhook connector

Documents can be added to a process using the inbound HTTP webhook Connector.

You can pass the documents in both the response expression and the result expression, where the documents object contains the references for created documents. Below, review an example of a webhook configuration:

Example payload of inbound webhook connector

In this example, the result expression may look as follows, where applicationDocument can be later used by the process to retrieve documents:

{
applicationDocument: documents[1]
}

The document reference received as an output of one Connector should be stored in process variables by using the result expression or result variable.

To call the webhook sending a file, for example:

curl --location 'https://lpp-1.connectors.dev.ultrawombat.com/e424e404-39d2-4dcf-9937-a1ebde177d7c/inbound/uploadDocument' \
--form 'file=@"/path-to-file/file.pdf"'

The result variable will have the following structure:

{
"request": {
"body": {},
"headers": {
"host": "lpp-1.connectors.camunda.io",
"x-request-id": "335843238a709273200e2055f89147ad",
"x-real-ip": "109.78.172.42",
"x-forwarded-host": "lpp-1.connectors.camunda.io",
"x-forwarded-port": "443",
"x-forwarded-proto": "https",
"x-forwarded-scheme": "https",
"x-scheme": "https",
"content-length": "70484",
"user-agent": "PostmanRuntime/7.43.0",
"accept": "*/*",
"cache-control": "no-cache",
"postman-token": "b9d78973-b33f-43a4-8d55-c5ac8b2de656",
"accept-encoding": "gzip, deflate, br",
"content-type": "multipart/form-data; boundary=--------------------------300742796701946745140414"
},
"params": {}
},
"connectorData": {},
"documents": [
{
"storeId": "gcp",
"documentId": "130ad52a-f90a-4e07-9cfa-0d9abb0b6a68",
"contentHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"metadata": {
"contentType": "application/pdf",
"size": 70266,
"fileName": "file.pdf"
},
"camunda.document.type": "camunda"
}
]
}

Display and download a document

Build a form for document preview and downloading

To display and allow downloading of a document you can use the document preview component in forms.

note

The document preview component offers previews in forms of PDF documents and images as the most common file types. Other document types are supported, but listed without the preview and show the file name with the option to download the file.

In the component's configuration, provide a document reference as an array of document metadata.

document preview for form

Display and download a document from a user task in Tasklist

A document can be displayed in a user task form in Tasklist.

When a user opens the task, they can view and download the document directly from the form.

Document preview for task in Tasklist

Send a document to an external system via a Connector

You can reference a document in an outbound Connector. Connectors can use variables with document metadata as an input. The format of inputs will depend on the Connector, as each Connector has a different input structure.

The Connector SDK provides document support in property/variable bindings.

In most cases for the following outbound Connectors, you can include a Request body under Payload in the properties panel to send with your request:

example REST configuration

Outbound Connectors that support document handling

ConnectorSupport details
Amazon BedrockSupports consuming documents as inputs for conversations. Review the Document field in the properties panel where the document reference can be provided.
Amazon S3Supports uploading documents from (or downloading documents to) the Camunda document store. Review the Document field in the properties panel where the document reference can be provided.
Amazon TextractCan read the input document directly from the Camunda document store. Review the Document field in the properties panel where the document reference can be provided.
BoxSupports uploading documents from (or downloading documents to) the Camunda document store. Review the Document field in the properties panel where the document reference can be provided.
EmailSupports sending Camunda documents as attachments, or storing incoming attachments as Camunda documents. These documents are automatically stored in the Camunda document store and available to map in the result expression.
Google DriveSupports document upload and download.
Microsoft TeamsSupports sending documents to channels.
RESTSupports storing the response as a document.
SendGridProvides attachment support.
SlackSupports adding attachments and increasing template versions.

Automate documents with intelligent document processing

Document handling can be integrated with intelligent document processing (IDP). This allows you to extract specific data from a high volume of documents using an IDP application, and use the extracted data throughout your BPMN process.

Learn more about this in the IDP documentation: