Use Docentric CE Tools connector in Power Automate

The Docentric CE Tools connector is a custom Power Automate connector that helps you integrate document generation into your automation workflows. This connector is automatically deployed when you install Docentric CE in your environment and provides two actions that simplify using the Docentric CE document generation functionality from within your Power Automate flows.

Prerequisites

  • Docentric CE installed in your Dataverse environment
  • Access to Power Automate with permissions to create or edit flows
  • A configured Document setup in Docentric CE

Add Docentric CE Tools connector to your flow

The Docentric CE Tools connector is available in the Custom connectors section in Power Automate.

  1. Open your Power Automate flow or create a new one.
  2. Select New step or Add an action.
  3. Select Custom to view custom connectors.
  4. Search for Docentric CE Tools in the connector search box.
  5. Choose one of the available actions: Compose document generation request or Parse document generation response.

"Shows Docentric CE Tools connector in Custom connectors section"

Compose document generation request

Use the Compose document generation request action to prepare a properly composed request for the Docentric CE document generation API.

  1. Add the Compose document generation request action to your flow.
  2. Configure File name: Enter the name for the generated document file without file extension.
  3. Configure Record id: Enter the unique identifier of the Dataverse record for which you want to generate documents.
  4. Configure Template reference code: Enter the Reference code of the Document template you want to use. This code identifies a specific template configured in your Document setup. For more information, see Set up templates.
  5. Configure Output format: Specify the desired output file format for the generated document. You can select PDF or Word.
  6. Configure Language tag: Specify the language tag for document generation (for example, en-US or de-DE). This determines the language used for document content and formatting of values when multiple languages are supported. For more information, see Languages.
TIP

To avoid issues with flows, be mindful that unique identifiers typically match the table name and have "Unique identifier" in description. For example, unique record identifier for a quote record can be found in the field Quote, even though field QuoteID also exists.

"Shows Compose document generation request parameters in Power Automate flow"

The action outputs a JSON object that contains the complete document generation request, ready to be used with the Dataverse Perform an unbound action action.

Use the composed request to generate a document

After composing the document generation request, you pass it to the Dataverse connector to execute the document generation action.

  1. Add a Perform an unbound action action from the Dataverse connector.
  2. Set Action Name to the Docentric CE generate document action name dcpwr_generatedocument.
  3. In Advanced parameters dropdown select Item/Request and pass the Generate document request output from the Compose document generation request action.

Power Automate flow designer showing the Generate Document using Docentric CE action configuration.

Parse document generation response

Use the Parse document generation response action to extract and read the results returned by the Docentric CE document generation API. This action helps you access information about generated documents, such as file name, file URL, and file id.

  1. Add the Parse document generation response action after the Dataverse Perform an unbound action that calls the Docentric CE document generation API.
  2. In Document generation response: Enter the response output from the Docentric CE document generation action.

"Shows parse document generation response parameter in Power Automate flow"

The Parse document generation response action outputs structured data that includes generated document details (file name, file URL, file ID).

Use the parsed response data to retrieve the generated document file

After you parse the response, use the returned temporaryFileId to download the generated document from Dataverse.

To retrieve document file content (for SharePoint or email for example), use Dataverse connector Download a file or an image action.

  1. Add the Dataverse connector Download a file or an image action to your flow.
  2. Configure Table name: Enter "Temporary files".
  3. Configure Row ID: pass the temporaryFileId parameter from Parse document generation response.

For complete file information then use:

  • File name output property of Parse document generation response
  • File or image content output property from Download a file or an image action response

Next steps