Download attachment from link based on latest email from outlook with the subject

Hi All,

I have to download an attachment by clicking link we are received latest email from today and with the subject. how can i do create workflow. Any sample workflow would be greatly helpfull.

Thanks,
niranjan

Hi @niranjan.kummara

  1. Use the “Get Outlook Mail Messages” activity to retrieve all the emails in the inbox.
  2. Add a “For Each” activity and iterate through the list of emails.
  3. Inside the “For Each” loop, use an “If” activity to check if the email subject matches the specific subject you’re looking for.
  4. If the subject matches, use the “Save Attachments” activity to save the attachment to a specific folder.
  5. Use a “Break” activity to exit the loop once the first matching email is found.

Happy Automation, Cheers!

1 Like

@ABHIMANYU_THITE1 I tried but i have multiple email with same subject. I have to pick latest email and download.

Hi @niranjan.kummara,

  1. Use the “Get Outlook Mail Messages” activity in UiPath to retrieve all the emails with the specified subject.
  2. Sort the retrieved emails based on their received date using the “Sort Data Table” activity. You can sort the table in descending order to ensure that the latest email is at the top.
  3. Retrieve the first row from the sorted data table using the “Select Item” activity. This will give you the latest email.
  4. Use the “Save Attachments” activity to download the attachments from the latest email.
1 Like

@ABHIMANYU_THITE1 Im new to UiPath. im getting some unknown errors.
can you please help me with sample workflow.

Hi @niranjan.kummara ,

just need to be clear, if robot click the link… is it automatically download the file or it need more one click activity to click download again?

Regards,

Hi @niranjan.kummara ,

Check this Workflow
GetMailMessage.zip (231.8 KB)

Sample Regex : regex101: build, test, and debug regex

Regards,

1 Like

@aliaga If we click the email link attachement will download, robot need to click that email link im receiving daily.

@aliaga It is reading all the body of message, including links. Here im getting error Goto URL

Go To URL: Required argument ‘URL’ was not provided.

Any suggessions please.

Hi @niranjan.kummara ,

Is your problem has been solved?
Let me know if you still facing some issue.

Regards,

@aliaga thank you i got error on RegEx. some how it is working i have marked this as resolved.
kindly suggest what are best websites to learn RegEx. i want to get more understaning on using RegEx tool. Thanks

Hi @niranjan.kummara ,

Glad to hear that,

Website for learn regex : Regex 101 - EN
Website to test regex expression : https://regex101.com/

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.