Scrape Instagram Commenters and Enrich with LinkedIn
Extract commenters from any Instagram post or reel and automatically find their LinkedIn profiles. AI-powered matching exports enriched data including LinkedIn URL, headline, and confidence score to Google Sheets.
Key Takeaways
- Instagram commenters to LinkedIn in one workflow - Scrape commenters from any post or reel and automatically find their LinkedIn profiles
- AI-powered matching - GPT-4.1 searches the web for each commenter's LinkedIn profile using their name and username
- Confidence scoring - Each LinkedIn match gets a confidence score (0-1) so you know how reliable the match is
- Comment context preserved - Each row includes the original comment text, so you know what they said and can personalize outreach
- Saves as you go - Each enriched commenter is written to Google Sheets in real time
What This Workflow Does
This workflow scrapes commenters from any Instagram post or reel and enriches each one with their LinkedIn profile. You copy a network request from your browser's DevTools while viewing a post's comments, paste it into the workflow, and it handles the rest. For each commenter, the AI agent searches the web to find their LinkedIn profile, scores the match confidence, and saves everything — including the original comment text — to your Google Sheet.
Use cases:
- Building lead lists from commenters on viral industry posts
- Identifying engaged prospects who comment on competitor content
- Cross-platform prospecting by connecting Instagram engagement to professional profiles
- Qualifying leads based on both their comment intent and LinkedIn profile
- Sales intelligence by mapping post engagement to professional data
How It Works
| Step | What Happens |
|---|---|
| 1. Manual trigger | You paste the fetch() request copied from Instagram DevTools |
| 2. Parse fetch request | Extracts the URL, headers, cookies, and media ID from the pasted request |
| 3. Pagination loop | Iterates through comment pages (~20 per page, max 100 pages) |
| 4. Build page request | Updates the request body with the current pagination cursor |
| 5. Wait 5 seconds | Pauses between Instagram API calls to avoid rate limiting |
| 6. HTTP request | Fetches the current page of comments from Instagram's GraphQL API |
| 7. Extract commenters | Parses the response to get username, full name, comment text, and profile URL |
| 8. AI LinkedIn enrichment | For each commenter, GPT-4.1 searches the web for their LinkedIn profile |
| 9. Save to Google Sheets | Writes the enriched data (IG + comment + LinkedIn + confidence score) to your spreadsheet |
| 10. Check pagination | Determines if there are more comment pages and continues the loop |
Workflow Nodes
| Node | Role |
|---|---|
| Manual Trigger | Accepts the pasted fetch() request from DevTools |
| Code (Parse Fetch) | Extracts URL, headers, cookies, media ID, and doc ID from the fetch request |
| Loop | Iterates through comment pages (condition: hasMore and page < 100) |
| Code (Build Request) | Constructs the request body with the current pagination cursor |
| Wait (5s) | Delays 5 seconds between Instagram API calls |
| HTTP Request (POST) | Sends a POST request to Instagram's GraphQL comments endpoint |
| Merge | Combines the HTTP response with the build context |
| Code (Extract Commenters) | Parses GraphQL response to get commenter profiles and comment text |
| AI Agent (GPT-4.1) | Searches LinkedIn for each commenter using search_web and browse_web, then saves to Sheets |
| Merge | Combines AI enrichment results with pagination data |
| Code (Prepare Loop End) | Extracts hasMore and cursor for the next loop iteration |
Data Exported Per Commenter
| Column | Field | Description |
|---|---|---|
| A | username | Instagram username |
| B | full_name | Full name from Instagram profile |
| C | instagram_url | Instagram profile URL |
| D | comment_text | The actual comment they left on the post |
| E | linkedin_url | Matched LinkedIn profile URL (if found) |
| F | linkedin_headline | LinkedIn professional headline (if found) |
| G | confidence_score | Match confidence from 0 to 1 (0.8 = 80%) |
Setup Instructions
- Add the "Scrape Instagram Commenters and Enrich with LinkedIn" template to Needle
- Go to Instagram and navigate to the target post or reel
- Click to view the comments section
- Open browser DevTools (F12) and go to the Network tab
- Scroll down in comments to trigger a pagination request
- Filter by "graphql" and find the
PolarisPostCommentsPaginationQueryrequest - Right-click the request, then select Copy, then Copy as fetch
- Paste the copied fetch() into the Manual Trigger node
- Update the Google Sheet URL in the AI Agent node prompt
- Connect your Google Sheets account via the Pipedream connector
- Run the workflow
Customization
| What You Can Change | How |
|---|---|
| Google Sheet columns | Update the column mapping in the AI Agent prompt |
| Target spreadsheet | Update the sheet URL in the AI Agent prompt |
| IG page delay | Change the Wait node duration (default: 5 seconds) |
| Max pages | Change the loop condition (default: page < 100) |
| AI model | Change the model in the AI Agent node (default: GPT-4.1) |
| LinkedIn search strategy | Modify the search queries in the AI Agent prompt |
FAQ
Q: How accurate is the LinkedIn matching? A: On average, about 8 out of 10 Instagram profiles can be matched to a LinkedIn profile. The confidence score helps you filter out low-quality matches. Accuracy depends on how common the person's name is and whether they use similar names on both platforms.
Q: How long does the enrichment take? A: Each commenter takes about 15-30 seconds for LinkedIn enrichment. A page of 20 comments takes roughly 5-10 minutes including the Instagram delay. Plan for about 30 minutes per 100 commenters.
Q: My workflow is returning errors from Instagram. What should I do? A: The Instagram cookie expires after roughly 24 hours. Go back to Instagram, open DevTools, and copy a fresh fetch() request.
Q: Why include the comment text in the output? A: The comment text gives you context about each person's interest and intent. This makes outreach far more effective — you can reference what they said when reaching out on LinkedIn.
Q: Can I use this with followers or likers instead of commenters? A: This template is designed for post/reel commenters. For followers, use the "Export Instagram Followers" template. The fetch() format is different between the two APIs.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.