web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / send email from file c...
Power Automate
Suggested Answer

send email from file contents

(0) ShareShare
ReportReport
Posted on by 29
Hey there, I have a simple flow that reads a file added to personal onedrive and then emails (gmail Send email V2) the contents in the message body.  It's working great but seems to be adding a lot of jump to the text from the file contents to the message body.  I've tried adding an "Initialize Variable" String step that inserts the file contents in to a string and then adding the string to the message body in the send email step but same results.
 
Example:
 
Input (file contents):
"summary": {
"table": [],
"line":  Scan result summary: alerts=0, warnings=0, infos=2, error=1"
},
"error": "Scan Aborted:
 

Input Send email (V2)
\"summary\": {\n \"table\": [],\n \"line\": \"Scan result summary: alerts=0, warnings=0, infos=2, error=1\"\n },\n \"error\": \"Scan Aborted:


I suspect I don't know how to appropriately search google for this type of issue but I'm not finding anything.  
 
Any help would be huge.  Thanks!!
Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,482 Most Valuable Professional on at
    Hey @jgabrielson Can you share the Input (file contents)
     
     
    body('InputActionName')?['summary']?['line']
     
    Or 
     
    json(body('InputActionName'))?['summary']?['line']
     
    Or
     
    json(variables('Input'))?['summary']?['line']
     
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     

    Does this answer your question?
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.
     

     
  • jgabrielson Profile Picture
    29 on at
    I'm not able to share the input file here without redacting a lot of it.  But it's a basic mix of json snippet and regular text.  The email body on receipt shows a lot of "\n" and "\" added throughout.  Is there any way to strip these out of the filecontent before sending in the message body or configure the send email (V2) to not add them?
  • Suggested answer
    CFernandes Profile Picture
    8,482 Most Valuable Professional on at
     
    You can use the replace, easiest option...

    replace(replace(outputs('Compose'), '\n', ''), '\', '')
     
    Change the outputs('Compose') with your variable.
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     

    Does this answer your question?
     

     
     
    P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard