I have a flow that works well as sperate flows, but i am trying to create a single flow that will take my excel template populate it, then convert to PDF and save in a folder, then add as an attachement to the Item in the SP list.
This section creates the excel fine.
I then have nother flow which is "When an item is created" it converts it to PDF. But i would like this flow to do this automatically.
I have tried to do this with the below flow but it does not work. Any ideas? This is directly after the Run Script Step.
Dear J,
You must have your reason for creating it as such ... but i see several options:
Hope this helps,
Happy flowing,
Koen
My flow works in two halves. The issue I have is that I use a second flow that see's that the excel has been created and then for the newly created Item it converts to PDF. This is all fine but the only thing I'm trying to solve with this flow is when the PDF is created it is added to the Sharepoint Selected Item as an Attachement. With two flows I cannot reference the first flow in the seond and as such it does not know the ID of the selected Item.
The Excel file is unique each time, with the ID in the file name which is why i cannot point the get file content to the folder, I need it to reference the file I just created.
In essence I want to select an Item, Populate the Excel File, Convert to PDF and attach it to the selected Item as an attachment and I have been struggling for over a month now.
Dear J,
Since you are only sending bits and pieces it is difficult to see where things may go wrong. Overall the steps you are trying to do are well within what is possible.
Suggest that maybe you try and test different elements in small pieces first before trying to combine everything is a big flow. For example in a seperate flow, create a file, set a delay and read the file ... to confirm the new file created can be used in the same flow.
Once you confirm different smaller bits, build it our more complicated.
Regarding the 'Get contents', I would expect you just put in the ID of the file you just created, this should be available under the dynamic content of the 'Create file' action you use ... again, only after a longer delay will this work properly.
Happy flowing,
Koen
The Script takes the Sharepoint Data, and adds that data to specific fields in the Document Template we have. The Script just replaces the values with the SP data. This then saves the excel file and I convert them to PDF.
The Delay has been added but it shows an error.
Because I populate an Excel and place in a folder, and want that converted to PDF what file identifier do i use.
Should I replace get file content with Selected File?
Dear J,
Not sure what you try to do in the 'Run script' action and what is the relevance ... but to me it looks perfectly possible to let the flow run as you intend to ... provided that you build in a large Delay or Do Until between the creation of the file and any actions that follow this.
A newly created file needs time to be 'usuable' in the same flow. Try first a delay of 5min (can try reduce later) to use a newly created file.
Happy flowing,
Koen
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2