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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue with attaching F...
Power Automate
Unanswered

Issue with attaching File Content from a instant cloud flow for a SharePoint List Item

(0) ShareShare
ReportReport
Posted on by 2

I'm trying to set up an instant cloud flow that I can trigger from a SharePoint List item which allows the user to input text and attach a file that will be dropped into an email generated during an action later in the flow. The issue I'm having is that the file provided during input is not being attached to the email in the correct format.

 

Here's a rundown of my flow:

 

Triggered from a selected SharePoint List item:

mbarron486_1-1664910903443.png

Get item action to retrieve data from the list to populate on the email

mbarron486_2-1664910956166.png

Send email action to populate an email with information from the List item and inputs from the trigger:

Text input from the trigger goes into the body

File Content input from the trigger goes in the Attachments

mbarron486_4-1664911055462.png

The flow is populating the Text input into the email body fine, but the attachment is coming through in an unknown file format and the name doesn't match the inputted file on the trigger:

 

mbarron486_5-1664911243900.png

I don't see any other Dynamic Content selections to choose from that would populate the attachment. Is there some addition action I need to do prior to the Email action to convert the file into an attachable format?

 

Categories:
I have the same question (0)
  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at
  • CU15011838-0 Profile Picture
    2 on at

    So my scenario is a bit different than the one linked here. I'm not actually calling up an existing file that is already stored other on the List item or within a SharePoint document library, the file is being added by the user when the flow is being triggered:

    mbarron486_1-1664979053158.png

     

    The user is importing a local file as an input and I'm just trying to get that file attached to the email being sent by the flow. 

     

     

  • noodlz86 Profile Picture
    2 on at

    I came to this post hoping to find an answer - but through some trial and error, I figured it out so I'll share...

     

    The dynamic content from the instant flow trigger isn't available in the dynamic content list so you need to manually type it into the expression builder. Look at the raw output of the trigger:

    noodlz86_0-1697651545111.png

    Item 1 has the trigger inputs, the text and file fields. Item 2 has the list item fields which are available in the dynamic content dropdown and so, like me, you may have assumed fileName was the name of the file you're trying to attach but it is actually the name of the list item/'selected item'.

     

    You should use instead: 

    file name:  triggerBody()?['file']?['name']
    file content:  triggerBody()?['file']?['contentBytes']

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard