cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Cyrano
Level: Powered On

HTTP get download file

Hi all,

 

Scenario:

I created a flow which polls for new messages from office365servicecomms-API, filters for inicident-posts and which then pushed those messages into our MS Teams-channel.

 

Now I wanted to extend this flow to fetch the Post-Incident-Reports URL (example: PIR-Link (you need to be authenticated)), downloads the file, uploads it to our group connected SharePoint-Teamsite and which finally adds a share-link to the corresponding post in our Teams-Channel.

 

Problem:

I am using this HTTP-action as part of a bigger flow to fetch the PIR-file:

 
{
"inputs": {
"method": "GET",
"uri": "@{item()?['PostIncidentDocumentUrl']}",
"headers": {
"Content-Type": "application/json",
"Accept-Encoding": "",
"Accept": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"Accept-Language": "en-US,de-DE;q=0.98"
 },
"authentication": {
"type": "ActiveDirectoryOAuth",
"tenant": "<SECRET>",
"audience": "https://manage.office.com",
"clientId": "<SECRET>",
"secret": "<SECRET>"
 }
 },
"operationOptions": "DisableAsyncPattern, DisableAutomaticDecompression, SuppressWorkflowHeaders",
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
 }
 }
}

The body from the response is corrupt (you cannot open the file in word). The issue seem to be that the office365servicecomms-API sends a wrong content-type-header:

statusCode200
headers 
Pragma"no-cache"
X-Instance-Name"Office365ServiceCommsWeb…iceCommsWebService_IN_1"
X-Activity-Id"f070d1ac-e9a6-4434-aa08-f761db12c26a"
X-Time-Taken"498"
Cache-Control"no-cache"
Date"Mon, 04 Mar 2019 10:17:22 GMT"
Server"Microsoft-IIS/10.0"
X-AspNet-Version"4.0.30319"
X-Powered-By"ASP.NET"
Content-Length"116850"
Content-Disposition"attachment; filename=PIR_TM173414_en-us_docx.docx"
Content-Type"text/html"
Expires"-1"
body"PK\u0003\u0004\u0014\u00…u0001\u0000\u0000\u0000"

 

Postman, IE and Edge seem to be robust enough, to ignore the wrong content-type, but FLOW seem to add UTF-encoding into the binary response, causing a corrupt file.

 

Any ideas to work around that issue? Any suggestions to address this issue to Microsoft (beside opening a pemier-support ticket)?

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: HTTP get download file

Hi @Cyrano ,

 

Could you share a screenshot of your flow?

By the way, a URL of the flow would be helpful.

Have you got any error message on the flow?

Please help collect more info on this issue.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cyrano
Level: Powered On

Re: HTTP get download file

Hi @v-yamao-msft ,

 

my support ticket was escalated to the flow product group and they forwarded the ticket to the team managing the /ServiceComms/Messages-API. They are now checking if, how and when they are going to fix it.

 

I will send an update as soon as I get (hopefully good) news.

 

best regards
Patrick

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 173 members 4,656 guests
Please welcome our newest community members: