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
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
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
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.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (7,893)