Facebook automation help

Hey guys, new member here and beginner with UiPath and i need some help.

I’m an admin on a Facebook group and i want to be able to approve 50 new member requests (new members who want to join my group) every day and right after that send all those new members a custom message via Facebook’s “Welcome New Members” option that tags all new members automatically.

I had made it work once so all steps i need are there already (on my UiPath workflow) , but the next day or after closing and reopening the browser it wouldn’t complete all the steps until the end for some reason and i couldn’t figure out how to make it work consistently every time.
I think the main issue is when it’s trying to send the welcome message to the new Facebook group members and i’ve added a “click image” activity there instead of a “click element” or something like that and that’s why it’s not working consistently. I did that cause i couldn’t make it work with “click element” at all as UiPath wouldn’t recognize the correct element properly.

Here’s the link to my workflow: Dropbox - ApproveNewFbGroupMembers.zip - Simplify your life

I think i probably just need to figure out how to make it work with a “click element” instead of a “click image” activity as the other steps seem to work fine.

Also here’s a screen capture video of the exact steps i need UiPath to take in case that helps: Dropbox - FB group capture-1.mp4 - Simplify your life
I only approved 10 group members on the video instead of 50 which is the correct amount.
At 0:41 it clicks the “Write Post” button on the right in case it’s not visible.
Any help would be much appreciated.

Yes you have a problem your selector are empty:

it means you have the sreanshot but the robot dont now what to do.

1 Like

Ok i see, but how can i find what value i should enter for the selector there?
It worked a few times at first so i think that maybe the value changes after reopening the page on the browser but not really sure.
From what i’ve read i may need to use a wildcard * but i’m not really sure what exactly i should enter there.
Can you please be a bit more specific on what i need to do to fix this or maybe direct me to a tutorial about this so i can figure it out?

use click and dont use click image it will work

I already tried that several times but i couldn’t make it work with “click element” at all as UiPath wouldn’t recognize the correct element properly. That’s why i used “click image” instead cause at least that way it worked but only a couple of times and not consistently. Any ideas why click element doesn’t work in this case?

yes, see inside the selector of the click activity if you find any idx or something like that that change every time you refresh your browser or every time you close and open the browser and thats what you need to change the selector its probably dynamic

1 Like

Yes i think that’s true cause i see for example idx=‘1’ on the selector but after refreshing the page it changes to idx=‘3’ or a different number.
I tried using a wildcard so it’s idx=‘*’ or idx=‘?’ and also tried removing the idx completely but then it’s not validating and not finding the element for some reason.
Is it possible to remove the idx attribute completely somehow if i have added other attributes such as aaname or tag etc without getting validation error?
Or any other suggestions how to fix this?

Ok but you can encrement this values by as a variável int and foreach row assim int=int +1 then in tour seletor Change idx=“1” to idx=‘“int.tostring”’ this will give you for each row +1

Like row 1 = to idx1
Row 2 = idx2

Remember if tour first row have the value idx1 tour int must start with 1 if first row idx 2 your int value must start with 2

I’m sorry i’m still a beginner and not really sure i understand how to do that.
Do you mean i should create a variable named int ? And what variable type should it be?
And where should i put int=int +1 etc exactly? Is this the VB expression that i should put under Default?

Ok i will try to explain

1 - Make a variable

2 - If your dynamic element is biguer then 1 you can start your variable with another number like, imagine your variabe start with 2

Like idx=‘2’

you will use

becouse 1+1=2

Whow to encrement the values


For each row you will give +1 to your int variable
your element have the value 2 → idx=‘2’


next row +1 = 3

next row +1 = 4

next row +1 = 5

understand ?

1 Like

Ok i did this but what should i put where you’ve put “YourDT” on For Each Row ? It says “YourDT” is not declared.
Do i also have to create a datatable and how should i do that exactly?
I’ve attached my workflow so far in case it helps. Maybe if it’s not too much trouble if you can fix the file and resend it so i can check what you did it would be much appreciated.
ApproveNewFbGroupMembers.zip (3.8 MB)

YourDT means your current DataTable just that :slight_smile: i was just doing a test. I already download your last work but im just using community version on this machine sry

Hi again,

i already see you flow and its not very nce :frowning:

You have to change your dynamic elements
1 -

Most of your elentes dont have selector

2 -

I just can help you now becouse im not Admin in your facebook page and i cant see what is needed. Sry

1 Like

Those elements without selector still work fine so i think there’s no need to change those for now.
Everything works as expected with the workflow but the only issue i have is some Type Into activities that include dynamic idx elements that change between 3 and 4 (idx=‘3’ & idx=‘4’) so those don’t work consistently after i refresh the page.
I was able to remove 1 of those idx’s on one of the steps after i added a url attribute but all the others don’t validate if i try to remove them.
Using idx= ‘*’ or idx=‘?’ doesn’t seem to work either for some reason (can’t find element error i think).
Is this what the For Each Row activity is used for? And if so how can i set it up so it can accept both idx=‘3’ & idx=‘4’ or how does that work?
Can you tell me what specifically i should put in place of “YourDT” as i’m not sure what i should put there? Eg do i put the name of the activity that has the idx and i’m having trouble with eg Type Into ‘SPAN’ ?
Thanks for all your help i appreciate it.

@ terryoi i made you a workflow that will work in any facebook group


What you need to do:

Here is in what you need to change

what you need to change - Your Admin Email and Password And group ID

In 2 flows you have a welcome mensage you need to change

how it works.

1- Go to Facebook Page
2- See if need to login and login
3- If not attach the facebook page request and see if accept botton exist send the welcome mensage by facebook mensager
4 - Close mensager
5 - accept the request
6- Loop and see if is another one to accept
7- If yes starts from 3 poit
8 - Else will close your facebook page and end execution

Main.xaml (52.8 KB)

I hope you like

1 Like

Hey many thanks for that, but i’m afraid i don’t think this will work for me as it’s not really what i need it to do.
Can you check my previous message and see if you can help me with that please? I basically just need to fix those dynamic idx’s so they can take either 3 or 4 (? or * didn’t work for some reason) as everything else works exactly as i need it to. Is that possible?

Hi, if u want it work with idx =3 or in idx=4 ( if u sure that this is the only change happening every time u refresh) you can do try catch activity put the activity with selector idx=3 on the try and put the other one on catch part. So that it will try on 3 first if not found it will go to 4.

But if you it will vary in different idx number ( not only 3 or 4) delete the idx and find the more reliable selector. On the selector tree.

If you wanna work with image u can also try computer vision cv scope activity to recognise all element.

Hope helps

I’ve just got a similar issue with UiPath and, unfortunately, none of the suggestions I managed to find online worked. Is there anything more I can try?