# LinkedIn — Invitation Manager Accept or ignore pending connection invitations in bulk from `https://www.linkedin.com/mynetwork/invitation-manager/received//`. ## URL filters The trailing slug pre-filters the received invitations. Observed slugs: - `PEOPLE_WITH_MUTUAL_CONNECTION` — people who share a mutual connection - `PEOPLE_WITH_MUTUAL_SCHOOL` — people who share a school - omit the slug (`.../received/`) for all pending invitations The filter chip at the top of the page mirrors the URL and also renders `All (N)`, `Mutual Connections (N)`, `Your School (N)` — the `(N)` is the authoritative remaining-count for the active filter and is what you loop on. ## Button selectors Each pending-invitation card contains an Accept and an Ignore control. **The aria-label formats are different** for the two buttons — don't derive one from the other: - Accept: `aria-label = "Accept 's invitation"` (note: curly `’`, not ASCII `'`) - Ignore: `aria-label = "Ignore an invitation to connect from "` ```python # Match either — both are unique per card accepts = js("Array.from(document.querySelectorAll('button, a')).filter(b => (b.getAttribute('aria-label')||'').startsWith('Accept ')).length") ignores = js("Array.from(document.querySelectorAll('button')).filter(b => (b.getAttribute('aria-label')||'').toLowerCase().startsWith('ignore')).length") ``` ## Trap: "follows you" cards render Accept as ``, not `