500+ Unaccepted LinkedIn Invites. Withdrew Them All in 5 Minutes.
Nothing humbles you quite like seeing how many people ignored your LinkedIn invites.
You know the ones. Sent with good intentions. Part of your founder-led sales play. Prospects you thought would be interested. People you met at events. Warm introductions that went cold.
I'm an Inbox Zero person. It drives me crazy to see clutter. So last week, I decided it was time for a spring clean of my LinkedIn network. The problem? I had over 500 pending connection requests just sitting there. Ignored. Forgotten. A digital graveyard of good intentions.
The Problem with LinkedIn
LinkedIn makes it painfully hard to withdraw sent invites at scale. You have to click through each one individually. Confirm each withdrawal. It's tedious by design.
For 10 invites? Fine. For 50? Annoying. For 500+? Absolutely not happening.
So I did what any resourceful founder would do. I asked Claude to build me a quick script to auto-withdraw old requests. Think of it as spring cleaning for social sellers.
See the product in action
Take a self-guided tour of the Salesmotion platform.
A Word of Caution
DISCLAIMER: Follow at your own risk. We all know LinkedIn doesn't love automation. They have systems in place to detect unusual activity. But this worked for me. No block, no ban, no issues. Your mileage may vary.
I wouldn't normally touch LinkedIn automation if I didn't have to. But manually withdrawing hundreds of requests? Life's too short. Sometimes you need to work smarter, not harder.
“The moment we turned on Salesmotion, it became essential. No more hours on LinkedIn or Google to figure out who we're talking to. It's just there, served up to you, so it's always 'go time.'”
Adam Wainwright
Head of Revenue, Cacheflow
Here's How to Do It
- Go to My Network, click "Show All" on the invitations section
- Click the "Sent" tab and note the total number (prepare to be humbled)
- Scroll all the way down until all invites are loaded (this can take a while with hundreds of requests)
- Right-click anywhere on the page and select Inspect (this is for Chrome users, but similar steps work in other browsers)
- Click on the Console tab in the developer tools
- Paste the script (see below)
- Press Enter and let the magic run
The script will automatically click through and withdraw all your pending invites. Depending on how many you have, it might take a few minutes. Grab a coffee and watch the numbers drop.
Step by Step Video Walkthrough
window.neetoRecord = window.neetoRecord || { embed: function(){(neetoRecord.q=neetoRecord.q||[]).push(arguments)} }; neetoRecord.embed({ type: "inline", id: "57a08b94-de3c-4078-9598-288061588de6", organization: "salesmotion", elementSelector: "#inline-embed-container", styles: "position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;", });
See Salesmotion on a real account
Book a 15-minute demo and see how your team saves hours on account research.
Code Snippet
Copy Code
(async function bulkWithdrawLinkedInInvitations() {
console.log("🚀 Starting controlled bulk withdrawal of LinkedIn invitations...");
console.log("⚠️ Will process 100 invitations at a time, starting from bottom");
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
const waitForUserConfirmation = () => {
return new Promise(resolve => {
console.log("\n⏸️ PAUSED - Press Enter in console to continue with next batch");
console.log("💡 Type: continueWithdrawal()");
window.continueWithdrawal = () => {
console.log("▶️ Resuming...\n");
delete window.continueWithdrawal;
resolve();
};
});
};
let totalWithdrawn = 0;
let batchNumber = 1;
while (true) {
console.log(`\n📦 Starting Batch #${batchNumber}`);
for (let i = 0; i < 20; i++) {
window.scrollTo(0, document.body.scrollHeight);
await delay(1500);
}
let withdrawButtons = Array.from(document.querySelectorAll("button")).filter(btn => btn.innerText.trim() === "Withdraw");
if (withdrawButtons.length === 0) {
console.log("🏁 No more invitations found. Complete!");
break;
}
withdrawButtons.reverse();
const batchButtons = withdrawButtons.slice(0, 100);
console.log(`📌 Found ${withdrawButtons.length} total invitations`);
console.log(`🎯 Processing ${batchButtons.length} in this batch`);
let batchWithdrawn = 0;
for (const button of batchButtons) {
try {
button.scrollIntoView({ behavior: "smooth", block: "center" });
await delay(800);
button.click();
await delay(1000);
let confirmBtn = null;
for (let i = 0; i < 10; i++) {
confirmBtn = Array.from(document.querySelectorAll("button")).find(b => b.innerText.trim() === "Withdraw" && b.getAttribute("aria-label")?.includes("invitation sent"));
if (confirmBtn) break;
await delay(500);
}
if (confirmBtn) {
confirmBtn.click();
batchWithdrawn++;
totalWithdrawn++;
console.log(`✅ Withdrawn (Batch: ${batchWithdrawn}/100 | Total: ${totalWithdrawn})`);
await delay(2000);
} else {
console.warn("❌ Confirm Withdraw button not found.");
}
} catch (err) {
console.error("❌ Error withdrawing invitation:", err);
}
}
console.log(`\n✅ Batch #${batchNumber} complete: ${batchWithdrawn} withdrawn`);
console.log(`📊 Total withdrawn so far: ${totalWithdrawn}`);
await delay(2000);
const remainingButtons = Array.from(document.querySelectorAll("button")).filter(btn => btn.innerText.trim() === "Withdraw");
if (remainingButtons.length === 0) {
console.log("\n🎉 All invitations processed!");
break;
}
await waitForUserConfirmation();
batchNumber++;
}
console.log(`\n🎉 COMPLETE! Total invitations withdrawn: ${totalWithdrawn}`);
})();
function copyScript() { // Store the actual working script as a string const scriptText = `(async function bulkWithdrawLinkedInInvitations() { console.log("🚀 Starting controlled bulk withdrawal of LinkedIn invitations..."); console.log("⚠️ Will process 100 invitations at a time, starting from bottom"); const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms)); const waitForUserConfirmation = () => { return new Promise(resolve => { console.log("\\n⏸️ PAUSED - Press Enter in console to continue with next batch"); console.log("💡 Type: continueWithdrawal()"); window.continueWithdrawal = () => { console.log("▶️ Resuming...\\n"); delete window.continueWithdrawal; resolve(); }; }); }; let totalWithdrawn = 0; let batchNumber = 1; while (true) { console.log(\`\\n📦 Starting Batch #\${batchNumber}\`); for (let i = 0; i < 20; i++) { window.scrollTo(0, document.body.scrollHeight); await delay(1500); } let withdrawButtons = Array.from(document.querySelectorAll("button")).filter(btn => btn.innerText.trim() === "Withdraw"); if (withdrawButtons.length === 0) { console.log("🏁 No more invitations found. Complete!"); break; } withdrawButtons.reverse(); const batchButtons = withdrawButtons.slice(0, 100); console.log(\`📌 Found \${withdrawButtons.length} total invitations\`); console.log(\`🎯 Processing \${batchButtons.length} in this batch\`); let batchWithdrawn = 0; for (const button of batchButtons) { try { button.scrollIntoView({ behavior: "smooth", block: "center" }); await delay(800); button.click(); await delay(1000); let confirmBtn = null; for (let i = 0; i < 10; i++) { confirmBtn = Array.from(document.querySelectorAll("button")).find(b => b.innerText.trim() === "Withdraw" && b.getAttribute("aria-label")?.includes("invitation sent")); if (confirmBtn) break; await delay(500); } if (confirmBtn) { confirmBtn.click(); batchWithdrawn++; totalWithdrawn++; console.log(\`✅ Withdrawn (Batch: \${batchWithdrawn}/100 | Total: \${totalWithdrawn})\`); await delay(2000); } else { console.warn("❌ Confirm Withdraw button not found."); } } catch (err) { console.error("❌ Error withdrawing invitation:", err); } } console.log(\`\\n✅ Batch #\${batchNumber} complete: \${batchWithdrawn} withdrawn\`); console.log(\`📊 Total withdrawn so far: \${totalWithdrawn}\`); await delay(2000); const remainingButtons = Array.from(document.querySelectorAll("button")).filter(btn => btn.innerText.trim() === "Withdraw"); if (remainingButtons.length === 0) { console.log("\\n🎉 All invitations processed!"); break; } await waitForUserConfirmation(); batchNumber++; } console.log(\`\\n🎉 COMPLETE! Total invitations withdrawn: \${totalWithdrawn}\`); })();`; // Create temporary textarea const textArea = document.createElement('textarea'); textArea.value = scriptText; textArea.style.position = 'fixed'; textArea.style.left = '-999999px'; document.body.appendChild(textArea); textArea.select(); try { document.execCommand('copy'); const button = document.getElementById('copyBtn'); button.innerText = 'Copied!'; button.style.backgroundColor = '#057642'; setTimeout(function() { button.innerText = 'Copy Code'; button.style.backgroundColor = '#0073b1'; }, 2000); } catch (err) { alert('Failed to copy. Please select and copy manually.'); } finally { document.body.removeChild(textArea); } }
The Results
In about 5 minutes, I went from 500+ pending invites to zero. Clean slate. Fresh start. Inbox Zero achieved.
It's oddly satisfying. Like clearing out your email inbox or organizing your desktop. You don't realize how much mental clutter those pending invites create until they're gone.
Plus, now when I send new connection requests, I know they're more intentional. More targeted. Higher quality.
Key Takeaways
- LinkedIn makes it extremely difficult to withdraw sent invites at scale, but a simple browser console script can automate the process and clear hundreds of pending requests in minutes.
- Regularly cleaning up your LinkedIn connection requests helps keep your network intentional and your outreach more targeted and higher quality.
- Always verify scripts from the internet before running them in your browser console by pasting them into an AI assistant like Claude or ChatGPT first.
- Automating tedious manual tasks like invite withdrawal is a mindset shift that applies broadly to sales workflows, from LinkedIn housekeeping to account research and prospecting.
Spring Clean Done. Now Back to Selling.
Here's the thing about founder-led sales: it's all about being efficient with your time. You can't afford to waste hours on manual tasks that could be automated. Whether it's withdrawing LinkedIn invites or doing account research, every minute counts.
That's actually why we built Salesmotion. We automate the tedious parts of sales so you can focus on what matters: building relationships and closing deals.
While this script helped me clean up my LinkedIn in 5 minutes, Salesmotion helps sales teams save hours every single day. Our AI monitors all your target accounts 24/7, surfaces compelling buying signals, and tells you exactly which accounts to focus on and when to engage them.
No more manual research. No more guessing which accounts are ready to buy. No more wasted outreach to prospects who aren't showing buying signals.
Think of it as automation that actually makes sense. The kind that gives you back time instead of creating more work.
If you're spending hours researching accounts, trying to figure out which prospects to prioritize, or wondering when's the right time to reach out — our guide to AI prospecting tools is a great place to start, or let's talk. We're helping sales teams at companies like Guild Education, Analytic Partners, and Orgvue build more pipeline with less effort.
PS: The script is available in the comments. Use it wisely.
PPS: Feel free to paste my script into Claude or ChatGPT first and ask if it's safe. Seriously, don't trust random scripts on the internet. Verify before you run anything in your browser console.
Frequently Asked Questions
Is it safe to run scripts in the LinkedIn browser console?
Running any script in your browser console carries inherent risk, which is why you should always verify the code first by pasting it into an AI assistant like Claude or ChatGPT. The script shared in this post simply automates the click-and-confirm withdrawal process that you would otherwise do manually. That said, LinkedIn does monitor for unusual activity, so proceed at your own discretion.
Will withdrawing LinkedIn invites hurt my Social Selling Index or account standing?
Withdrawing pending invitations does not negatively impact your Social Selling Index (SSI) or your account standing. In fact, cleaning up ignored requests can improve your connection acceptance rate over time, which is a healthier signal for your profile. LinkedIn penalizes excessive sending of invites, not withdrawing them.
How often should I clean up my pending LinkedIn invitations?
A good rule of thumb is to review and withdraw unanswered invitations every 30 to 60 days. Pending requests older than a few weeks are unlikely to be accepted, and keeping them around just clutters your outreach pipeline. Regular cleanups help you maintain a more intentional and targeted LinkedIn network.
Can I selectively withdraw invitations instead of withdrawing all of them?
Yes, you can always withdraw invitations one by one through LinkedIn's native interface if you want to be selective. The script in this post is designed for bulk withdrawal when you have hundreds of ignored requests. If you only need to clean up a handful, the manual approach works fine without any automation.
```


