Sourcing Automation with Microsoft PAD - We cracked the code!

VITAL-BARITONE builds a Power Automate Desktop flow that pulls LinkedIn profiles from a list, navigates to each person's activity feed, and auto-likes their recent posts. The demo covers extracting profile URLs, appending the activity path, handling DOM patterns and UI selectors, and troubleshooting when profiles have no activity to like.
Chapters
All right, welcome everybody. It must be Friday if I'm doing Shelly's Alley again. And of course, you know what the topic today is going to be. Clearly, it's going to have to be Power Automate Desktop, PAD for short. Today I want to try something a little bit different. So Glenn Guttmacher and I have been brainstorming, and I also got a couple of, um, other messages from some folks in different groups asking about something that is more, more different, better, however you want to look at it, but something that isn't doable with your basic scrapers that put things into Excel, like Instant Data Scraper and DataMiner and Octoparse and all those. So I threw back and forth some ideas, and one that really stuck out was the possibility of being able to put people into a project And then on, let's say for example, LinkedIn, which could be LinkedIn Recruiter, or it could be LinkedIn vanilla, right? LinkedIn.com. So putting people into a project and then being able to click on their, their status updates or their posts, like, like their posts or something like that. So something that you— it's really time consuming and to do it manually one at a time would be pretty, well, pretty intense. Probably something you really wouldn't even do because it takes a long time unless it's a very narrow audience and so on. So that would probably be the one way that you could potentially make it worth your time. But if you could put them into a project and do them in a batch, that might actually be a pretty good way to do it. That would make it easy so you could actually do it and not have to limit yourself to just a small group. So that's what got me started. And I was just going to give it a try with a project that I've been recently trying to hire a part-time sourcer, a researcher to come work with us. By the way, if you know anybody or you're interested, you know how to find me. And so I did some searches on LinkedIn and put people into a project, and I thought maybe I could try that destination or that project as an example today. Now, mind you, this is pretty raw, and by raw, I mean, you know, in, in that I've never done this before. It's just an idea, but I think it's doable. So here we go. I'm going to share my screen. And I'm hoping, uh, at some point Glenn can join us. By the way, or you want to come into the video here, just go to srcn.co/zoom. That's srcn.co /zoom. I'm going to put it up in a little notepad here. srcn.co/zoom, if you are basically— so that'll bring you into the room and you'll go into the quote-unquote waiting room and I can click you in and then you ask questions live, or share your screen. If you're interested in this and you want to try it out, come on over. All right, I have no idea what that was. I literally just got kicked off the internet. The internet kicked me off. It, it looks like you are still live. Uh, yeah, it kicked me off for a minute and then it came back and then you were here. So welcome, Mel. Thanks for joining us today. I don't think I'm sharing my screen anymore, so let me go ahead and redo that. So that's where I was before. Drop that there. Refresh this page. Okay. Sorry, folks, I don't know what happened. I think I literally lost internet for a second there. Just a blip, but I'm back now at a project page that I recently had here open for talent scouts, talent researchers. It looks like it's not going to load. Okay, I'm going to reload the page. There it is, finally loaded. Nope, it loaded and then said something went wrong. Yeah, of course something went wrong. Of course something went wrong. Why wouldn't something go wrong? I'm going to have to start over with the flow here. So we called it LinkedIn Recruiter Status, like. So for liking and status. All right, so my first challenge is going to be to figure out how to tell the robot that I want to click on something that is like a, like a recent post or something like that. So I've got to find that on the page here. Let's see, is it under here? No. Okay, most recent activities. These are my activities. Don't think I have— I'm gonna have to click on the public profile. So let's open profile in a new tab. Not sure it's actually going to show up here. Let's see. Okay, now I'm in the public profile and there's activity. All right, so I'm thinking there's probably a way to take the user's address. Yeah, there is. See that? Okay, check that out. So here's my first clue. When we have the public profile for an individual like that— oh, that's a little bit too big there, let's shrink that down. So there's actually a standard, it looks like a standard format for this, which means that we can take the piece that we already know and, and guess the rest. We know this part, we know that that's the person's public profile, and we got that from the public profile link over here. So this is the project in LinkedIn Recruiter. Clicking on this produces this, and this gives us the address that takes us over here, which is essentially their profile. And that's all the other stuff you don't need. You can ignore all that, the rest of that stuff. Completely. And this is the part that we need. So all we have to do is add this piece here that says detail recent activity. So first step is go to this page, open that link, extract that and store it in a variable, and then append this next piece to that one. So you combine the two together. And that's pretty easy to do. And then we'll actually go to that page. And now the next step is what is here that we can like? So let's say that, you know, we're just going to find that. So how do we find out if this is something we can click on? Well, before I start clicking on stuff, let me just see if I can figure it out from the web automation. I was thinking that probably the best thing to do would be to use either click a link, or there also was a click a button. I'm gonna see click a link on a web page is, is my first action. So before I do anything, I've got to tell it that I want to be in Chrome, and I want to basically use the— I know I'm lazy, I should be launching this in a new one, but I'm going to use a running instance and just attach it to the foreground window. So that just brings me to this page that I'm actively using. So we're there. Now we can use the click a link on a web page, and this is different than the extraction. This is actually an action that is, you know, the robot is doing something different than just parsing data. So it's asking me what browser— it's the one that I just identified— and what's the UI element. Well, there aren't any, so I'm going to have to identify a new UI element, which is why it brings me over here, and then I can Similar to the parsing robot, I can use this to identify UI elements. And the one that I see that I like, pun intended, is this one called like. So let's see if I can control left-click. That's how you select it. So we're going to control. Oops, I browsed away from it. Control-click. And number 662, I think that might be it. Let's try it and see what happens. Save. All right, so I'm just going to test this. Basically, I'm going to say, click this like button, see if it works. Interesting, it liked it. I like it, and I like it. Okay, so Now my next task is to see if this works with a different profile. So I'm going to find somebody else. Again, how we get here is not going to be a huge challenge, so I'm just going to skip ahead to open the profile in a new tab, and I'm going to test out my theory, which is that if I can just take this piece, which is the person's, you know, public LinkedIn profile minus all that, then I can just append this. So if my theory works by doing this, I will get to this individual's activity feed. One thing I'm curious about is what if they don't have one? That's possible, but I think it'll just— we can have an escape clause that, that if error just skips to the next profile. So, oh, there's an activity feed. Okay. Now from here, I'm going to run this again and see if it actually clicks like on the very same element. See what happens. Aha, it did not find the element, so that means that must be a different pattern. So let's see if I can add a new UI element that might identify what this looks like. And this may be because of the button. It may be— oops, that's not what I meant to do. That's what I meant to do. So Ember 412. So I'm wondering if it's just Ember that I need. I can modify that to be that. Let me try. A different one. Let's see if I can use the like. What does that say? Art Deco button text reaction button text. Okay, and let's try the thumb. Oh, that's an unexpected one. All right, well, let me try to select the Art Deco button text react button one. And see if this one works. So I just switched elements from the whole grayed out thing to just the word like and see if it's actually going to click it this time. And survey says apparently service has— Sally did not click play. Ah, yeah, that's what happened. I had not clicked play. Oh, there we go, that worked perfect. Okay, now just to make sure, one more test, and then we can build the previous step, which is extracting the link from profile, and see if that works. So once again, I believe this actually— this does work. So the adding of detail works. And I believe we now have the right element. So let's put the two together. We've got public profile, copy link. We just need that. And theoretically, all we have to do is add this little piece here. And it should now work. So by work, what I mean is it should now take me to the page is this person's activity feed, not this person's profile. So far, I haven't encountered someone without activity, but I'm sure that's going to happen at some point. Okay, there we have the feed. Now we're here. Let's see if the same element that we tried before works again. If it does, then we've tested. Remember, it's, you know, trust but verify, right? If you think it worked the first time, go ahead and test it a couple times to make sure you don't get hung up. And sure enough, it says it failed. Okay, why did it fail? Let's see. Now, if I wanted to get fancy with this, I can probably just go in there and look at the code and all that, but, um, I don't want to have to show you that because that's going to be a little bit harder for people to figure out how to do on their own. So if we can troubleshoot it visually, I would rather do that. Okay, try this again. What I did is I reselected the text because I think it might have gone back to the previous element. Nope. Okay, it doesn't like it. All right, so what do we have so far? We have the Art Deco button and we have the the Mercado match, and then we have that other one that's the original one. So let's see if this one works. It doesn't look like it's going to work because it would have already done it based on previous experience. All right. So since that's not working, then maybe we can go to the Ember one because that definitely looked like it would work and see if we can— there used to be an advanced, or there was an advanced here before on the other one. I'm not sure if it's there now. Let me see if I can select it again and see if I can bring up the advanced. No, it's not going to let me do a pattern. Hmm, but I noticed that this Ember has a different number in it, so I wonder if I can do a regex. Again, not something I want to dig into right now, but you can probably create a pattern that says click on the button, the first button on the screen that shows Ember for that whatever number is. And out of curiosity, I'm going to take a look and see what the other like button is before, uh, below that, right? So that was The first one. Let's see if the second one is the same ember or is it different. Ember 341. Okay. And this one is ember 200. So I'm not exactly sure where that pattern is coming from, but I think I probably figured it out. All right. So that's not going to happen easily. There's another way we can do this, which is literally to find a button, and there's another way which is to actually decipher the, the HTML behind it, uh, and then there's a third. So there's three ways. There's we can use the button, click a button. We can use the find the HTML. We have to look at the script and see if we can understand what the, um, what the code is behind the button and determine that pattern. And then the other one would be to try to use a positioning of your cursor on the screen. Now, that's not my favorite way to do it because if you have a different size screen or whatever, it's going to change. Now, the good thing is that they recently made an update to using, um, your, your buttons and keyboard and mouse on the screen to make it a little bit easier. So let me go ahead and test that and see if I can get that to work before I decide that that's not the best way to do it. So So that would be basically a web UI. So here's— sorry, UI and automation. So click window, not windows, not form, not data extraction. So it would be click UI element in window. I think that's the one. Oh, but that's going to be— no, that's not going to work because this button is going to be in a different position each time. So that's not going to work. Let's try button. Okay, press button on the web page. Instance browser. So this is different. This is from the web form filling from Web Automation. It's the same browser instance, but now the UI element is looking for a button instead of something else. So let's see if it gives me a different way to select things that might help me distinguish the— oh, hello, add new UI. There we go. That helped me, help me distinguish the button because this is actually tagged as a button as well. So let's see what happens. So I'm doing Control and left-click to select that button. Like Zendesk. Oh, I see. This is the username. I think. I'm guessing, but that's probably it. Hmm. Let's try and see what happens. I think it's going to work because it's based on this user. And by user, I mean, yeah, see, it's based on this Zendesk. So that's why I realize it says Zendesk button here. Let me show you what I'm talking about. It says Like, where was that? Like, like, like, like, like button. Where did it go? Was in here before. Well, let me just redo what I did. I clicked on Add UI Element and then I went over here and selected the button with Control-click. And what I saw appear is not that. The button, shall we? Come on, you can be accurate about this still. All right, never mind. Try it over here. It had showed me click Zendesk button before, so I don't know why it's not showing me that now. Okay, here's the button. Click. Nope, that's not Ember 201. Interesting. Well, looks like I'm not going to be able to figure out the button from here, so I'm going to have to go back to my first option, which is the pattern. That's okay, um, it may not really be treated as a button. So go ahead and delete this one. Go back to the original one, which was to click a link. So back to web automation, click a link on a web page. Let's go to the next person just so that I know I've got a fresh start here. Froze up on me again. Okay, there we go. All right, go to public profile, open profile in a new tab, and the pattern is forward slash detail forward slash recent activity. Oh, just need one forward slash. There we go, that goes there. I really wish they let me edit this from here. Doesn't seem to have the ability to— when I click on these, it doesn't allow me to remove them or delete them or, or edit them or anything. It's like once they're in there, they're just in there. Store it as different activities. I might have to go into the script itself, which is over here on the side panel here to do this, but let's just try one more time from here and see if we can figure it out. So add new UI elements. All right, so we've got this button, or we got the like, we've got the thumbs up, we've got the box. I just tried the box, the whole box that's labeled button. Okay, and that's ember. Then the other one is the one that's called like. It does Art Deco button text React, but that's the one that I think is probably gonna be the best one because it seems to have the, the pattern. And then this one I'm not really sure about. Let's try this one first. Yeah, see, it doesn't let me edit it once it's in here. Let's see if I can do it from here. Nope. Okay, well, let me test it, see what happens. As before, I think it's going to work on one, but it won't work on the next one because I think there might be some code behind it that's identifying the user or the post. Yep. See, it worked. But if I go to another person's profile, it's probably not going to work. I'm guessing. Oops, I clicked add phone number instead of the— okay, open profile in new tab, and our code is just detail recent activity. At the very least, I think I can show you how to put this together so you can get to that page, and then we'll add the, the like clickability to it afterward. But I'm just going to test this one more time, see if my theory is correct, that it's this MercadoMatch thing here is still not going to work on this one because it's a different profile. Let's see. So that's where I'm going to have to use patterns to do it. Yep, it didn't do it. Click on web page link failed. All right, that's okay, that's all right. So let me at least show you how to get the other pieces to get to this point. So when you're in your project here You'll need to extract the public profile link. Now, fortunately, this is already made very easy for us. So all we're going to need to do here is essentially web data extraction, just like before, is the easiest way to do it. But all we're going to do is we're going to grab in the variable, we're going to grab the address that comes up when you click on this and you'll see the parser picks it up pretty easily right there. So it's going to pretty much just pick that up and store it in memory. And we'll call this— let's rename this to be public profile. URL. Share this with someone else. And then to go to that page but add the other piece. So we need this text here. And the thing that we learned before about spaces and how URLs work I don't know what just happened. Detail slash, uh, oh, my screen's not even shared. Sorry about that. Okay, so it's the public URL link that we grabbed from here. Add to that this— you don't actually need the forward slashes, etc. So, um, well, actually you do need the forward slashes, I'm sorry, but you don't need the spaces. So we're just going to add detail recent activity to that, and I believe that that should work. So if this works, then the idea is that it's going to grab the LinkedIn profile link and then navigate to the page of that person's social media— well, not social, you know, their status updates. So let's try it. Looks like it grabbed it, stored it into a variable, and— oh, bad request. Okay, so some— did I accidentally put the spaces in there? Okay, see, the spaces are there, so we don't need any of this. We just need That. So how do we— if I fix it, it'll work, right? Yep. Mistake. Let's try it this way. Or We try one other thing. We try this, save it, and I'm going to set another variable. Although technically it's not really a variable, but let me just use this temporarily as a variable. Okay, so we're going to set a variable right before this called status update or Status. I guess I'll just call it status. And it is this that we need to append. That's what that's going to be. The reason I'm doing that is because I want to see what happens if I actually put these two together and I just basically go from one variable or one value of a variable directly to the other one. Like that. And I think that actually will put them together nicely. So let's go back to the original page and make sure this works before I leave you guys with something that doesn't work. Pull up one more profile from the project. Just going to go to this one here. Remember that this is right now extracting it from the pop-out or the, you know, the slide-out. You can still do this from the results page too. You don't need to have the slide out, but I just we just grabbed it from here. So maybe next time I can show you how to do it just from the results list, which may save you an extra step because you don't have to come in here. But right now I'm going to go ahead and run this, and the idea is it's going to extract the public profile and then append the details to it and then load that page. If it works, then I can, you know, set this up for you guys and we'll finish it up next week. Ah, did not work. Okay, so why didn't it work? There's the URL, but the other piece they got— there's a space here. Aha. Okay, see that? It did not need to be in there. Gotcha. Okay, I know how to fix it, but unfortunately we are over time. So, um, let me solve that, put it together, and then I'll take a screenshot of the script. It's actually a lot easier than you, than you think. It's basically open a Chrome, then extract the URL, then append the other one. But I forgot about the, uh, the spaces and, and forward slash characters and special characters, so I've got to fix that. So, all right, well, that is it today for Shelly's Alley. We will see you next week. Take care, everybody. Bye-bye.
More from Shally

Scaling Talent at Hypergrowth: Leadership, AI, and Hiring Excellence with Cindy Nicola









