- type: say
message: >-
๐ก To begin, open any LinkedIn group, join it and navigate to the members
list page.
- type: ask
param: targetProfileCount
message: How many LinkedIn profiles would you like to extract?
options:
- label: ๐ค 100
value: 100
- label: ๐ฅ 1k
value: 1000
- $custom
default: ''
vision:
enabled: false
mode: area
send: true
hint: ''
optionsInvalid: false
- type: js
code: |-
async function scrollAndCollectProfiles(targetProfileCount) {
const config = {
scrollDelay: 2000,
maxRetries: 3,
selectors: {
showMoreButton: '.artdeco-button--1',
memberContainer: '.groups-members-list__results-list a',
name: '.artdeco-entity-lockup__title',
status: '.artdeco-entity-lockup__subtitle'
}
};
const profiles = [];
const uniqueProfileLinks = new Set();
let retries = 0;
async function scrollAndWait() {
window.scrollTo(0, document.body.scrollHeight);
await new Promise(resolve => setTimeout(resolve, config.scrollDelay));
}
function extractCurrentProfiles() {
const containers = document.querySelectorAll(config.selectors.memberContainer);
let newProfilesFound = false;
containers.forEach(container => {
const link = container.href;
if (!uniqueProfileLinks.has(link)) {
const name = container.querySelector(config.selectors.name)?.textContent.trim() || 'No name';
const status = container.querySelector(config.selectors.status)?.textContent.trim() || 'No status';
profiles.push({ name, status, link });
uniqueProfileLinks.add(link);
newProfilesFound = true;
}
});
return newProfilesFound;
}
while (profiles.length < targetProfileCount && retries < config.maxRetries) {
const newProfilesFound = extractCurrentProfiles();
if (profiles.length < targetProfileCount && !newProfilesFound) retries++;
else retries = 0;
await scrollAndWait();
const showMoreButton = document.querySelector(config.selectors.showMoreButton);
if (showMoreButton) {
showMoreButton.click();
await scrollAndWait();
}
}
return profiles;
}
return scrollAndCollectProfiles(targetProfileCount);
param: json
timeout: 300000
args: targetProfileCount
- 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
This automation command is created by a community member. HARPA AI team does not audit community commands.
Please review the command carefully and only install if you trust the creator.
All rights reserved ยฉ HARPA AI TECHNOLOGIES LLC, 2021 โ 2025
Designed and engineered in Finland ๐ซ๐ฎ