cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sfeeley
New Member

Adding converted date to file name

Hi,

 

I'm trying to create a flow to get file contents from a template, create a new file and add the current date (in Australian timezone). This is my flow so far but it's not working on the last step.

 

Microsoft flow2.jpg

I'm not sure if the date is working but I can't tell because I can't run the flow due to an error on the OUTPUTS BODY section of the last step ' contains invalid characters. Please use a different name.'

Microsoft flow1.jpg
 

 

The converted time for the file name is convertTimeZone(utcnow(),'UTC', 'AUS Eastern Standard Time', 'yyMMdd')

I'm hoping this should be fairly easy to fix.

1 ACCEPTED SOLUTION

Accepted Solutions
crowdjs
Resolver I
Resolver I

Right before the Create File block that breaks try to generate the filename using a Compose block. 

Really need to see what characters are being produced by the convertTimeZone().

 

View solution in original post

5 REPLIES 5
PrasadAthalye
Super User
Super User

It seems there is some invalid character.. Can you output entire expression including filename to a variable before Create File and see what it shows?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi Prasad, apologies, how would I that? my knowledge of Power Automate is limited.

crowdjs
Resolver I
Resolver I

Right before the Create File block that breaks try to generate the filename using a Compose block. 

Really need to see what characters are being produced by the convertTimeZone().

 

View solution in original post

Sfeeley
New Member

Thanks for your reply crowdjs. I'm not familar with a compose block, could you possibly create a draft of how I would create this?

 

This has worked before but for some reason the file path is being included in the name. See thie picture where the the name is including the / & \

Microsoft flow3.jpg

I would need to specify where the save the new file but simply want the name to be "YYMMDD Holdings & Cash Check"

Thanks @crowdjs - I managed to figure out adding a compose block for the timzone and it worked.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,344)