Export LinkedIn Messaging Contacts to Google Sheets
Paste a fetch() from LinkedIn Messaging DevTools to paginate through the last ~300 conversations and extract profile URLs, names, and headlines of everyone you've messaged. Saves to Google Sheets.
Tags
Key Takeaways
- Full inbox pagination - Uses a loop node to page through ALL LinkedIn messaging conversations
- Profile extraction - Gets LinkedIn URL, first name, last name, and headline for every contact
- Deduplication - Profiles appearing in multiple conversations are only saved once
- Google Sheets output - AI saves structured results directly to your spreadsheet
- No API key needed - Uses a browser fetch() call with your LinkedIn session
What This Workflow Does
This workflow paginates through LinkedIn's messaging GraphQL API, extracts the profile data of everyone you've had a conversation with, and saves the results to Google Sheets. Paste a single fetch() request from DevTools and the loop handles all pagination automatically.
Use cases:
- Export your entire LinkedIn messaging network to a spreadsheet
- Build a CRM-ready contact list from people you've actually spoken with
- Audit your networking activity and identify warm leads
- Create a follow-up list for event contacts or sales conversations
How It Works
| Step | What Happens |
|---|---|
| 1. Manual trigger | You paste a LinkedIn messaging fetch() request from DevTools |
| 2. Parse fetch | Code node extracts the base URL, queryId, mailboxUrn, and auth headers |
| 3. Loop (pagination) | Loop node iterates through inbox pages using nextCursor |
| 4. Fetch conversations | HTTP request calls the Voyager GraphQL API with the current cursor |
| 5. Extract profiles | Code node parses MiniProfile entities from the GraphQL included array |
| 6. Save to Sheets | AI node writes each contact (name, LinkedIn URL, headline) to Google Sheets |
Setup Instructions
- Click "Use template" on this page
- Go to linkedin.com/messaging
- Open DevTools (F12), go to the Network tab
- Scroll in your inbox to trigger a
voyagerMessagingGraphQLrequest - Right-click the request and "Copy as fetch"
- Paste the fetch() into the Manual Trigger node
- Connect your Google Sheets account
- Add your target spreadsheet URL to the AI save node prompt
- Run the workflow
Customization
| What You Can Change | How |
|---|---|
| Page size | Change the count parameter in the fetch URL (default: 20) |
| Max pages | Adjust the loop condition (default: 200 pages, ~4000 conversations) |
| Output destination | Replace Google Sheets node with email, Slack, or database output |
| Fields extracted | Modify the extraction code to include additional profile fields |
| Delay between pages | Change the wait node duration (default: 2 seconds) |
FAQ
Q: How many contacts can this export? A: Up to 200 pages of conversations (roughly 4000). Increase the loop limit for larger inboxes.
Q: Does this scrape message content? A: No, it only extracts the profile data (name, URL, headline) of conversation participants. Message content is not read.
Q: What if my session expires? A: Re-copy the fetch() from DevTools and paste it into the trigger again. LinkedIn sessions typically last a few hours.
Q: Will this include group conversations? A: Yes, all participants from group conversations in your PRIMARY_INBOX are included and deduplicated.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
