Skip to main content

Notifications

Power Automate - General Discussion
Answered

Send an email (V2) adds Base64 when I don't want it to.

(1) ShareShare
ReportReport
Posted on by 16
   I am trying to send an xlsx file via email. I generate the Excel file from Paginated Reports. I can save as an xlsx to my OneDrive. But, when I try to send it as an email attachment, it gets encoded and I can't open it.
 
This is what the code looks like:
   "emailMessage/Attachments": [
        {
          "Name": "fasd.xlsx",
          "ContentBytes": "@{base64(body('Export_To_File_for_Paginated_Reports'))}"
        }
 
It keeps adding the base64
 
 
Here is what I think I want it to look like:
 "emailMessage/Attachments": [
        {
          "Name": "fasd.xlsx",
          "ContentBytes": "@{body('Export_To_File_for_Paginated_Reports')}"
        }
 
  • jrob Profile Picture
    jrob 4 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    Thank you! Solved my problem here

  • Trevor_Olshefke Profile Picture
    Trevor_Olshefke 7 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    Thank you for making this post, I was running in circles. It seems to still be an issue currently, and took me a while to find this thread. Hopefully this can help someone else having issues with CSV, email issues, and missing/ corrupt data.

  • rw_ga Profile Picture
    rw_ga 133 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    @l1l1l1l1ld 

     

    Hmmm. I don't know of a location to report bugs, maybe open a support ticket and link to this thread and ask if there is a dedicated location for these types of issues?

  • Ugambino Profile Picture
    Ugambino 23 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    I got thru this button on the top right corner.

    Ugambino_0-1701374946011.png

     

  • l1l1l1l1ld Profile Picture
    l1l1l1l1ld 16 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    This is the way:

    I believe they updated the editor recently, I wonder if that's the issue. I'm still accessing my flows via: https://make.powerapps.com/ drilling down to the solution > cloud flows > editing the flow here and get to use the older editor.

     

    I had to make a Solution then I created a clow flow in that solution to access the older editor.

     

    How do we let them know the new solution has a bug?

  • Ugambino Profile Picture
    Ugambino 23 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    It actually works too 

  • rw_ga Profile Picture
    rw_ga 133 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    In the new editor, I just tested with using the array variable method I mentioned above and it doesn't seem to wrap base64() around it.

     

    rw_ga_0-1701370705250.png

     

    but I didn't actually send the email and test to see if it was corrupt!

  • rw_ga Profile Picture
    rw_ga 133 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    Wow, I just tried the new editor for testing and it does seem to wrap anything I put in the "Conent - x" field with bases64() as you indicated. Wonder if thats a bug???  If so, you probably shouldn't edit that flow with the new editor until it gets fixed!

  • Ugambino Profile Picture
    Ugambino 23 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    It's been like 3 days trying to figure it out, OMG this actually worked using the older editor.

    Thank you, for giving me some light 🎉

  • Verified answer
    rw_ga Profile Picture
    rw_ga 133 on at
    Re: Send an email (V2) adds Base64 when I don't want it to.

    I believe they updated the editor recently, I wonder if that's the issue. I'm still accessing my flows via: https://make.powerapps.com/ drilling down to the solution > cloud flows > editing the flow here and get to use the older editor.

     

    Is your flow in a solution?  Maybe try editing it with the older editor.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,304

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard