I have a question about PowerAutomate..So I have a docx template where the field will be fill with data.Now i want to send the email with the docx but not as attachment but similar to inserting image to the mail where it will be opened already and user can view the content instead of have to open the docx. Is there a way to do this?
I have tried converting the document to image and save it to OneDrive, but then, i can't use <img src=''> because create a file did not provide link instead only directory..
If I've understood this correctly, your trying to:
1) Populate a word document with some data
2) Convert word document to an image
3) Embed the resulting image into an email and send
Is that correct? and if so can you confirm how many pages are in the source word document?
This is a little convoluted... but this approach would work.
1) Convert the Word Document to a PDF
2) Extract the first page of the Word Document as an Image
3) Resize the image
4) Upload the image to storage
5) Build the HTML Email
6) Send the email
NOTE: Email clients like Outlook do not support DataUri's so that is why you need to upload the image file to storage.
Here is the flow:
Here is the output:
JSON for Image Extraction:
Expressions (in order):
I Have done;
Convert to PDF
Convert to Image
Save to OneDrive
Create Share Link
But the create share link didn't work in Mail..even using img src
@ikmalfikri - sorry, I'd forgotten the OneDrive action will convert the first page of a document to a JPG 🙂
Here is a simplified version, no need for Encodian (Unless you need to resize the image)
NOTE: A share link will not work... you have to create a direct URL to the image.
Thank you..I will try it..
Is blob free btw?
Very sorry but the current flow i'm working on require no additional cost...
If not just wondering is there any other solution?beside sharepoint as i think sharepoint may work
@ikmalfikri - The Azure storage connector is premium... but still part of the platform. If you don't have access to premium you'll need to the files somewhere else.
Just bear in mind that where ever these files are stored the user received the email must have access to the file... if it's internal users you could try a SharePoint URL.... but if it's external users it must be a storage location which enables anonymous access to the file. Sharing links will not work as they perform redirects
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!