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

Create or Update word doc

I am trying to create  a flow where if an item is created or modified in a SharePoint list it creates a Word doc or modifies the already existing Word doc. I have been able to create the flow that creates the document, but everything that I have tried for the update file ends up updating all of the documents. This is what I have so far.  I did have an update file properties on my "if no" but that doesn't work. 

th4tn13rd84_0-1629048477612.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

@ekarim2020 That didn't work for me. I ended up doing it this way and it worked. Added an apply to each and used the body of my filter array.  Then I added an update file properties action. I used the expression item()?['ID'] as the id field. 

 

th4tn13rd84_0-1629146273628.png

 

 

View solution in original post

7 REPLIES 7
ekarim2020
Super User
Super User

I would need to see inside the flow actions to suggestion some options.

You mention that you are using a SharePoint list (not a document library). Are the Word documents that you are creating saved in the list as a list item attachment? Or are the Word documents stored somewhere else such as a document library?

As I can't see inside the flow, I assume that there is no danger of the flow entering a never-ending loop: Trigger is when an item is modified but the flow modifies them item triggering the flow again.... and again...?

ekarim2020_0-1629054713854.png

Ellis

@ekarim2020 I expanded the flow and wrote some notes. It shouldn't create a loop because nothing is being changed in the initial SharePoint list. 

 

th4tn13rd84_2-1629062245292.jpeg

 

 

 

 

ekarim2020
Super User
Super User

If I understand correctly:

  • ✔the create file action works correctly
  • the update file property action does not work correctly because it updates the properties of every file in the document library 1?

Could you share the details of the Update file properties action.

Ellis

th4tn13rd84
Frequent Visitor

@ekarim2020 This is what the update file properties step looks like. I know the issue is that the dynamic content for ID is only giving me the option of the "When an item is created or modified" or "Get files (properties only)" steps. I think I need the ID of the files that have gone through the condition step. 

th4tn13rd84_0-1629129341036.png

 

ekarim2020
Super User
Super User

Type ID in to the search box, and it should appear along with the other content with the same name:

ekarim2020_0-1629130431153.png

Ellis

@ekarim2020 That didn't work for me. I ended up doing it this way and it worked. Added an apply to each and used the body of my filter array.  Then I added an update file properties action. I used the expression item()?['ID'] as the id field. 

 

th4tn13rd84_0-1629146273628.png

 

 

Good day @th4tn13rd84 . Is there any way I can get in touch with you? I have the same problem with a flow and I don't know how to solve it.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,073)