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 / get filename from cont...
Power Automate
Answered

get filename from content-dispostion

(0) ShareShare
ReportReport
Posted on by 7

Hi to all,

 

i need to save in a variable the name of the file after an HTTP GET request.

After the HTTP request i have parse the json of the header response and i have the content-disposition similar to this:

 

"Content-Disposition": "inline; filename=\"011_062_D00257172.pdf\""
 
What is the best solution in this situation the retrieve the filename?
 
Thanks to all.

 

Categories:
I have the same question (0)
  • Brad_Groux Profile Picture
    4,556 on at

    Yes, you can do this and the easiest way would be to utilize a SharePoint. Here is a detailed solution that is similar to your needs - https://powerusers.microsoft.com/t5/Building-Flows/Get-SharePoint-Document-ID-from-Word-email-attachment/m-p/321792

    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!

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @svitiello,

     

    You can use the split function to process the Content-Disposition, in the Content-Disposition it has double quotes in it, so we could use the split() function to create an array, and the double quotes are the separator.

    After getting the array, get the file name by using the index, the file name is the second member of the array, so its index is 1.

    For example:

    split(body('Parse_JSON')?['Content-Disposition'],'"')[1]

    Annotation 2019-12-18 135407.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard