cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Amber_L
Helper III
Helper III

how to pull multiple attachments from google docs via file path into sharepoint document library

hey guys,

 

I have a google form that users fill out and they have the ability to attach a max of 5 files to this form (before anyone mentions, this form MUST be a google form, I cannot switch to microsoft forms)

 

I have flow set up that will check my google sheet regularly and will check if any items have already been created. If it cant find a matching item, then it will create one. I have this working fine. The part I am having trouble with is then adding any attachments that are submitted with the form to the created item. 

 

I know to add the attachment after the item has been created but I am struggling to figure out how to get the content of the item (more specifically when more than 1 attachment is added)

 

Could I please have some help with this one?

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Amber_L ,

 

I did a simple demo for you.

1\ This is my google form. 

vxiaochenmsft_0-1627636356130.png

 

2\ This is my related google sheet. 

(I submit a form record to the sheet as an example )

vxiaochenmsft_2-1627636583970.png

 

3\ This is my flow.

vxiaochenmsft_3-1627636614368.png

vxiaochenmsft_4-1627636637739.png

split(first(outputs('Get_rows')?['body/value'])?['Test1'],',')

vxiaochenmsft_5-1627636668766.png

substring(items('Apply_to_each'),add(indexOf(items('Apply_to_each'),'open?id'),8))

 

4\ The result is as follows:

vxiaochenmsft_6-1627636751122.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

 

 

 

View solution in original post

v-xiaochen-msft
Community Support
Community Support

Hi @Amber_L ,

 

You could modify your flow like this.

vxiaochenmsft_0-1627873067013.png

vxiaochenmsft_1-1627873088618.png

items('Apply_to_each')
 
vxiaochenmsft_2-1627873178563.png
vxiaochenmsft_3-1627873207889.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

5 REPLIES 5
v-xiaochen-msft
Community Support
Community Support

Hi @Amber_L ,

 

I did a simple demo for you.

1\ This is my google form. 

vxiaochenmsft_0-1627636356130.png

 

2\ This is my related google sheet. 

(I submit a form record to the sheet as an example )

vxiaochenmsft_2-1627636583970.png

 

3\ This is my flow.

vxiaochenmsft_3-1627636614368.png

vxiaochenmsft_4-1627636637739.png

split(first(outputs('Get_rows')?['body/value'])?['Test1'],',')

vxiaochenmsft_5-1627636668766.png

substring(items('Apply_to_each'),add(indexOf(items('Apply_to_each'),'open?id'),8))

 

4\ The result is as follows:

vxiaochenmsft_6-1627636751122.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

 

 

 

View solution in original post

Awesome that works! Thank you

Hey, this actually comes up with an error if there is no attachment? what kind of check needs to be made to stop this from failing? I get the error below when setting the string variable with the ID in it

Amber_L_0-1627871322720.png

 

guessing its failing because there is nothing returned when no there are no attachments. ive tried doing a condition where if the output from compose = null then dont run the adding of attachments however it still cant process the condition?

 

v-xiaochen-msft
Community Support
Community Support

Hi @Amber_L ,

 

You could modify your flow like this.

vxiaochenmsft_0-1627873067013.png

vxiaochenmsft_1-1627873088618.png

items('Apply_to_each')
 
vxiaochenmsft_2-1627873178563.png
vxiaochenmsft_3-1627873207889.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Amber_L
Helper III
Helper III

perfect! that solved it, thank you!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,649)