cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Daniel-Kendall
Frequent Visitor

How to extract filename from HTTP response headers

I have the following outputs of a HTTP block

 

 

{
    "statusCode": 200,
    "headers": {
        "Pragma": "no-cache",
        "Strict-Transport-Security": "max-age=35136000; includeSubDomains",
        "Access-Control-Allow-Origin": "*",
        "X-Server-Time": "2022-02-22T16:04:08.614Z",
        "Access-Control-Expose-Headers": "X-SessionToken,X-Server-Time",
        "X-Role-Instance": "Cognito.Services_IN_20",
        "X-Request-Time": "51ms",
        "Content-Security-Policy": "default-src 'self' https://*; img-src * data:; script-src https://* 'unsafe-inline' 'unsafe-eval'; style-src https://* 'unsafe-inline'; frame-src 'self' https://* mailto:; worker-src blob:;",
        "X-Content-Type-Options": "nosniff",
        "Referrer-Policy": "origin-when-cross-origin",
        "Request-Context": "appId=cid-v1:bac45fa9-8f8e-4ddb-8e70-d648fe57a27a",
        "Cache-Control": "no-store, must-revalidate, no-cache",
        "Date": "Tue, 22 Feb 2022 16:04:08 GMT",
        "P3P": "CP=\"Cognito does not have a P3P policy.  Visit https://cognitoforms.com/privacy for details.\"",
        "Server": "Microsoft-IIS/10.0",
        "Content-Length": "6602",
        "Content-Disposition": "attachment; filename=\"New Microsoft Excel Worksheet.xlsx\"",
        "Content-Type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        "Expires": "-1"
    },
    "body": {
        "$content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        "$content": "UEsDBBQABgAIAAAAIQCkU8XPTgEAAAgEAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKyTy07DMBBF90j8Q+Qtit2yQAg17YLHErooH2DiSWLVL3nc0v49E/exQKEVajexYs/ccz0znsw21hRriKi9q9iYj1gBrvZKu7Zin4u38pEVmKRT0ngHFdsCstn09may2AbAgrIdVqxLKTwJgXUHViL3ARydND5ameg3tiLIeilbEPej0YOovUvgUpl6DTadvEAjVyYVrxva3jmJYJAVz7vAnlUxGYLRtUzkV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Whu+QwKMQJ+vCX5T38dNys0LlKCWTOJ3G6WRDZhmZZ+OHz2bkVX8TryvI8+B/EecD4gXQ5b7+EuUvAAAA//8DAFBLAQItABQABgAIAAAAIQCkU8XPTgEAAAgEAAATAAAAAAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhALVVMCP0AAAATAIAAAsAAAAAAAAAAAAAAAAAfwEAAF9yZWxzLy5yZWxzUEsBAi0AFAAEAAgAAAAhANaGRE60AQAA2QMAABAAAAAAAAAAAAAAAAAAnAIAAGRvY1Byb3BzL2FwcC54bWxQSwECLQAKAAAAAAAAACEA/////zkBAAA5AQAAEAAAAAAAAAAAAAAAAAB+BAAAW3RyYXNoXS8wMDAwLmRhdFBLAQItABQABgAIAAAAIQCNh9pw4AAAAC0CAAAaAAAAAAAAAAAAAAAAAOUFAAB4bC9fcmVscy93b3JrYm9vay54bWwucmVsc1BLAQItABQABAAIAAAAIQDT3yYd0QIAAJQHAAANAAAAAAAAAAAAAAAAAP0GAAB4bC9zdHlsZXMueG1sUEsBAi0AFAAEAAgAAAAhADqA3ZfGBwAAYy4AABMAAAAAAAAAAAAAAAAA+QkAAHhsL3RoZW1lL3RoZW1lMS54bWxQSwECLQAUAAQACAAAACEAajq8s/cBAADZAwAADwAAAAAAAAAAAAAAAADwEQAAeGwvd29ya2Jvb2sueG1sUEsBAi0AFAAEAAgAAAAhAEZwAQt8AQAAngIAABgAAAAAAAAAAAAAAAAAFBQAAHhsL3dvcmtzaGVldHMvc2hlZXQxLnhtbFBLAQItABQABgAIAAAAIQD442ocQwEAAF8CAAARAAAAAAAAAAAAAAAAAMYVAABkb2NQcm9wcy9jb3JlLnhtbFBLBQYAAAAACgAKAHwCAAA4FwAAAAA="
    }
}

 

 

I would like to extract the header value between filename=// i.e. here it is just a new excel document (New Microsoft Excel Worksheet.xlsx)

How would I do this for usage here

DanielKendall_0-1645546818498.png

 



1 ACCEPTED SOLUTION

Accepted Solutions

For context for this solution see:

Re: How to extract filename from HTTP response hea... - Power Platform Community (microsoft.com)

==

Solved using the following regex thanks to:

https://www.reddit.com/user/CryptoOTC_creator/

[\w\s]+\.[\.\w\d]+

[Character set. Match any character in the set.
\w Word. Matches any word character (alphanumeric & underscore).
\s Whitespace. Matches any whitespace character (spaces, tabs, line breaks).
] 
+Quantifier. Match 1 or more of the preceding token.
\.Escaped character. Matches a "." character (char code 46).
[Character set. Match any character in the set.
\.Escaped character. Matches a "." character (char code 46).
\w Word. Matches any word character (alphanumeric & underscore).
\d Digit. Matches any digit character (0-9).
] 
+Quantifier. Match 1 or more of the preceding token.



 

View solution in original post

4 REPLIES 4
Expiscornovus
Most Valuable Professional
Most Valuable Professional

Hi @Daniel-Kendall,


Try an expression like below:

 

split(outputs('HTTP')['Headers']['Content-Disposition'], '\"')[1]

 

 

The example assumes that the action which outputs the block has a name which is HTTP.



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #MicrosoftCopilotStudio content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thanks for your response here is my debugging steps

 

split(outputs('HTTP')['Headers']['Content-Disposition'], '\"')[1]

 

Led to the following output

Unable to process template language expressions in action 'Create_file' inputs at line '0' and column '0': 'The template language expression 'split(outputs('HTTP')['Headers']['Content-Disposition'], '\"')[1] ' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.

 

So removing the index to check the full array

[
  "attachment; filename=\"jimmy.xlsx\""
]

became the file name

 

I then applied the following Regex to the string

(?<=\\)(.*?)(?=\\)

 

Which extracted

["jimmy.xlsx"]

I then used the follwing substring to clear the front/back 2 characters 

substring(variables('fileName'),2,sub(length(variables('fileName')),4))

Leading to the correct

jimmy.xlsx

 

However, this is sent to power automate as

_jimmy.xlsx_

 
==

To clarify this is very hacky/janky for example if the file name isn't escaped then there are no \'s for the regex to find.

Ideal solution:One clean expression to extract the file name for correct sending to power automate wheter sent as

[
  "attachment; filename=\"jimmy.xlsx\""
]

or

[
  "attachment; filename="jimmy.xlsx""
]

For context for this solution see:

Re: How to extract filename from HTTP response hea... - Power Platform Community (microsoft.com)

==

Solved using the following regex thanks to:

https://www.reddit.com/user/CryptoOTC_creator/

[\w\s]+\.[\.\w\d]+

[Character set. Match any character in the set.
\w Word. Matches any word character (alphanumeric & underscore).
\s Whitespace. Matches any whitespace character (spaces, tabs, line breaks).
] 
+Quantifier. Match 1 or more of the preceding token.
\.Escaped character. Matches a "." character (char code 46).
[Character set. Match any character in the set.
\.Escaped character. Matches a "." character (char code 46).
\w Word. Matches any word character (alphanumeric & underscore).
\d Digit. Matches any digit character (0-9).
] 
+Quantifier. Match 1 or more of the preceding token.



 

v-xiaochen-msft
Community Support
Community Support

Hi @Daniel-Kendall ,

 

Glad to see you solved it.

You could mark your own reply to close the case.

 

Best Regards,

Wearsky

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (918)