mscrm-addons.com logomscrm-addons.com logo
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
home/Knowledge Base/DocumentsCorePack(DCP)/Step by Step: How to execute an OCA in a Power Automate flow 

Step by Step: How to execute an OCA in a Power Automate flow 

229 views 1 Updated on March 4, 2026

One-Click-Actions (OCAs) in DocumentsCorePack act as predefined configurations that simplify document generation. They are normally used within the DocumentsCorePack Dialog, but they can be used within flows as well.   

When creating a flow, there may be instances where including conditional logic is needed, but more cumbersome to implement.  For example, if you were to create a flow that generates and sends a document to a contact based on their country, you would need to construct that logic in the flow, thus adding complexity. 

By using a One-Click-Action to handle this instead, you can reduce the flow’s complexity and increase its readability. 

Creating the One-Click-Action 

Following the example mentioned above, we would like to create a flow that sends a welcome letter to a contact.  By default, the sent letter should be in English, but if the contact is from Germany, a German version of the letter should be sent instead. 

To create this flow, we’ll first need to create a contact-based One-Click-Action (OCA).  Under Template Settings, we’ll set Template Selection to Predefine Template.  The template we’ll chose will be our English language template. 

Setting our template in our OCA
Figure 1: Setting our template in our OCA

Next, click Open next to Conditional Template Selection.  Set the ❶ Condition Name, ❷ the Template, and ❸ click the Condition button to configure the condition. 

Configuring the conditional template
Figure 2: Configuring the conditional template

In the Choose Conditions window, select a field and set a value to build your condition.  In our case, since we want to check if the contact is from Germany, we’ll select the contact’s Country/Region field and the set the value to Germany.  Once you’ve set the condition, click OK and save your OCA. 

Configuring the condition
Figure 3: Configuring the condition

Tip: In your OCA, you can configure various processing options along with the template, such as setting the document to be saved to SharePoint, saved as a note, or printed.  This can help further reduce your flow’s complexity. Do note, however, that you cannot create or send emails in this way. Creating and sending emails must still be done in the flow, as detailed below.

Creating the flow 

We first need to add the Add a new row action in order to create the email message to be sent later.

Creating an email
Figure 4: Creating an email

To run the OCA in a flow, search for the Run One-Click-Action (sync) action under the DocumentsCorePack Connector and select it. 

Selecting the action
Figure 5: Selecting the action

Then, under One-Click-Action ID, select the OCA you created.  When the flow is run, the action will trigger this OCA. 

Figure 6: Setting our OCA

Next, add the Attach DocumentJob to email action, adding the Document content from the previous action and our email message as parameters to the DocumentJob ID and Email ID fields, respectively.

Attaching our document to our email
Figure 7: Attaching our document to our email

Lastly, add the Send email action to the flow. Provide the email message, sender, and recipient to action. Once you are done, save your flow.

Configuring the Send email action
Figure 8: Configuring the Send email action

Running the flow 

After saving the flow, run it as you see fit.  In our case, we will be triggering our flow from a contact who is from Germany. 

Running our flow
Figure 9: Running our flow

When it finishes, the generated document should be the German version, as dictated from our OCA. 

Our generated result
Figure 10: Our generated result
Tags:Power AutomateOCAone-click-action

Was this helpful?

1 Yes  No
Related Articles
  • Why do document errors and inconsistencies increase as teams scale in Dynamics 365?
  • “Recipients not found” warning when using One-Click-Action
  • What makes a Dynamics 365 add-on easy for partners to recommend in every deal 
  • Enhancing data security for DCP and AE using a virtual network
  • Security issues when installing DocumentsCorePack (Defender)
  • Locating Raw Inputs and Outputs in Power Automate
Latest Articles
  • Why do document errors and inconsistencies increase as teams scale in Dynamics 365?
  • “Recipients not found” warning when using One-Click-Action
  • What makes a Dynamics 365 add-on easy for partners to recommend in every deal 
  • What actually counts toward Dataverse storage costs (and what doesn’t)?
  • Enhancing data security for DCP and AE using a virtual network
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How licenses are counted
  • How to find your environment’s unique name in Microsoft Dynamics 365
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How licenses are counted
Categories
  • *News and General Infos* 71
  • Webinars 47
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 268
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 78
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2025 www.mscrm-addons.com. All Rights Reserved.