With the events that have stemmed from due to COVID-19, our lives are a bit more intertwined. What we once took for granted is now an issue of communication and support from remote locations. With platforms like social media and Zoom communications, keeping up with our family, friends, and team members is more essential than ever before.
The Reliable Friend, a content automation robot, was designed to break apart the absent communication. This bot is part of six innovative and customizable robots created by UiPath – designed as your opportunities to get a jump start on your path to successful Robotic Process Automation (RPA). This robot is your ideal tool for remembering important dates and showing your friends how much you care! It will post a Facebook birthday message for you so that you never have to worry about missing those special dates again.
You can also customize your message to include reminders about upcoming dates, and even include Amazon purchases for a fun, friendly birthday surprise!
Using this social media automation bot is a great way to learn how to store credentials, web automation, and data scraping.
How to use Reliable Friend: The UiPath content automation bot
This workflow will post “Happy Birthday” on your friend’s Facebook wall. Your workflow will be broken into three sequences in one workflow:
1. Log into Facebook2. Scrape birthdays
3. Say "Happy Birthday!"
1. Log into Facebook
1) Start a Flowchart project called ‘Facebook Birthdays.’ Click on activities and search ‘sequence’. Drag three sequences and name each one after its responsibility.
2) Click on ‘Log into FB’ sequence to expand it. Use the ‘Get Password’ activity and enter your password in the ‘password’ property and store the output as “facebookPassword”.
3) Drag in the ‘assign’ activity. ‘To’ = ‘facebookUsername’ and the ‘Value’ property will be your username.
4) Next, drag an ‘Open Browser’ into the sequence and enter www.facebook.com as the URL.
5) Drag another ‘Type Into’ into the sequence. Select the password box on the Facebook homepage for the selector.
6) In the ‘Text’ property, enter the ‘facebookPassword’ variable.
7) Drag in a ‘Click’ activity and select the Log in button to make sure you are logging in properly.
2. Scrape birthdays
1) Go to the ‘Main.xaml’ file and click the ‘Scrape Birthdays’ sequence to expand it.
2) In the empty sequence, drag in an ‘Attach Browser’ activity and indicate the Facebook window as your selector.
3) Drag in a ‘’Navigate to’ activity into the ‘Do’ sequence and enter “https://www.facebook.com.events/birthdays" (Make sure to include the quotation marks as it needs to be a string)
4) Click ‘Data Scraping’ under the ‘Design’ tab.
5) Click the first name on the page. When it asks you to ‘Select the Second Element,’ click the next name of the page.
6) Rename ‘Column 1’ to ‘Names’ or simply ‘Name’.
7) Save the output as variable ‘birthdays.’
3. Say Happy Birthday!
1) Go back to the Flowchart and expand the sequence ‘Say Happy Birthday’.
2) Drag in the ‘For each row’ activity.
3) Drag ‘Attach Browser’ into ‘For each row’ and attach it to the Facebook window.
4) Drag in an anchor base. We need this since the input of the birthday text box is not robust, so we need to anchor it to a reliable selector.
5) In the ‘anchor base’ activity, change the property ‘AnchorPosition’ to ‘Top’.
6) Drag in a ‘Find Element’.
7) For the selector in the ‘Find Element’, use this selector:
8) Drag in a ‘Type into’ activity below the ‘Find Element.’
9) Because you anchored it to a reliable selector, your selector can be very simple.
10) Enter what message you like in the ‘Text’ property, then send the hotkey ‘enter.’
How else can you use content automation bots? Some ideas might include teleconferencing through software such as Zoom.
Take it to the next level and use Reliable Friend to connect to Instagram, Twitter, and other relevant communications mediums to build social media automation bots for all of your connections.
Judy Lee is a Content and Communications Manager at UiPath.