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

From sharepoint designer to flow...

Hello,
I have a few years ago a sharepoint flow that works very well. when I select an entry in my sharepoint list, I start the workflow, it creates a word file in a sharepoint library by taking the template created in this library by returning in all the fields entered in the form. I tried to do the same with Flow, without success. 1st Pitfall Flow asks for a file name
2nd pitfall how can flow take the template from the library? does anyone have a solution?

 

Thanks a lot

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @Pstork1 

Thank you for your return, I continued to deepen the question, and I found a solution.
In a first step you have to create a folder in the library to host the template.docx. since the standard folder does not work and directly in the library either ...
then you have to go through:
The trigger, when an item is created> copy the file, the source being the template file and the target the library> get the file properties> update the file properties by linking the trigger fields.
It works very well.
I only have one thing left to find is how to pass from a sharepoint list to a library the calculated column results. all other fields are supported by flow except those.
If you have an idea, otherwise I will continue my research on the subject.

 

Thanks a lot for your time

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

1) I'm not sure what the problem is with #1.  When you create a file you will need to supply a file name.  YOu simply decide what you want to name the file when you save it using some pattern and then store that in a string variable.  YOu would have had to supply some kind of filename to do it in the past also.  Could you explain a bit more why #1 is a problem?  How are you triggering your Flow?

2) The template for a document library is stored at a known location 'Shared Documents/Forms/template.dotx'. for a normal library called 'Shared Documents'.  You should be able to get the template file from there.

 

To do the fillin you will use a Premium action from Word Online called "Populate a Microsoft Word template".  The fact that it is premium is usually the biggest issue. Any user who uses the Flow will need to have a premium license.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

Hi @Pstork1 ,

thanks for your reply.
Currently my workflow starts on demand when an item is selected.
For # 1, I do not know how to program this variale but indeed, I imagine that I should find how to solve this problem.
With sharepoint designer, my workflow created the word file, and pushed all the fields of my list in the library and as they are integrated in the template, it was automatically created with the fields filled.
If I understand correctly with Flow the logic is different, it must go through a word action obviously ... paying. sharepoint is no longer able to create the word file alone?

do you think, is it necessary, useful, to convert sharepoint designer workflow into Flow ... ???

Highlighted

1) So if you are generating this off a selected List Item, then you would use one or more of the metadata fields in the list item to generate a filename.  There is an action in Flow called 'Initialize Variable' and one called 'Set Variable'.  Initialize Variable can't be used inside a loop or condition, so you normally use that to create the basic variable with a null value.  Then use Set Variable whenever you need to set or modify the value.

 

If you want to use a Template document then yes, the Word Online connector is necessary.  The other possibility is to build out your document in the Flow as HTML, filling in the field values as needed.  Then output the HTML as a Word document.  At least I think that's possible, I know I've done it with PDF, but haven't tried lately with .docx.

 

Do you need to convert?  Yes and No.  SharePoint Designer is going End of Life in 2026.  You can use Visual Studio to create SharePoint workflows.  But I don't think most citizen developers will do that.  I also assume MS will deprecate SharePoint workflows at some point, but they haven't yet.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

Hi @Pstork1 

Thank you for your return, I continued to deepen the question, and I found a solution.
In a first step you have to create a folder in the library to host the template.docx. since the standard folder does not work and directly in the library either ...
then you have to go through:
The trigger, when an item is created> copy the file, the source being the template file and the target the library> get the file properties> update the file properties by linking the trigger fields.
It works very well.
I only have one thing left to find is how to pass from a sharepoint list to a library the calculated column results. all other fields are supported by flow except those.
If you have an idea, otherwise I will continue my research on the subject.

 

Thanks a lot for your time

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (12,144)