- type: say
message: >-
๐ก First, search and filter for the people you're interested in. Then run
this command on the results page to send connection requests.
Please note that your LinkedIn interface needs to be set to English.
- type: ask
param: targetProfileCount
message: |-
How many LinkedIn profiles would you like to connect with?
LinkedIn typically limits you to connecting with ~30 users per day.
options:
- label: ๐ค10
value: 10
- label: ๐ฅ30
value: 30
- $custom
default: ''
vision:
enabled: false
mode: area
send: true
hint: ''
optionsInvalid: false
- type: js
code: |
async function connectToProfiles(targetProfileCount) {
const selectors = {
nextButton: '.artdeco-pagination--has-controls .artdeco-button:nth-of-type(2)',
profileList: '[role="list"]',
profileContainer: 'li',
name: 'span[aria-hidden="true"]',
status: '.t-14.t-black.t-normal',
link: 'a[data-test-app-aware-link]',
sendButton: '.artdeco-modal__actionbar button:last-child'
};
const profiles = [];
const processedLinks = new Set();
// Helper function to wait
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
// Click Connect and Send buttons
async function connectAndSend() {
// Find the most common button text, with preference for "Connect"
const buttonFrequency = {};
let maxCount = 0;
let mostCommonText = null;
Array.from(document.querySelectorAll('div.linked-area button > .artdeco-button__text'))
.map(btn => btn.innerText)
.forEach(text => {
buttonFrequency[text] = (buttonFrequency[text] || 0) + 1;
if (buttonFrequency[text] > maxCount) {
maxCount = buttonFrequency[text];
mostCommonText = text;
}
});
// Override with "Connect" if it exists
if (buttonFrequency['Connect']) {
mostCommonText = 'Connect';
}
// Find all buttons with the most common text and filter out muted buttons
const connectButtons = Array.from(document.querySelectorAll('div.linked-area button > .artdeco-button__text'))
.filter(btn => {
return btn.innerText === mostCommonText &&
!btn.closest('button').classList.contains('artdeco-button--muted');
})
.map(btn => btn.closest('button'));
if (!connectButtons.length) return false;
// Click the first valid connect button
connectButtons[0].click();
await wait(1000);
const sendButton = document.querySelector(selectors.sendButton);
if (sendButton) {
sendButton.click();
return true;
}
return false;
}
// Process profiles on current page
async function processCurrentPage() {
const containers = document.querySelectorAll(`${selectors.profileList} ${selectors.profileContainer}`);
for (const container of containers) {
// Stop if target count reached
if (profiles.length >= targetProfileCount) return true;
try {
const link = container.querySelector(selectors.link).href.split('?')[0];
// Skip if already processed
if (processedLinks.has(link)) continue;
// Try to connect
if (await connectAndSend()) {
profiles.push({
name: container.querySelector(selectors.name)?.textContent.trim() || 'No name',
status: container.querySelector(selectors.status)?.textContent.trim() || 'No status',
link: link
});
processedLinks.add(link);
await wait(2000); // Wait between connections
}
} catch (error) {
console.log('Error processing profile:', error);
}
}
return false;
}
// Main loop
while (profiles.length < targetProfileCount) {
const isComplete = await processCurrentPage();
if (isComplete) break;
// Try to go to next page
const nextButton = document.querySelector(selectors.nextButton);
if (!nextButton || nextButton.disabled) break;
nextButton.click();
await wait(2000);
}
console.log(`Connected to ${profiles.length} profiles out of ${targetProfileCount} requested`);
return profiles;
}
return connectToProfiles(targetProfileCount);
param: json
timeout: 300000
args: targetProfileCount
silent: true
- message: |-
**Connection request sent:**
{{json}}
type: say
- param: action
options:
- label: โ
DONE
value: done
- label: ๐ฆ EXPORT JSON
value: export
vision:
enabled: false
mode: area
hint: ''
send: true
type: ask
message: ''
default: ''
optionsInvalid: false
- type: stop
condition: '{{action}} = done'
- what: param
filename: linkedin-group-members.txt
condition: '{{action}} = export'
type: export
param: json
All rights reserved ยฉ HARPA AI TECHNOLOGIES LLC, 2021 โ 2025
Designed and engineered in Finland ๐ซ๐ฎ