cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

adding today's date to attachment name before saving it from email to sharepoint

I receive an daily status email to shared mailbox with an attachment. I am able to save that attachment to SharePoint location. The name of attachment doesn't change but I want to append the date email was received to the attachment name.

 

Here's what I have used:

Expression is :

pkulkarni_2-1606148159507.png

I have also tried this expression:

pkulkarni_1-1606148098608.png

 

Nether of them work.

 

The output I get is something like :

00-16-2020 (+attachment name) [for email received on 16th Nov 2020] OR

01-17-2020 (+attachment name) [for email received on 17th Nov 2020]

 

What I want is :

00-16-2020 (+attachment name) [for email received on 16th Nov 2020] OR

01-17-2020 (+attachment name) [for email received on 17th Nov 2020]

 

Please Help

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@krootzThe file name is not the issue. the date doesn't get extracted properly.

I see you use "MM-dd-yy" and I was using "mm-dd-yyyy".

That did the trick.

 

 

 

View solution in original post

2 REPLIES 2
Solution Supplier
Solution Supplier

@pkulkarni use the concat function to append strings 

 

concat(formatdatetime(triggerOutputs()?['body/receivedDateTime'],'MM-dd-yy'),'<yourfilenameDyanamicContent>','For email received on xxxx')

@krootzThe file name is not the issue. the date doesn't get extracted properly.

I see you use "MM-dd-yy" and I was using "mm-dd-yyyy".

That did the trick.

 

 

 

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (22,712)