cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ABCDEFG1234
New Member

Create new items in SharePoint List when new respondent submit the survey with attachment

Hi All Expert,

 

I copy a flow that can create the new item on my SharePoint List with attachment when a new respondent submit a survey and upload a file.

 

But unluckily, only the PDF & Media file can be added as the attachment when the SharePoint Create a flow.

The office file: Word, Excel, SharePoint cannot successfully created. It is because there is an additional string at the end of the file path:

 

&action=default&mobileredirect=true

 

Office file path demo:

https://testing.sharepoint.com/sites/demo/_layouts/15/Doc.aspx?sourcedoc=%7BA1A69%7D&file=123_user%2...&action=default&mobileredirect=true

 

PDF & Media demo:

https://testing.sharepoint.com/sites/demo/Shared%20Documents/Apps/Microsoft%20Forms/Testing%20(Teams...

 

The get file content using file path is unsuccessful. 

 

Please check my flow:

 

workflow1.jpgworkflow2.jpg

 

May I know there any solution to extract the office file for this case?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Tom_riha,

 

I used another method to replace the dynamic [link] element.

 

I put the fixed path like: Shared_Document/Apps/Forms/Question/Testing/[name] instead of the [link].

 

Thank you for your help

View solution in original post

3 REPLIES 3
tom_riha
Super User II
Super User II

Hello @ABCDEFG1234 ,

if the only problem is the string "&action=default&mobileredirect=true" at the end of the url, you can remove it with the replace(...) expression to replace that string by nothing ('') in the url.

replace([link],'&action=default&mobileredirect=true','')

Note:
replace [link] with the link dynamic content

 



[ 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. ]

Hi Tom_riha,

 

I used another method to replace the dynamic [link] element.

 

I put the fixed path like: Shared_Document/Apps/Forms/Question/Testing/[name] instead of the [link].

 

Thank you for your help

View solution in original post

It seems replace JSON function cannot apply for the dynamic content. The flow warning me.

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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (54,008)