Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Jhuw6e7NHg885SohOZJD/f
Power Automate - Building Flows
Unanswered

Flow Http Action Stripping content-disposition header?

Like (0) ShareShare
ReportReport
Posted on 1 Aug 2018 19:35:48 by

Hello,

 

I am trying to upload an attachment to smartsheet, which isn't supported by thier actions so i'm using the http action to do so.

 

It works fine in postman, here is the representation from postman:

 

POST /2.0/sheets/1184818672232324/attachments HTTP/1.1
Host: api.smartsheet.com
Authorization: Bearer ybu7z0jtr3h55lt8tho5e4nu5t
Content-Type: text/plain
content-disposition: attachment; filename="test.txt"

a simple text file

 

But when I plug this data into the http action in flow, I get the error:

 

{
"errorCode": 1008,
"message": "Unable to parse request. The following error occurred: Unrecognized token 'a': was expecting ('true', 'false' or 'null')\n at [Source: REST input; line: 1, column: 3]",
"refId": "11pm1pf5s81ed"
}

 

I figured out that if I drop the "Content-Disposition" header from the http call in postman, I also get this error.

Then I tried pointing the http post call to a different flow so I could see what is getting passed through, and these where the headers received:

{
  "Accept-Encoding""gzip,deflate",
  "Accept-Language""en-US",
  "Host""prod-21.westus.logic.azure.com",
  "User-Agent""azure-logic-apps/1.0,(workflow 859c9a1dd97c4fd8b4eaa67caf2ff035; version 08586684549956232978)",
  "x-ms-activity-vector""IN.03.05",
  "Content-Length""18",
  "Content-Type""text/plain"
}

 

This lead me to think that the Http action in flow is removing the content-disposition header from the post call, which in turn triggers the smartsheet error to occur.

 

Does anyone have a solution or workaround for this?

 

 

 

Categories:
  • Community Power Platform Member Profile Picture
    on 06 Aug 2018 at 12:30:30
    Re: Flow Http Action Stripping content-disposition header?

    Hey Mabel, here is the screenshot. I just tested again this morning and have the same issue.

     

     SmartSheetAttachmentHeaderIssue-lucascrandle.png

     

     

    Here is the postman "code" that is generated, I tested again in Postman this morning and it still works:

     

    POST /2.0/sheets/1184818672232324/attachments HTTP/1.1
    Host: api.smartsheet.com
    Authorization: Bearer ****************************
    content-disposition: attachment; filename="notype.txt"

    test file data

     

    In what way would you suggest using the parse json action to help test this?

    Lucas

  • v-yamao-msft Profile Picture
    on 06 Aug 2018 at 08:39:05
    Re: Flow Http Action Stripping content-disposition header?

    Hi @Anonymous,

     

    what’s your current situation? Are you still having the issue?

     

    How is your flow created? Please share a screenshot of your flow.

     

    Could you try to use action Parse JSON in your flow to see if it will work? More details about Parse JSON, please check it at here:

    https://flow.microsoft.com/en-us/blog/five-services-json-http/

     

     

    Best regards,

    Mabel Mao

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started