Scrape Instagram Commenters and Enrich with LinkedIn

OpenAI

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.

InstagramLinkedInLead GenerationEnrichmentGoogle SheetsScrapingCommenters
Needle Team

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

StepWhat Happens
1. Manual triggerYou paste the fetch() request copied from Instagram DevTools
2. Parse fetch requestExtracts the URL, headers, cookies, and media ID from the pasted request
3. Pagination loopIterates through comment pages (~20 per page, max 100 pages)
4. Build page requestUpdates the request body with the current pagination cursor
5. Wait 5 secondsPauses between Instagram API calls to avoid rate limiting
6. HTTP requestFetches the current page of comments from Instagram's GraphQL API
7. Extract commentersParses the response to get username, full name, comment text, and profile URL
8. AI LinkedIn enrichmentFor each commenter, GPT-4.1 searches the web for their LinkedIn profile
9. Save to Google SheetsWrites the enriched data (IG + comment + LinkedIn + confidence score) to your spreadsheet
10. Check paginationDetermines if there are more comment pages and continues the loop

Workflow Nodes

NodeRole
Manual TriggerAccepts the pasted fetch() request from DevTools
Code (Parse Fetch)Extracts URL, headers, cookies, media ID, and doc ID from the fetch request
LoopIterates 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
MergeCombines 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
MergeCombines AI enrichment results with pagination data
Code (Prepare Loop End)Extracts hasMore and cursor for the next loop iteration

Data Exported Per Commenter

ColumnFieldDescription
AusernameInstagram username
Bfull_nameFull name from Instagram profile
Cinstagram_urlInstagram profile URL
Dcomment_textThe actual comment they left on the post
Elinkedin_urlMatched LinkedIn profile URL (if found)
Flinkedin_headlineLinkedIn professional headline (if found)
Gconfidence_scoreMatch confidence from 0 to 1 (0.8 = 80%)

Setup Instructions

  1. Add the "Scrape Instagram Commenters and Enrich with LinkedIn" template to Needle
  2. Go to Instagram and navigate to the target post or reel
  3. Click to view the comments section
  4. Open browser DevTools (F12) and go to the Network tab
  5. Scroll down in comments to trigger a pagination request
  6. Filter by "graphql" and find the PolarisPostCommentsPaginationQuery request
  7. Right-click the request, then select Copy, then Copy as fetch
  8. Paste the copied fetch() into the Manual Trigger node
  9. Update the Google Sheet URL in the AI Agent node prompt
  10. Connect your Google Sheets account via the Pipedream connector
  11. Run the workflow

Customization

What You Can ChangeHow
Google Sheet columnsUpdate the column mapping in the AI Agent prompt
Target spreadsheetUpdate the sheet URL in the AI Agent prompt
IG page delayChange the Wait node duration (default: 5 seconds)
Max pagesChange the loop condition (default: page < 100)
AI modelChange the model in the AI Agent node (default: GPT-4.1)
LinkedIn search strategyModify 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.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .