Skip to main content
Question

Automating Outlook unread emails- rename downloaded attachment file

  • January 14, 2023
  • 3 replies
  • 379 views

Forum|alt.badge.img+1

Hello everyone,

I’m creating a bot to download the files from unread emails in outlook. I was able to assign the existing variables using the dictionary variable for email properties within the loop command, such as sender, subject, received date, etc..., but I was not able to assign a variable to the email attachment’s name. After assigning this variable, I will use the “Rename” action to rename the attachment file saved in the directory with the saved variables (emailReceivedDate, emailFrom, emailSubject).

 

Does anyone know how can I find the the email attachment’s name to assign to a variable?

3 replies

Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • January 14, 2023

Hi @Isis 4603 ,

 

It may not be the cleanest solution, but you could loop through the emails and save them to a directory. Later, loop through each file in the directory to retrieve the filename. Once you get the filenames, you can either keep those files or delete them.

 

Hope this will help.


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • January 18, 2023

Thank you, but I still don’t know how can I assign the emailReceivedDate+emailReceivedTime+emailFrom to the name of the downloaded file.

I was planning to map a variable to the downloaded file so I could assign the information from the email to the file’s name.

 

Thank you.


Forum|alt.badge.img+1
  • Cadet | Tier 2
  • September 22, 2023

Did you ever have any luck in renaming the attachment? If so, how?