• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/DocumentsCorePack(DCP)/How to work with the new DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)

How to work with the new DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow)

1361 views 3 Updated on July 26, 2022

This step-by-step tutorial outlines how to create a document and attach it to an e-mail using the DocumentsCorePack custom connector for PowerAutomate (Microsoft Flow).

Overview of the Flow

This flow is triggered on the update of a record (Account in our case), it then creates an E-mail using the “Create new Record” step from the common data services connector. Afterwards we are using our DocumentsCorePack custom connector to create an e-mail body from a DCP Template and attach it to the e-mail. Then we create an e-mail attachment and attach it to the same e-mail. The last step finally sends the e-mail.


Figure 1: Overview of the Flow

1. Trigger

When you create a new flow, you have to decide which action will trigger the flow. In our case we have simply added a trigger on the update of the Account.


Figure 2: Trigger

2. Create E-mail

In the second step we create an E-mail Message, you can leave the sender, recipient and regarding empty for now, as our DocumentsCorePack custom connector offers a very easy way to fill them later. You can still already fill the Subject and Description to your liking.


Figure 3: Create E-mail

3. Create E-mail Body

To create the E-mail Body, we are using the DocumentsCorePack custom connector and choose the step “Create Document Job (sync)”. In this step it is mandatory to specify a template which shall be used to create the e-mail body, and an Entity ID with which the Template shall be merged.

Please note: The template needs to be created for the Entity Type specified in the E-mail ID.

To create the E-mail Body we must choose the Filetype “HTML”.


Figure 4: Create E-mail Body

4. Attach E-mail Body

After creating the E-mail Body, we need to attach it to the E-mail. For this we select the Document that was created in the previous Create E-mail Body step, this can be found under “Document (Base 64 Encoded)”. We also take the Filename from the previous step and the E-mail Message from the Create E-mail step.


Figure 5: Attach E-mail Body

Here you can see what the “Document (Base 64 Encoded)” looks like:


Figure 6: Document (Base 64 Encoded)

5. Create Attachment

In this step we want to create an additional attachment that shall be attached to the final e-mail.

Again, we have to choose a Template, an Entity ID and an output FileType. As we want an attachment this time we are choosing “PDF”:


Figure 7: Create Attachment

6. Attach Email Attachment

Again, we have to attach the created document to the email. This time we select the “Document (Base 64 Encoded)” and the Filename from the Create Attachment Step.  Additionally, we also need to fill E-mail ID with the “E-mail Message” from the “Create E-mail “Step.


Figure 8: Attach E-mail Attachment

7. Send E-mail

Now that the E-mail Body and E-mail Attachment are attached to our E-mail, we want to finally send the e-mail. For the “E-mail To Send” we choose the “E-mail Message” from the Create E-mail step.

Based on the trigger you have chosen you can either use the “Owner” or “Modified By” user to get the current user, if you have a trigger that allows it you can also get the current user using the “User ID” from the dynamic values. This user can be specified as the sender of the e-mail. For Sender (Schema name) we choose the Entity Type “User”.

Now we also have an option to specify the “Regarding” of the E-mail, for this we used the Regarding (Id) “Account” and the Regarding (Schema Name) Entity Type “Account”.
For the To-Recipient we have chosen the To-ID “Primary Contact” and the To-Schema name Entity Type “Contact”.

To sum up: It is important that the “Schema name” points to the Entity Type of the ID that is specified.


Figure 9: Send Email

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com

Was this helpful?

3 Yes  No
Related Articles
  • How to share the Connection of the DocumentsCorePack Connector
  • AssureSign for DocumentsCorePack
  • How to conditionally remove a watermark in DocumentsCorePack templates
  • Document Processing with DocumentsCorePack (DCP)
  • How to activate SharePoint in DocumentsCorePack
  • Fillable PDF forms
Latest Articles
  • How to share the Connection of the DocumentsCorePack Connector
  • How to update the metadata in the DocumentsCorePack Template Designer
  • Working with Product Properties in DocumentsCorePack
  • How to work with the Relationship Manager
  • Using virtual tables in DocumentsCorePack
Popular Articles
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • DocumentsCorePack Template Designer – Getting Started
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • DocumentsCorePack Online Service Configuration
  • Step-by-Step: How to configure a One-Click-Action
Top Rated Articles
  • IMPORTANT information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Step-by-Step: How to configure a One-Click-Action
  • Online Services: Required Application Permissions
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
Categories
  • *News and General Infos* 51
  • Webinars 35
  • Template Designer(DCP 179
  • DocumentsCorePack(DCP 192
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 62
  • PowerSearch (PS 48
  • ActivityTools (AT 59
  • SmartBar (SB 53
  • GroupCalendar (GC 46
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
  • © 2022 www.mscrm-addons.com. All Rights Reserved.