Skip to main content

Overview

These examples demonstrate how to use the AnySite MCP Tool in n8n workflows to extract and process social media data.

Example 1: LinkedIn Profile Enrichment

Automatically enrich contact data with LinkedIn profile information.

Workflow Structure

Configuration

1

Setup Webhook Trigger

Configure a webhook that accepts LinkedIn profile URLs:
{
  "linkedin_url": "https://linkedin.com/in/username"
}
2

Configure MCP Client

  • Add MCP Client node
  • Set endpoint to your AnySite Direct URL
  • Include linkedin_user tool
3

Add AI Agent Node

Configure the AI agent to use the MCP tool:
Extract detailed profile information from: {{ $json.linkedin_url }}

Use the linkedin_user tool to get:
- Full name and headline
- Current position and company
- Experience history
- Education
- Skills
4

Process Results

Use a Code node to structure the extracted data:
const profile = $input.item.json;

return {
  name: profile.full_name,
  headline: profile.headline,
  current_company: profile.current_position?.company,
  location: profile.location,
  skills: profile.skills,
  profile_url: profile.linkedin_url
};

Use Cases

  • CRM data enrichment
  • Lead qualification
  • Candidate screening
  • Contact database updates

Example 2: Reddit Content Monitoring

Monitor Reddit posts and extract detailed information for content analysis.

Workflow Structure

Configuration

1

Setup Schedule Trigger

Run every hour to check new Reddit posts:
Cron: 0 * * * *
2

Provide Reddit URLs

Use a Set node with target post URLs or feed from a database.
3

Configure MCP Client

  • Include reddit_post tool
  • Set for processing multiple items
4

Extract Post Data

AI agent prompt:
Analyze this Reddit post: {{ $json.reddit_url }}

Extract:
- Post title and content
- Author information
- Upvotes and comments count
- Top comments
- Post timestamp
5

Analyze Sentiment

Add another AI node to analyze sentiment:
Analyze the sentiment of this post and its top comments.
Classify as: Positive, Negative, or Neutral
Extract key topics and themes.

Use Cases

  • Brand mention monitoring
  • Community sentiment tracking
  • Competitor analysis
  • Trend identification

Example 3: Instagram Profile Analysis

Extract and compare Instagram profiles for influencer research.

Workflow Configuration

1

Input Instagram URLs

Webhook or manual trigger with profile URLs:
{
  "profiles": [
    "https://instagram.com/influencer1",
    "https://instagram.com/influencer2"
  ]
}
2

MCP Client Setup

  • Include instagram_profile tool
  • Enable batch processing
3

Extract Profile Data

AI agent instruction:
For each Instagram profile, extract:
- Username and full name
- Follower count and engagement rate
- Bio and contact information
- Recent posts count
- Account type (business/personal)
4

Compare and Rank

Use Code node to compare profiles:
const profiles = $input.all().map(item => item.json);

// Calculate engagement scores
profiles.forEach(profile => {
  profile.engagement_score =
    (profile.avg_likes + profile.avg_comments) /
    profile.followers * 100;
});

// Sort by engagement
profiles.sort((a, b) =>
  b.engagement_score - a.engagement_score
);

return profiles;

Use Cases

  • Influencer selection
  • Campaign planning
  • Competitive analysis
  • Audience research

Example 4: Multi-Platform Data Aggregation

Collect data from multiple social platforms for comprehensive analysis.

Workflow Overview

Combine LinkedIn, Instagram, and Reddit data for a person or brand.
1

Setup Input

Provide multiple social media URLs:
{
  "linkedin": "https://linkedin.com/in/username",
  "instagram": "https://instagram.com/username",
  "reddit": "https://reddit.com/user/username"
}
2

Parallel Processing

Split workflow into parallel branches:
  • Branch 1: LinkedIn data extraction
  • Branch 2: Instagram data extraction
  • Branch 3: Reddit data extraction
Each branch uses MCP Client with appropriate tool.
3

Merge Results

Use Merge node to combine all data:
Mode: Combine All
Output: Single item with all social data
4

Generate Report

AI agent creates unified analysis:
Based on the social media data from LinkedIn, Instagram, and Reddit:

1. Summarize professional background
2. Analyze content themes and interests
3. Evaluate audience engagement
4. Identify key insights and patterns

Use Cases

  • Comprehensive background checks
  • Brand presence analysis
  • Content strategy research
  • Cross-platform insights

Example 5: Automated LinkedIn Company Research

Research companies automatically from a list.

Configuration

1

Input Company List

Provide company LinkedIn URLs via webhook or spreadsheet:
{
  "companies": [
    "https://linkedin.com/company/company1",
    "https://linkedin.com/company/company2"
  ]
}
2

MCP Client

Use linkedin_company tool for data extraction.
3

Extract Company Data

For each company, extract:
- Company name and industry
- Size and location
- Description and specialties
- Employee count
- Recent updates and posts
4

Export Results

Format and export to:
  • Google Sheets
  • Airtable
  • CSV file
  • Database

Use Cases

  • Market research
  • Lead generation
  • Competitive intelligence
  • Partnership opportunities

Best Practices

Error Handling

Add Error Trigger nodes to handle API failures gracefully and implement retry logic.

Rate Limiting

Use Wait nodes between MCP calls to avoid hitting API rate limits.

Data Validation

Validate extracted data before processing to ensure quality and completeness.

Logging

Log all MCP operations for debugging and audit purposes.

Tips for Optimization

  1. Batch Processing: Group multiple URLs together to reduce workflow execution time
  2. Caching: Store frequently accessed data to minimize API calls
  3. Parallel Execution: Use Split In Batches node for processing large datasets
  4. Error Recovery: Implement fallback mechanisms for failed API calls
  5. Monitoring: Set up notifications for workflow failures or data anomalies

Advanced Patterns

Pattern 1: Conditional Tool Selection

Use IF nodes to dynamically select which MCP tool to use based on URL type:
// Detect platform from URL
const url = $json.social_url;

if (url.includes('linkedin.com/in/')) {
  return { tool: 'linkedin_user' };
} else if (url.includes('linkedin.com/company/')) {
  return { tool: 'linkedin_company' };
} else if (url.includes('instagram.com')) {
  return { tool: 'instagram_profile' };
}

Pattern 2: Incremental Updates

Track and update only changed data:
// Compare with existing data
const existing = $('Database').first().json;
const fresh = $json;

const changes = {};
if (existing.followers !== fresh.followers) {
  changes.followers = fresh.followers;
  changes.follower_growth = fresh.followers - existing.followers;
}

return changes.followers ? changes : null;

Pattern 3: Data Enrichment Pipeline

Chain multiple MCP tools for comprehensive enrichment:
LinkedIn User → Get Company → Get Company Employees → Analyze Network

Resources

Need Help?

Get Support

Contact our support team for assistance with n8n MCP integration