Advent Challenge #3

Welcome to the 2020 Advent Challenge #3!

Earn Stars :star: to increase your chances to win a prize :gift: More info here

All users are welcome! :innocent: (You can still join at any point, even if you haven’t completed any of the previous challenges)

image

After the travel, Santa had a nice stay in Copenhagen. In fact, he enjoyed it so much that he overslept today and while he was rushing to check out of the hotel, he forgot his book with all our wishes!

Thankfully, he is used to travelling through clouds where he is also always backing up his long lists.
He now needs help fetching them from different clouds. The wishes are all password protected, but he will be able to access them just fine and simply needs the files to be retrieved (Santa can easily access locked spaces, but he wouldn’t want to risk breaking the GDPR rules by exposing people’s wishes).

Santa would really like some help collecting all his files! Could you help him?

*Please include in your reply which challenge you are solving - “Beginner” or “Advanced”

Beginners Advent Challenge #3

Santa has found this handy list of backed up files on his mobile:
gifts_beginner.xlsx (8.8 KB)

To Complete the Beginner’s challenge for Santa:

  • Download all files from the list
  • Send the files to Santa’s email address: uipath+santa_files@discoursemail.com (please include either beginner/advanced in the title, as well as your Forum username)
  • Upload evidence (i.e. screenshot/s) that you successfully obtained the results using UiPath.
    • Suggestion: Share some screenshots of your workflow
    • Or Upload your XAML in your reply

Advanced Advent Challenge #3

Santa has found this handy list of backed up files on his mobile:
gifts_advanced.xlsx (8.9 KB)

To Complete the Advanced challenge for Santa:

  • Download all files from the list
  • Combine all files into one archive
  • Send the resulting file to Santa’s email address: uipath+santa_files@discoursemail.com (please include either beginner/advanced in the title, as well as your Forum username)
  • Upload evidence (i.e. screenshot/s) that you successfully obtained the results using UiPath.
    • Suggestion: Share some screenshots of your workflow
    • Or Upload your XAML in your reply

Deadline:

Submissions must be posted in this thread and will be accepted until 2020-12-09T22:59:00Z

Bonus points will be awarded for pop culture references, creative solutions and responses :smiley:

Santa is still considering his next city to visit :slight_smile:

Good luck :four_leaf_clover:
Santa Steve & Jingle-Bell Jensen (@Steven_McKeering & @AndersJensen)

8 Likes

Santa! After you go to Europe go back again to Asia and visit us in Singapore! :hugs::hugs::hugs::hugs:

3 Likes

Beginners Advent Challenge #3

Santa is a poor man, he has no Excel available so he has to import the data as CSV file. Santa also has Christmas wishes, an office suite. :gift:

With a tiny VB routine in a loop Santa downloads all the files from the list. Then the downloaded zip file are added to the MailMessage attachments of the Send SMTP Mail Message activity.

Dim WebClnt As WebClient = New WebClient
Dim Target As String
Dim TargetArr() As String

Try 
  TargetArr = Source.Split("/".ToCharArray())
  Target = TargetArr(TargetArr.Length - 1)
  WebClnt.DownloadFile(Source & "?dl=1", Target)
Catch ex As Exception
  Console.WriteLine(ex.Message)
End Try

Dim Attach As Attachment = New Attachment(Target)
MailMessage.Attachments.Add(Attach)

image

And last but not least everything is sent via SMTP. Yes, not via Outlook, Santa does not have this office application either. This has the disadvantage that the attachment does not contain the individual zip files, it contains only one EML file which contains the zip files.

Santa checks this with an EML viewer.

Santa is happy again. With a cheat sheet to @Anna_Maziarz solution and the hints of @SamiKiran it was possible to pass this challenge correctly. Many thanks to both :slightly_smiling_face:

9 Likes

Advanced Advent Challenge #3

Based on his beginner’s approach, Santa has adapted the workflow somewhat.
He adds the DotNetZip activity to compress the downloaded files.

image

image

Apart from minor adjustments, the same approach could continue to be used.

Now Santa is looking forward to the next advent challenge.

image

And the elf is sad because he could not support Santa this time.

9 Likes

super sir @StefanSchnell but i am doing the same thing using c# and downloading files…

i have 2 clarifications sir…

  1. how did u use smtp for final compressd file gmail not allowing… :frowning:
  2. did u use async for file wait…

i am not do as i am fresher but i am willing to learn sir… u can send the answers in private… thnx sir…

3 Likes

Beginner
Hello Santa ! :santa:
This time I asked minions to help me solve your problem. They turned out to be very hardowrking and helpful. See how they dealt with it.


pobrane

The minions didn’t wait a minute and went straight to work. First they started with a break :banana: :sandwich:
20130701-minions-afp

Okey, now the Minions can get to work. They downloaded all files from the gifts_beginner file by using HTTP Request activity and adding “?dl=1” at the end of the each url address.


You will find the result of their work in your mailbox. :mailbox_with_mail:

But I know how busy you are so I add a message here as well. (The Minions are very modest and signed themselves as Robot :robot:)

For now that is all and the Minons wish you:
images

7 Likes

@SamiKiran

Hello Kiran,
thanks for your reply. Interesting, I don’t know that SMTP doesn’t supports binary file attachments. I tried it with another email address and here it works, so I assume it works in any case.

image

I have to readjust it.

Best regards
Stefan

2 Likes

@Anna_Maziarz

Hello Anna,
excellent :slightly_smiling_face: ?dl=1
Best regards
Stefan

2 Likes

@StefanSchnell thnx… how u use code to download… i see web client but its not downloading the complete file… can u pls share it with me? i am not going to submit my response… i am just started with uipath so i dont know much…

plz sir… :pray:

2 Likes

@SamiKiran

Hello Kiran,
correct, it seems that the WebClient class is not the best approach for this challenge.
I will try to adjust that.
Best regards
Stefan

2 Likes

@StefanSchnell sir, i tried writing vb code sir but the issue is that before the current file download is finish, it download next file so full file size is not download… i google and it says use async… am dont know that so asking for code to learn… :pray:

am dnt know how to do this… but am learn sir… surely one day am master this…sorry for my english… am improve that too…

1 Like

I am getting this error when sending the final file… via smtp… am not have office/outlook accounts… am student…

any help is appreciated :slight_smile:

image

@loginerror @StefanSchnell

1 Like

Thank you @StefanSchnell :grinning:

1 Like

Hi @SamiKiran

It looks like Gmail is protecting you from harm here:

(although the files are just password protected zips of text files…)

If you won’t be able to make it work, simply send them over via Forum private message to me @loginerror (can be manually, just make sure to describe how you retrieved them in this topic first and link your reply in that PM you send me :slight_smile:)

1 Like

Advanced Advent Challenge #3

Dear Santa,

my name is Dr. Jones, I am an expert in retrieving very precious items that have been lost!
image

I’ve discovered the file based on the list you sent me
image

But all those files are in different sites!!
image

Ok, then I’ll be using my whip to retrieve all the cases, using HTTP Request
image

And since the sites can be different, I’ve used many Url concatenations based on the type of file storage…

Dropbox
image

Drive
image

Sharepoint
image

BOX
image

Now I got all the files!! But I need to compress them using a little bit of coding

image
image

And finally, I can sent your precious book to you!
image
image

Merry Christmas, and if you need anything just give me a call, I’m just hoping I won’t be…unable to help you.
image

AdvChallenge3.xaml (15.7 KB)

7 Likes

Beginner
Hello Santa!
The wishes is sent to you in mailbox.
wishes
Main.xaml (33.1 KB)

4 Likes

Advanced
There is the second part of the minions’ work :wink:

For each type of source was used another endpoint in HTTP Request activity.
Dropbox : image
Google drive : image
Sharepoint : image
Box : image

Then the downloaded files was compressed and send to Santa :slight_smile: :mailbox_with_mail:

5 Likes

I’m really enjoying all the solutions so far!

But please also give some love to UI Automation :smiley: We would like you to try out the modern UI automation:
image

2 Likes

To stay in touch with the jolly Christmas spirit, Santa decided to model his flow in an alliterating fashion. The flow consists of three core components:

  1. Bring_Back_Beardy_Backups.xaml

  2. Combine_Christmas_Components.xaml

  3. Merry_Mailer.xaml

Bring_Back_Beardy_Backups.xaml loops through gifts_advanced.xlsx and navigates to each of Santa’s sources. To prevent the need for using different selectors, Santa programmed his ‘Click Download button’ activity as a try-catch:

First, Santa’s robot helper will try to click on a selector that contains ‘download’ within the ‘aria-label’ attribute: image
If that doesn’t work, the robot tries using a different selector: image
This way, the robot will be able to find the download button on all of the source websites.

After downloading each beardy backup, the robot proceeds to Combine_Christmas_Components:


Here, each ‘Christmas component’ is extracted into a combined archive.

Finally, Santa’s robot helper emails the Combined Christmas Components within the “Merry_Mailer” workflow:

4 Likes