cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SunshineK
Helper II
Helper II

Survey123 - when a survey response is submitted, IF attachment is uploaded - save this attachment to a sharepoint folder & create path to attachment in excel worksheet

Hi Team, 

 

I am struggling with creating this flow. 

Part 1.

When a survey is submitted, IF this has an attachment uploaded then create a file and save this attachment to a sharepoint folder.

Firstly I have no idea what dynamic content to input for the condition. 

Secondly, again, I don't know what dynamic content to input for File Content. 

I really don't know where to begin.

SunshineK_0-1600744056727.png

 

Part 2. 

When a survey response is submitted, this information goes into an excel spreadsheet - this all works well. 

However if there is an attachment uploaded, in the 'Attachment/s' column I want the path to the location of attachment to be automatically shown so it can be clicked on and taken to that attachment within the sharepoint folder. 

Again, no idea where to begin. 

 

SunshineK_1-1600744400216.png

 

Any help would be greatly appreciated. 

 

Thanks, 

Summer 

4 REPLIES 4
v-alzhan-msft
Community Support
Community Support

Hi @SunshineK ,

 

You could refer to screenshot to create the Condition:

1.png

empty(outputs('Compose'))

 

And you could refer to link below to create the file in the sharepoint:

https://www.bythedevs.com/post/working-with-files-on-ms-forms-group-form-in-ms-power-automate

 

And you could add the link for the created file to the excel table, however we couldn't create a clickable link in the excel table in Microsoft flow currently.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

sverkerEsriSE
New Member

Hi Summer,

I've been doing some research on this, by testing and by reading the following:

https://community.esri.com/groups/survey123/blog/2019/06/04/survey123-tricks-of-the-trade-integromat

 

Basically, you need to use the URL for the attachments and an HTTP-request action to download the attachments, then you can attach them. Since the HTTP Request requires Power Automate premium, I haven't been able to test this myself.

 

If the feature service that hosts the attachments is not public, you also need to supply a login token with the HTTP request that downloads the file. To get this token, you need to first make an HTTP request that gets the token, then use it in the request that downloads the file.

 

You can read more about that here: https://developers.arcgis.com/labs/rest/get-an-access-token/

 

Best regards,
Sverker

Thanks Alice. 

Given I am using Survey123 - I am not 100% sure if I am on the right track. 

It was 'successful' but didn't do what I wanted it to do. 

Firstly I know I missed the 'get response details' action - I don't know what to use here for survey123. 

 

SunshineK_4-1600909886156.png

 

SunshineK_5-1600909911242.png

 

The dynamic content of my 'attachment/s' that I want to save are options as follows:

SunshineK_6-1600910008144.png

SunshineK_7-1600910029232.png

 

I used 'feature attachments'.

 

As said - runs successful however in my folder which was initially empty it has create these subheadings:

SunshineK_8-1600910181910.png

 

Any help would be great?

 

 

 

Thank you Sverker. 

 

I got lost on the get token stuff. 

 

I can get access to certain parts of premium I guess .... I could use the HTTP action. 

However I couldn't use 'when a HTTP request is received' ?

 

https://community.esri.com/thread/232707-ms-flow-to-grab-photos-in-survey123-and-add-them-to-a-sql-report  

 
 

Will continue to play around with this flow. 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,202)