Camunda 8.7 SaaS File Upload using REST Connector

I’ve created a REST Connector Task that should send a file according to the documentation in base64 in the body in a JSON format.

The body in my REST Connector:

{
“someData”: “something”,
“fileName”: documents[1].metadata.fileName
“base64”: documents[1]
}

Instead of converting the “documents[1]” to base64 - documents is a variable coming out of a file picker in Camunda 8 Form - Camunda connector is sending just the JSON pointing to the file.

Camunda 8 Rest Connector documentation does not seem to be right.

@mbarni , The Camunda 8 REST Connector does not automatically convert documents[1] (from File Picker or Webhook) to a base64-encoded string in the request body—even though the documentation implies it might.

Instead, documents[1] is just a reference object, containing the document ID and metadata, not the file content.

:mag: Why This Happens

When you use a File Picker in Camunda 8 or upload a file via Webhook:

  • Camunda stores the file in its Document Store.
  • The documents[1] variable looks like this:
{
  "id": "01HT...",
  "metadata": {
    "fileName": "test.pdf",
    ...
  }
}

This object does not include the binary content or a base64 string.

:white_check_mark: How to Actually Send the File Content via REST Connector

To send the file content in base64 as part of the JSON body, you must do the following manually:

Use a Webhook/Integration Layer (Recommended for SaaS)

If you’re using Camunda SaaS and can’t write custom workers, create a lightweight middleware:

  1. Your REST Connector sends the document.id.
  2. The middleware fetches and base64-encodes the file.
  3. It sends the final request to the destination system.

You can implement this in a serverless function (e.g., AWS Lambda, Google Cloud Function) or Express/Flask service.

Documentation does not “implies” anything. It states it.
So the documentation is wrong?!

When I use a local Camunda 8.7 Run, I am able to test this but then the Document Store is “in memory”, so reading the file gives me incident.

Thanks for the reply.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.