cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JasonM72
Frequent Visitor

Using power automate with Lists in Teams and Channels PDFs work but Word Files Don't

I have built a flow which uses the 4 uploaded files from a group Form and adds them as attachments to the correct Row in the List in Teams.  I am only allowing Docs and PDFs. This fails for the Docs and passes for the PDFs.  If I save the 4 word files as PDFs in the same location and upload those instead it works fine.

 

The one thing I do notice though is that the Link changes for Word files compared to the pdfs.

 

Works
https://BLAHBLAH.sharepoint.com/sites/HRAutomation/Shared%20Documents/Apps/Microsoft%20Forms/2021%20...

 

Does not work in the flow
https://BLABLAH.sharepoint.com/sites/HRAutomation/_layouts/15/Doc.aspx?sourcedoc=%7BDA2E2885-2C69-44...

{
"status": 404,
"message": "File not found\r\nclientRequestId: ec90596a-06d3-4a27-b1bc-cdb3d8affed6\r\nserviceRequestId: ec90596a-06d3-4a27-b1bc-cdb3d8affed6"
}

 

 

Thoughts?

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @JasonM72 ,

I just checked it on my environment, and if you want to access the files in Power Automate you should use their 'id', not their link, e.g. to upload the attached files into SP. It works for both, PDF and docx.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

3 REPLIES 3
tom_riha
Super User II
Super User II

Hello @JasonM72 ,

I don't know how you build the document links, but the link for the .docx files is not a direct link to the document, it's a composed link that will open the document in an Online Office (Word) application.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Tom,

The Links were autogenerated by Parsing the Microsoft Forms File Upload Question with the standard JSON for attachments.  

{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
},
"required": [
"name",
"link",
"id",
"type",
"size",
"referenceId",
"driveId",
"status",
"uploadSessionUrl"
]
}
}
 
This generates standard links using the shared document folder system on SharePoint when the document uploaded type is pdf.
As soon as I upload a word file the shared document structure gets replaced with /_layouts/15/ ...... as shown above in the original post.   All I have done is select the word equivalent of the pdf named the same in the same original folder.
Partial Peek Code of the Parse Step:
{
    "inputs": {
        "content""@outputs('Get_response_details')?['body/rd05f520262104638abc7c8e96c00c8c4']",
        "schema": {
            "type""array",
            "items": {
                "type""object",
                "properties": {
                    "name": {
                        "type""string".....
Why the link: changes when the file type changes doesn't make sense.
Jason

Hello @JasonM72 ,

I just checked it on my environment, and if you want to access the files in Power Automate you should use their 'id', not their link, e.g. to upload the attached files into SP. It works for both, PDF and docx.

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (53,635)