Real-world workflow examples using Anysite MCP in n8n
These examples demonstrate how to use the Anysite MCP Tool in n8n workflows to extract and process social media data.
Automatically enrich contact data with LinkedIn profile information.
graph LR
A[Webhook Trigger] --> B[MCP Client]
B --> C[AI Agent]
C --> D[Process Data]
D --> E[Store in Database]
Configure a webhook that accepts LinkedIn profile URLs:
```json
{
"linkedin_url": "https://linkedin.com/in/username"
}
```
- Add MCP Client node
- Set endpoint to your Anysite Direct URL
- Include `linkedin_user` tool
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
```
Use a Code node to structure the extracted data:
```javascript
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
};
```
Monitor Reddit posts and extract detailed information for content analysis.
graph LR
A[Schedule Trigger] --> B[Reddit URLs]
B --> C[MCP Client]
C --> D[AI Agent]
D --> E[Sentiment Analysis]
E --> F[Send Alert]
Run every hour to check new Reddit posts:
```
Cron: 0 * * * *
```
Use a Set node with target post URLs or feed from a database.
- Include `reddit_post` tool
- Set for processing multiple items
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
```
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.
```
Extract and compare Instagram profiles for influencer research.
Webhook or manual trigger with profile URLs:
```json
{
"profiles": [
"https://instagram.com/influencer1",
"https://instagram.com/influencer2"
]
}
```
- Include `instagram_profile` tool
- Enable batch processing
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)
```
Use Code node to compare profiles:
```javascript
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;
```
Collect data from multiple social platforms for comprehensive analysis.
Combine LinkedIn, Instagram, and Reddit data for a person or brand.
Provide multiple social media URLs:
```json
{
"linkedin": "https://linkedin.com/in/username",
"instagram": "https://instagram.com/username",
"reddit": "https://reddit.com/user/username"
}
```
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.
Use Merge node to combine all data:
```
Mode: Combine All
Output: Single item with all social data
```
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
```
Research companies automatically from a list.
Provide company LinkedIn URLs via webhook or spreadsheet:
```json
{
"companies": [
"https://linkedin.com/company/company1",
"https://linkedin.com/company/company2"
]
}
```
Use `linkedin_company` tool for data extraction.
```
For each company, extract:
- Company name and industry
- Size and location
- Description and specialties
- Employee count
- Recent updates and posts
```
Format and export to:
- Google Sheets
- Airtable
- CSV file
- Database
Add Error Trigger nodes to handle API failures gracefully and implement retry logic.
Use Wait nodes between MCP calls to avoid hitting API rate limits.
Validate extracted data before processing to ensure quality and completeness.
Log all MCP operations for debugging and audit purposes.
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' };
}
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;
Chain multiple MCP tools for comprehensive enrichment:
LinkedIn User → Get Company → Get Company Employees → Analyze Network
Contact our support team for assistance with n8n MCP integration