cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ArmanShafiee
Helper I
Helper I

Flow - Create item in a secondary SharePoint list with attachments when a specific field is modified in the primary SharePoint list

Hi everyone, 

 

I have an issue regarding a flow in Power Automate. 

As mentioned in the title, I want to create an item in a secondary SharePoint list when a specific field is modified in my primary SharePoint list (when the field "Validation" has the "Yes" value). 

 

I have managed to do so but it works when any field is modified, and it doesn't add attachments in the new items. 

How can I make it work ?

 

Thanks,

Arman

3 ACCEPTED SOLUTIONS

Accepted Solutions
efialttes
Super User
Super User

Hi!

"...it works when any field is modified..."

I would try with this feature recently release by Microsoft:

https://flow.microsoft.com/es-es/blog/run-a-flow-when-a-sharepoint-column-is-modified/

Remember you need to enable version history on your primary list

For the attachments issue, I guess we will need more information context (flow design screenshot, column structure design in your lists etc)

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Thanks for your answer @efialttes ! 

I've managed to make it copy the items in the secondary list only when a specific column is modified in the primary list ! 

Then I followed this tutorial to make it copy the attachments : https://www.youtube.com/watch?v=O5LFNW9i9yk&ab_channel=LernenTech

It seemed to work well and my flow hasn't any errors. 
However, in the attachments of the items in the secondary list, I get a file with my name but I can't open it since in has no extension. 

Here's a screen shot of my flow (it's in french): 

ArmanShafiee_0-1600773095584.png

ArmanShafiee_1-1600773139765.png

ArmanShafiee_2-1600773158795.png

ArmanShafiee_3-1600773196389.png

And this is the result I get in my secondary list : 

ArmanShafiee_4-1600773284237.png

And this is the properties of the downloaded file : 

ArmanShafiee_6-1600773362081.png

Thanks for your help, 

Arman

EDIT : 

I know where I made an error. 

In the final step, in the field Nom du fichier (or File Name), I entered the field Created by DisplayName instead of DisplayName. 
Now it works ! 
Thanks again for the help 😉 
Arman

View solution in original post

Hi!

So 1 out of 2 issues solved, right?

Good news!

Now, on the attachments topic, I believe you added some sort of 'Create attachment' on the new item created in your second SP list  ('Ajouter une piece jointe'), right?

If so, can you hover your mouse over 'Nom the ficher' current assigned value? It looks like the 'Create by Display name' attirube, wich is probably your name, right?

So I believe you need to use the filename with extension instead. Seems to be called 'Display name' I guess it can be found through the Dynamic Content Menu, Under 'Get attachment content' action block

Good example here

https://powerusers.microsoft.com/t5/General-Power-Automate/Get-attachment-content/td-p/90718

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
efialttes
Super User
Super User

Hi!

"...it works when any field is modified..."

I would try with this feature recently release by Microsoft:

https://flow.microsoft.com/es-es/blog/run-a-flow-when-a-sharepoint-column-is-modified/

Remember you need to enable version history on your primary list

For the attachments issue, I guess we will need more information context (flow design screenshot, column structure design in your lists etc)

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thanks for your answer @efialttes ! 

I've managed to make it copy the items in the secondary list only when a specific column is modified in the primary list ! 

Then I followed this tutorial to make it copy the attachments : https://www.youtube.com/watch?v=O5LFNW9i9yk&ab_channel=LernenTech

It seemed to work well and my flow hasn't any errors. 
However, in the attachments of the items in the secondary list, I get a file with my name but I can't open it since in has no extension. 

Here's a screen shot of my flow (it's in french): 

ArmanShafiee_0-1600773095584.png

ArmanShafiee_1-1600773139765.png

ArmanShafiee_2-1600773158795.png

ArmanShafiee_3-1600773196389.png

And this is the result I get in my secondary list : 

ArmanShafiee_4-1600773284237.png

And this is the properties of the downloaded file : 

ArmanShafiee_6-1600773362081.png

Thanks for your help, 

Arman

EDIT : 

I know where I made an error. 

In the final step, in the field Nom du fichier (or File Name), I entered the field Created by DisplayName instead of DisplayName. 
Now it works ! 
Thanks again for the help 😉 
Arman

Hi!

So 1 out of 2 issues solved, right?

Good news!

Now, on the attachments topic, I believe you added some sort of 'Create attachment' on the new item created in your second SP list  ('Ajouter une piece jointe'), right?

If so, can you hover your mouse over 'Nom the ficher' current assigned value? It looks like the 'Create by Display name' attirube, wich is probably your name, right?

So I believe you need to use the filename with extension instead. Seems to be called 'Display name' I guess it can be found through the Dynamic Content Menu, Under 'Get attachment content' action block

Good example here

https://powerusers.microsoft.com/t5/General-Power-Automate/Get-attachment-content/td-p/90718

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,307)