Create time folder based on the mail receiving time and date

how to create a folder based on the datetime that we receive the mail?

Hi @Venusha_Sree

Try like this

  • Store the mail message in a variable
  • Loop through mail messages
    • Currentitem.DateAsDateTime or even you give your format like
      CurrentItem.DateAsDateTime.ToString(“dd/MM/yyy”)

image
image

image
image

Hope this helps!!

Regards
Sudharsan

1 Like

Hi @Venusha_Sree
Please fallow these steps.
First I want clear that please don’t create folder with current Datetime. Because when you will try to download more than 2 emails attachments or anything. Its more than 70 percent chance your folder will be replaced.

So avoid from this issue. Make Folder with combination of Mail received data+SenderName.

Follow these steps.
1- use get mail messages activity.
2- for each loop over mail messages.
3- use assign activity to get mail received date.
→ Item.Headers(“Date”)
4- use another assign activity to get sender name
→ Item.sender.displayname.tostring
5- use create folder activity and placed FolderPath+sendername + DateTime

Thanks.
If you face any issue I can help in code as well

hi can you explain in detail and with the code as well

@Venusha_Sree I am sending you a Code

hi have you sent me the code and how are you sending them ?

Hi @Venusha_Sree
First of sorry, I have got a chance today
Here is Code. In code we are making folder with sendername plus received to avoid
replacement of folder in case two users are send email at same time.
CreateFolderWithDateAndSenderName.xaml (9.5 KB)