cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmad
Advocate I
Advocate I

Send email with document PDF - attachment is corrupted

Hi all,

i'm new user with Power Automate, in the last weeks i created some easy flow and i really appreciate the powerfull of the tool.

Now, i'm banging my head since 12 hours on a flow that produce PDF files from an excel database and Word Template (as mail merge) and send an email with the document produced in PDF.

The document PDF that i write on OneDrive is ok. The attachment is corrupted. 


I read all the topics about this problem and i change many times the configuration but i can't still solve my issue.


Please, help me to undestand what i'm wronging.

 

i attach some pictures of my flow. In the third one, the point the critical configuration.

Thank you very much for you help

1 ACCEPTED SOLUTION

Accepted Solutions
rmad
Advocate I
Advocate I

I solved!

the problem is a bug in the new version of Power Automate.

When i saved the flow after i set the CONTENT for the attachment, the setup was changed automatically into a function base64(body('Convert_file'))

The solution is to open the EDIT with the old version of Power Automate and this configuration is saved without changes. The PDF attachments are not corrupted any more.

 

View solution in original post

21 REPLIES 21
rmad
Advocate I
Advocate I

I solved!

the problem is a bug in the new version of Power Automate.

When i saved the flow after i set the CONTENT for the attachment, the setup was changed automatically into a function base64(body('Convert_file'))

The solution is to open the EDIT with the old version of Power Automate and this configuration is saved without changes. The PDF attachments are not corrupted any more.

 

Thank you so much, switch classic mode worked

l1l1l1l1ld
Regular Visitor

Can you share the path and screenshots to get to the older version of Power Automate?

First of all - THANK YOU!!!!!

This was driving me crazy!!!

 

The amount of things I've tried looking through community posts, watching emails, and for this all to be because of a simple interface bug - geez!!

 

Worked like a charm!!

 

I need to find a way to report this issue to Microsoft. It needs to be fixed. Who knows what other errors are caused by this new interface.

I hope this still helps you.

 

While editing a flow, click on the 3 dots in the top right and press "switch to classic designer".

And that's it - problem solved!


See image below:

RichardP_1-1701871708895.png

 

I was with the same problem.

Problem solved switching to the old version.

Hi rmad, thanks for your post / reply. It helped solving several hours of working on fixing this issue of Attachment get corrupted in Power Automate flow. Switching to classic view helped, worked excellently. Thanks a lot!

Seems Microsoft never changed in past more than three decades, in making its customers as testers for all their products by releasing it with no care for bugs. Not sure how such highly paid associates of Microsoft produce and deliver such low quality products with no accountability or even care of its customers. 

you are brilliant! i thought something went wrong in my flow 

Like others, I've been banging my head against a brick wall for 2 days trying to figure out why my attachment flow would not work. Switch off the new editor and presto, everything works first time. Hey MicroSoft how about actually telling people about this or - just a wild stab in the dark here from the inexperienced - actually fixing the problem. Ultimately, something that works is, in computing, more valuable than something that looks pretty!

Help! I am using the classic editor and the file is still corrupt and can't be previewed from the email. However, the file created in SharePoint it totally fine.

 

 

jameslu
New Member

Firstly, thanks all the post and help me to figure out the issues.I would like to share my finding may help others.

There are 2 ways to solve this bug.

1. switch back from new designer to classical model, recreate the Send an email and fill data, it will be resolved perfectly.

2. in new designer, once you added the new item for attachment done, click right top T to switch to input entire array, and remove the damned double quote pair manually out from File content, it will work perfectly.

jameslu_0-1709775901990.png

jameslu_2-1709775976259.png

 

 

 

 

 

Thanks for the response. Unfortunately, it did not work. I am using the classic editor. When i delete the quotations it just replaces them. The file attached is still not a PDF and can not be previewed.

 

Here is what it looks like.

lmeyer
Frequent Visitor

lmeyer_0-1710197564472.png

Hi all, I tried switching to classic and didn't work. It still is corrupt. I don't see Content Bytes either. What am I missing and/doing wrong to not see content bytes?

 

All the best,

Lori

You can actually keep the quotations. Just add .pdf after the expression for the file name.

 

Check out my solution here. 

 

https://powerusers.microsoft.com/t5/Building-Flows/Need-help-Corrupt-PDF-attachment-and-Blank-List-I...

Just switched to the old version of the UI and now my pdf is generated OK (before that the pdf was displayed as a blank document although there was info inside, but not renderable), I'm amazed how come this insn't already fixed by MS. Wake up guys it's been 5 months since the posted solution !!!

Thank you so much!!

 

Using the New Designer and removing the double quote on the File Content works like a charm for me! It resolved my issue for the past 2 days!

SteveD5
New Member

@jameslu - THANK YOU!! I wasted 2 nights on this problem and was starting to pull my hair out over it. 

 

I'm reposting the solution that worked for me in hopes more people see this. If you want to continue using the new designer:

 

1. Switch to details inputs

2. Remove the quotes around the FileContent

3. Save and Test

 

PowerAutomate_EmailAttachment3.png

 

 

PowerAutomate_EmailAttachment2.png

Thank you so much. I also lost 12 hours on it....

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,448)