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

Date and time stamp for renaming an attachment and saving into dropbox

I have duplicated a flow that was shared on this forum that saves an attachment into a specified folder location on dropbox

 

It looks like this

 

Capture.JPG

 

The expression used in compose is 

 

concat(formatdatetime(triggerBody()?['DateTimeReceived'],'yyyy-MM-dd-hhmm - '),item()?['Name'])

This works perfect for us and creates the file as asked however all Flow procedures work in UTC timezone which makes the file name false, bhind by 9 hours

 

I need to add this code below somewhere to make the file create with the correct date and time stamp

addhours(utcnow(),9
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Date and time stamp for renaming an attachment and saving into dropbox

Hi @ Flowhelpplease,

I would offer you two methods to solve your problems.

 

Method 1:

You could modify the expression in compose as below:

concat(formatdatetime(addHours(triggerBody()?['DateTimeReceived'],9),'yyyy-MM-dd-hhmm - '),item()?['Name'])

 

Image reference:

 1.png

When an email with attachment arrives, the flow would run successfully as below:

 2.png

 

Method 2:

You could add a “Convert time zone” to convert the UTC time zone to your destination’s time zone as screenshots below:

3.png

 

Note:

  1. The Base time field of the “Convert time zone”action choose the “Received Time” dynamic content of the trigger, choose the “(UTC) Coordinated Universal Time” in the “Source time zone” field, choose your destination’s time zone in the “Source time zone” field, fill in the Formate string field as my expressions.
  2. Fill in the expressions in the Compose field as below:

concat(body('Convert_time_zone'),item()?['Name'])

 

When an email with attachment arrives, the flow would run successfully as below:

 4.png

 

 

Regards,
Alice Zhang

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Date and time stamp for renaming an attachment and saving into dropbox

Hi @ Flowhelpplease,

I would offer you two methods to solve your problems.

 

Method 1:

You could modify the expression in compose as below:

concat(formatdatetime(addHours(triggerBody()?['DateTimeReceived'],9),'yyyy-MM-dd-hhmm - '),item()?['Name'])

 

Image reference:

 1.png

When an email with attachment arrives, the flow would run successfully as below:

 2.png

 

Method 2:

You could add a “Convert time zone” to convert the UTC time zone to your destination’s time zone as screenshots below:

3.png

 

Note:

  1. The Base time field of the “Convert time zone”action choose the “Received Time” dynamic content of the trigger, choose the “(UTC) Coordinated Universal Time” in the “Source time zone” field, choose your destination’s time zone in the “Source time zone” field, fill in the Formate string field as my expressions.
  2. Fill in the expressions in the Compose field as below:

concat(body('Convert_time_zone'),item()?['Name'])

 

When an email with attachment arrives, the flow would run successfully as below:

 4.png

 

 

Regards,
Alice Zhang

View solution in original post

Highlighted
New Member

Re: Date and time stamp for renaming an attachment and saving into dropbox

Perfect, thank you Alice!!

Highlighted
Frequent Visitor

Re: Date and time stamp for renaming an attachment and saving into dropbox

Thanks a lot 🙂 your Solution worked a great to me

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (817)