Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Attaching file to sharepoint list entry, file type issue

(2) ShareShare
ReportReport
Posted on by 2

Hope someone can help, I've come at this multiple ways today!

 

I want to take an excel file from a sharepoint library and add a copy to a sharepoint list entry. I can get the file attached ok, but the file type doesn't come through as xls so cannot be opened.

I tried renaming the file to remove special characters, I tried copying the file in the workflow and attaching the copy, and I tried linking the file using OneDrive for Business instead of sharepoint. But all roads lead to this file type which won't allow me to view it.

 

Trigger: When an item is created or modified

Action: Get file content using file path

lizstimo_0-1721060041832.png

Action: Add Attachment

lizstimo_2-1721060096409.png

Outcome:

Shows OK in the list entry

lizstimo_4-1721060384013.png

But downloads as "File" not "Excel"

 

lizstimo_3-1721060123396.png

Outputs from Get file content:

lizstimo_5-1721060496044.png

 

  • lizstimo Profile Picture
    lizstimo 2 on at
    Re: Attaching file to sharepoint list entry, file type issue

    Oh no! That is so obvious 🙂 thank you

  • sandeepstw Profile Picture
    sandeepstw on at
    Re: Attaching file to sharepoint list entry, file type issue

    Hi @lizstimo ,

     

    Use Trigger - "When an item is created or modified" (SharePoint).


    and Action - "Get file content using path" from SharePoint.
    add Path to the Excel file in the SharePoint library.
    to add attachment use Action "Add attachment"
    from SharePoint site URL.

    in file name: "yourfilename".xlsx
    in file "File Content" output from "Get file content using path"

    Ensure the file extension is correctly set to .xlsx in the "Add attachment" action.

     

    Mark as solution if it helps. 

     

    Thanks,

    Sandeep Mishra

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,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard