Skip to content

Pass Files to Integration Workflows

File Upload and Image Upload fields can pass the current file's content, filename and content type to an Integration Workflow. Content is sent as a base64 String, with metadata mapped separately. The form uses the current local selection when available. If only a saved document remains, including after refreshing the form, it retrieves the document before calling the workflow. The workflow receives the same content and metadata in either case.

Configure the Integration Workflow inputs

  1. Open Integrations, select Integration Workflows, and create or edit the workflow.
  2. Under Input Parameters, add a String parameter for the file content and select Caller Input as its value source.
  3. Enable Base64 file content for that parameter.
  4. Set Maximum file bytes to match the maximum file size allowed by the form's upload field. The value is the original file size in bytes, before base64 encoding. If left blank, the default is 5 MB (5,242,880 bytes).
  5. Add separate String parameters with Caller Input for the filename and content type. Leave Base64 file content disabled for metadata parameters.
  6. Save the workflow and publish it using the normal publishing process when it is ready for use.

For example:

Input parameter Type Base64 file content
File Content String Enabled
File Name String Disabled
Content Type String Disabled

Configure the event

  1. Open the form and select the field or other event surface that will call the workflow. For example, select a button to let the user send a document explicitly.
  2. Add an Integrate action to the required event. File mappings are available on any form event that supports calling an Integration Workflow, including a button click. For an event on the upload field, choose the upload pipeline that fits your process:

    Pipeline Use when
    Before Document Upload The workflow needs the selected file's content or metadata before the document is saved. No saved document ID is needed to access these values.
    After Document Upload The workflow should run only after the document has uploaded successfully.
  3. Select the Integration Workflow.

  4. Select the File Upload or Image Upload field as the source for each mapping, then choose the corresponding value:

    Workflow input Upload field value
    File Content File Content (Base64)
    File Name File Name
    Content Type Content Type
  5. Keep these mappings as String, then save the event and form. Publish the form when it is ready for use.

The content and metadata come from the same file. A newly selected local replacement takes precedence over the older saved document. Content type is supplied where available.

For a button-driven process, turn off Auto Upload. The user can select a file and call the workflow without uploading it first; the upload action can also be disabled where appropriate. A local selection lasts only for the current form session. After refresh, the file must either have been uploaded or be selected again.

For fields in a repeating/grouping section, the event must identify the current row. A button in that row can use its upload field. A root-level event cannot guess which repeating row's file to send. A row event can select a root-level upload field explicitly.

When local content is unavailable, the form retrieves the saved document using its existing document access. This adds a download before the workflow call. If the file is missing, access is denied, or retrieval fails, the workflow is not called with incomplete content. If a new local selection cannot be read, the form reports the error rather than sending the older saved file.

File Content (Base64) supplies the encoded file content without a data URL prefix. Doc Body (Data URL) remains available for existing integrations that expect a value beginning with data:. Existing Doc Body mappings retain their behavior; choose the value expected by the receiving workflow.

Map file content within the workflow

Use the file-content input as a source in an Integrate action's request mapping, and map the filename and content type separately to the required request fields. Map file content directly, without text transformations. Metadata can use ordinary String mappings and transformations.

File content is carried in a JSON request body. For an action that sends file content, configure a REST POST with a JSON body. The receiving service determines the property names and where metadata belongs. This can be used with JSON-based Power Automate and Azure Function App requests.

For a JSON input containing a file object or an array of files:

  1. Supply a Sample Request Body that includes a String property for each file's base64 content and separate metadata properties.
  2. Expand Base64 file fields and select only the content properties. For an array, the selection applies to that property on each item.
  3. Use the request tree to map the content and metadata to the action's request fields. For a file collection, use the array context to map each item's values.
  4. In the action's request configuration, select the corresponding outbound content properties under Base64 file fields and save the action.

Base64 content remains a String in the request tree. Pasting a sample alone does not identify a String as file content; select its base64 setting explicitly. Filename and content type remain ordinary Strings. When changing a sample, update any affected content selections and request mappings before saving.

The form upload mapping above supplies separate String inputs for the current upload. A JSON file collection describes a workflow input structure; it does not automatically gather files from multiple upload fields.

Size limits and saved configuration

Align Maximum file bytes with the upload field's file-size validation. A workflow limit must accommodate the field's allowed maximum; incompatible limits prevent the new content mapping from being saved. Base64 increases the size of the transmitted request, so the receiving service's request limit must also accommodate the encoded content and metadata.

The same file-size bounds apply to local and retrieved documents. Saved base64 selections and metadata mappings remain available when the configuration is reopened. Events that send explicit base64 content execute the workflow for each invocation rather than reusing a cached integration response.