cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
S_J_G
Helper II
Helper II

How do you refer to a file you just created in the same flow?

Dear fellow Users,

 

I have a question regarding using Excel template's. The flow i am trying te create;

Get Fileconent (my excel template) >> Create file (copy of template+current date) >> fill table whit data in newly created Excel file.

 

Copying the file and renaming/filling in table whit data is not the problem. i have created two separate flows that prove this principle. Only I can't successfully combine the 2. How do you refer to a file you just created in the same flow?

 

Some examples would be very helpfull.

 

*PS; i just started using flow, excuse my noob question. 😅

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @S_J_G,

 

Maybe we can do it the other way around instead of copy file firstly.

 

There is a template you have already created, you could following these steps:

fill table whit data in Excel template>>Get Fileconent (your excel template)>>Create file (copy of template+current date) >>empty template file (List rows in a table + Apply to each + delete a row)

Annotation 2020-04-07 133037.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @S_J_G,

 

Use the Create file action instead of Copy file action, it allows you to name the file dynamically, the steps are:

fill table whit data in Excel template>>Get Fileconent (your excel template)>>Create file (copy of template+current date) >>empty template file (List rows in a table + Apply to each + delete a row)

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
SamPo
Power Participant
Power Participant

@S_J_G  When you create a file it outputs an 'itemID' which you can then use to get the file properties on contents from the same flow. See the example below with SharePoint:

 

2020-04-06_1337.png

@SamPo thank you for your fast reply!

Could you be more specific? i added a screenshot of my current flow.

I can't select a table. or do i need a custom values? 
image.png

 

SamPo
Power Participant
Power Participant

@S_J_G  You can't use the table dropdown when the file itself is dynamic because the flow doesn't know which file to look in. Instead you need to use the option to enter a custom value and manually enter the name of the table. Alternatively you can use a dynamic content item in the custom value if its not fixed. 

Hello @S_J_G

Unfortunately you cannot use a dynamic file name in excel connector. Their is a workaround which you can follow in this blog:
http://johnliu.net/blog/2019/5/workarounds-needed-to-use-the-excel-connector-in-microsoft-flow

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





@Jcook ty for your replay.

To be honest, this is way above my skill level....

I broadly understand what they are doing. but i am already stuck the HTTP request.

If you want to help me you really have to explain it step by step, but I understand that this takes too much time.

So I probably have to try something else get the same result. or just manually copy/rename my excel files.

 

I am gonna leave this post unresolved, because i really dont know for sure.

Maybe someone else will find this conversation useful. 

 

Ty for your time @Jcook /@SamPo 

#Nooblife#GetGood

 

 

 

 

Hi @S_J_G,

 

Maybe we can do it the other way around instead of copy file firstly.

 

There is a template you have already created, you could following these steps:

fill table whit data in Excel template>>Get Fileconent (your excel template)>>Create file (copy of template+current date) >>empty template file (List rows in a table + Apply to each + delete a row)

Annotation 2020-04-07 133037.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-litu-msft 

 

Thank you!  this is exactly what i need.

only one problem remains. renaming the copied fil. how do you formulate the custom input so that it always takes name + date.

 

Destination site input: folder/expression 'formatDateTime(utcNow(), 'yyyy-MM-dd')' does not work.

should i use custom input at "if another file is already there"? how would i formulate that?

 

image.png

Hi @S_J_G,

 

Use the Create file action instead of Copy file action, it allows you to name the file dynamically, the steps are:

fill table whit data in Excel template>>Get Fileconent (your excel template)>>Create file (copy of template+current date) >>empty template file (List rows in a table + Apply to each + delete a row)

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Top Solution Authors
Users online (4,256)