Bhubaneswar, Odisha, India
+91-8328865778
support@softchief.com

Embed image in word document dynamically using Power Automate from Dataverse

Embed image in word document dynamically using Power Automate from Dataverse

If you want to embed images dynamically from Dataverse Image column in WORD document template using power automate, then this post will help you.

Read my previous article to know how to generate QR Code and bar code using power automate and upload in image column in Dataverse.

The scenario:

We have 2 image columns in Dataverse contact table to store Barcode and QR Code. Now We want to embed the QR code and Bar code in blow word template and attach in a file column in Dataverse for the same record.

Solution

Step 1 – Prepare Document Template and Upload in OneDrive

Create a Microsoft word document and add content of your choice and also change the style as per your desired styling with colors.

Add controls to represent as placeholder for Customer Name (1), QR Code (2) and Bar Code (3) inside the documents as mentioned in the document below. Use Developer TAB to add controls and use properties to add name values to controls that will be referenced in Power Automate.

Use properties to set the control properties.

Do the same for Images control.

Once done save the document and upload in OneDrive Business.

Step 2 – Prepare Power Automate to download the Images

Trigger condition to initiate the Flow when the Token Sent flag updates.

Create the Bar code using Encodian Connector.

Create QR Code using Encodian Connector.

Upload barcode against Dataverse Image column for the contact.

Upload QR Code against Dataverse Image column for the contact.

Download Barcode from Dataverse Image column.

Download QR Code from Dataverse Image column.

Prepare Compose to format File Type for Barcode

{
  "$content-type": "image/png",
  "$content": "@{base64(outputs('Download_a_file_or_an_image')?['body'])}"
}

NOTE : use base64 expression to convert image column to base64

Prepare Compose to format File Type for QR Code

{
  "$content-type": "image/png",
  "$content": "@{base64(outputs('Download_a_file_or_an_image_2')?['body'])}"
}

NOTE : use base64 expression to convert image column to base64

Populate word template action.

Upload Word document to contact record.

Watch the complete video here.

Hope this helps.

Follow my blog for more trending topics on Dynamics 365, Azure, C#, Power Portals and Power Platform. For training, Courses and consulting, call to us at +91 832 886 5778 I am working more for community to share skills in Dynamics 365 and Power Platform. Please support me by subscribing my YouTube Channel. My YouTube Channel link is this : https://www.youtube.com/user/sppmaestro

You can enroll now !We are giving 30% discount on our Internship Program

Don’t miss the chance to participate in the upcoming Internship Program which will be done using Microsoft Dot Net Web Development Full Stack Technology. The new batch will be starting from May 20, 2024.  We will have most experienced trainers for you to successfully complete the internship with live project experience.

Why to choose Our Internship Program?

Industry-Relevant Projects
Tailored Assignments: We offer projects that align with your academic background and career aspirations.
Real-World Challenges: Tackle industry-specific problems and contribute to meaningful projects that make a difference.

Professional Mentorship
Guidance from Experts: Benefit from one-on-one mentorship from seasoned professionals in your field.
Career Development Workshops: Participate in workshops that focus on resume building, interview skills, and career planning.

Networking Opportunities
Connect with Industry Leaders: Build relationships with professionals and expand your professional network.
Peer Interaction: Collaborate with fellow interns and exchange ideas, fostering a supportive and collaborative environment.

Skill Enhancement
Hands-On Experience: Gain practical skills and learn new technologies through project-based learning.
Soft Skills Development: Enhance communication, teamwork, and problem-solving skills essential for career success.

Free Demo Class Available