> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Node

> Extract LinkedIn data with the Anysite LinkedIn node for n8n workflows

## Overview

The Anysite LinkedIn node provides comprehensive LinkedIn data extraction capabilities within your n8n workflows. Search for users, companies, posts, and extract detailed profile information.

## Node Configuration

### Authentication

<ParamField path="credential" type="Anysite API Credentials" required>
  Select your Anysite API credentials from the dropdown or create new ones.
</ParamField>

### Available Operations

<Tabs>
  <Tab title="Search Users">
    Search for LinkedIn users and profiles.

    **Parameters:**

    * **Query** (required): Search terms for finding users
    * **Filters**: Location, industry, company filters
    * **Limit**: Maximum results to return (1-100)

    **Example Output:**

    ```json theme={null}
    {
      "users": [
        {
          "id": "user123",
          "name": "John Smith", 
          "headline": "Senior Software Engineer at Tech Corp",
          "location": "San Francisco, CA",
          "profileUrl": "https://linkedin.com/in/johnsmith",
          "followers": 2500,
          "connections": 500
        }
      ]
    }
    ```
  </Tab>

  <Tab title="Get User Profile">
    Get detailed profile information for a specific user.

    **Parameters:**

    * **User ID** (required): LinkedIn user identifier
    * **Include Posts**: Whether to include recent posts
    * **Post Limit**: Number of recent posts to include

    **Example Output:**

    ```json theme={null}
    {
      "profile": {
        "id": "user123",
        "name": "John Smith",
        "headline": "Senior Software Engineer at Tech Corp", 
        "summary": "Experienced engineer with 8+ years...",
        "experience": [
          {
            "company": "Tech Corp",
            "position": "Senior Software Engineer",
            "duration": "2022 - Present",
            "description": "Lead backend development..."
          }
        ],
        "education": [...],
        "skills": ["Python", "AWS", "Kubernetes"],
        "recentPosts": [...]
      }
    }
    ```
  </Tab>

  <Tab title="Search Companies">
    Search for LinkedIn companies and organizations.

    **Parameters:**

    * **Query** (required): Company search terms
    * **Industry Filter**: Specific industry to filter by
    * **Size Filter**: Company size range
    * **Location**: Geographic location filter

    **Example Output:**

    ```json theme={null}
    {
      "companies": [
        {
          "id": "company456",
          "name": "Tech Corp Inc",
          "industry": "Computer Software", 
          "size": "1001-5000 employees",
          "location": "San Francisco, CA",
          "website": "https://techcorp.com",
          "followers": 125000
        }
      ]
    }
    ```
  </Tab>

  <Tab title="Get User Posts">
    Extract posts and activity from a LinkedIn user.

    **Parameters:**

    * **User ID** (required): LinkedIn user identifier
    * **Post Limit**: Number of posts to retrieve
    * **Include Reactions**: Whether to include reaction counts

    **Example Output:**

    ```json theme={null}
    {
      "posts": [
        {
          "id": "post789",
          "text": "Excited to announce our new product launch...",
          "publishedAt": "2024-08-26T10:00:00Z",
          "reactions": {
            "likes": 45,
            "comments": 12,
            "reposts": 8
          },
          "mediaUrls": ["https://example.com/image.jpg"]
        }
      ]
    }
    ```
  </Tab>
</Tabs>

## Workflow Examples

### Lead Generation Workflow

<Steps>
  <Step title="Search for Prospects">
    Use the LinkedIn Search Users operation to find potential leads based on job titles, companies, or industries.
  </Step>

  <Step title="Extract Detailed Profiles">
    For each prospect found, use Get User Profile to gather comprehensive information including work history, skills, and recent activity.
  </Step>

  <Step title="Filter and Score">
    Use n8n's built-in nodes to filter prospects based on criteria and assign lead scores.
  </Step>

  <Step title="Store Results">
    Save qualified leads to your CRM, database, or Google Sheets using n8n's integration nodes.
  </Step>
</Steps>

**Example Workflow:**

```json theme={null}
{
  "nodes": [
    {
      "name": "LinkedIn Search",
      "type": "@horizondatawave/n8n-nodes-anysite.LinkedIn",
      "operation": "searchUsers",
      "parameters": {
        "query": "marketing manager",
        "filters": {
          "location": "New York",
          "industry": "Technology" 
        },
        "limit": 50
      }
    },
    {
      "name": "Get Full Profiles", 
      "type": "@horizondatawave/n8n-nodes-anysite.LinkedIn",
      "operation": "getUserProfile",
      "parameters": {
        "userId": "={{ $json.id }}",
        "includePosts": true,
        "postLimit": 5
      }
    },
    {
      "name": "Filter Qualified Leads",
      "type": "n8n-nodes-base.filter",
      "parameters": {
        "conditions": [
          {
            "field": "experience[0].company",
            "operation": "notEqual",
            "value": "Competitor Corp"
          }
        ]
      }
    },
    {
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets", 
      "parameters": {
        "operation": "append",
        "sheetId": "your-sheet-id",
        "values": [
          "={{ $json.name }}",
          "={{ $json.headline }}",
          "={{ $json.location }}",
          "={{ $json.profileUrl }}"
        ]
      }
    }
  ]
}
```

### Content Research Workflow

Track what industry leaders are posting about:

1. **Search Industry Leaders** - Find thought leaders in your industry
2. **Get Recent Posts** - Extract their latest content and engagement metrics
3. **Analyze Trends** - Use AI nodes to identify trending topics and themes
4. **Generate Content Ideas** - Create content suggestions based on analysis
5. **Schedule Notifications** - Alert your team about important trends

### Competitor Analysis Workflow

Monitor competitor activity and employee movements:

1. **Track Competitor Employees** - Search for employees at competitor companies
2. **Monitor Job Changes** - Detect when key employees leave or join competitors
3. **Analyze Company Updates** - Track competitor company page updates and announcements
4. **Sentiment Analysis** - Analyze employee sentiment through their posts
5. **Generate Reports** - Create weekly competitor intelligence reports

## Error Handling

### Common Errors

<AccordionGroup>
  <Accordion title="Rate Limit Exceeded">
    **Error:** `429 - Rate limit exceeded`

    **Solution:**

    * Add delay nodes between requests
    * Implement retry logic with exponential backoff
    * Consider upgrading your API plan
  </Accordion>

  <Accordion title="User Not Found">
    **Error:** `404 - User not found`

    **Solution:**

    * Verify the LinkedIn user ID is correct
    * Check if the profile is private or deactivated
    * Handle missing users gracefully in your workflow
  </Accordion>

  <Accordion title="Invalid Search Query">
    **Error:** `400 - Invalid search parameters`

    **Solution:**

    * Ensure search query is not empty
    * Verify filter parameters are valid
    * Check location and industry filter formats
  </Accordion>
</AccordionGroup>

### Retry Logic Example

```json theme={null}
{
  "name": "LinkedIn with Retry",
  "type": "@horizondatawave/n8n-nodes-anysite.LinkedIn",
  "retryOnFail": true,
  "maxTries": 3,
  "waitBetweenTries": 2000,
  "parameters": {
    "operation": "searchUsers",
    "query": "software engineer"
  }
}
```

## Rate Limiting Best Practices

### Request Spacing

Add delays between bulk operations:

```json theme={null}
{
  "name": "Delay Between Requests",
  "type": "n8n-nodes-base.wait",
  "parameters": {
    "amount": 1,
    "unit": "seconds"
  }
}
```

### Batch Processing

Process large datasets in smaller batches:

```json theme={null}
{
  "name": "Split Into Batches",
  "type": "n8n-nodes-base.splitInBatches", 
  "parameters": {
    "batchSize": 10
  }
}
```

## Advanced Features

### Dynamic Filtering

Use expressions to create dynamic search filters:

```javascript theme={null}
// Dynamic location filter based on previous data
{
  "location": "={{ $json.companyHeadquarters }}",
  "industry": "={{ $json.targetIndustry }}"
}
```

### Data Enrichment

Combine LinkedIn data with other sources:

```json theme={null}
{
  "workflow": [
    "LinkedIn Search → Get Profiles",
    "Email Finder → Enrich with Contacts", 
    "Company Data → Add Firmographic Info",
    "CRM Integration → Update Lead Records"
  ]
}
```

### Content Analysis

Use AI nodes to analyze LinkedIn posts:

```javascript theme={null}
// Sentiment analysis of LinkedIn posts
{
  "name": "Analyze Post Sentiment",
  "type": "n8n-nodes-base.openAi",
  "parameters": {
    "operation": "analyze",
    "prompt": "Analyze the sentiment of this LinkedIn post: {{ $json.postText }}"
  }
}
```

## Integration Examples

### CRM Integration

Automatically create leads in your CRM:

<CodeGroup>
  ```json Salesforce theme={null}
  {
    "name": "Create Salesforce Lead",
    "type": "n8n-nodes-base.salesforce",
    "parameters": {
      "operation": "create",
      "resource": "lead",
      "data": {
        "FirstName": "={{ $json.firstName }}",
        "LastName": "={{ $json.lastName }}", 
        "Company": "={{ $json.currentCompany }}",
        "Title": "={{ $json.headline }}",
        "LinkedIn__c": "={{ $json.profileUrl }}"
      }
    }
  }
  ```

  ```json HubSpot   theme={null}
  {
    "name": "Create HubSpot Contact",
    "type": "n8n-nodes-base.hubspot",
    "parameters": {
      "operation": "create",
      "resource": "contact", 
      "data": {
        "firstname": "={{ $json.firstName }}",
        "lastname": "={{ $json.lastName }}",
        "jobtitle": "={{ $json.headline }}",
        "linkedin_profile": "={{ $json.profileUrl }}"
      }
    }
  }
  ```
</CodeGroup>

### Slack Notifications

Send alerts about important prospects:

```json theme={null}
{
  "name": "Slack Alert",
  "type": "n8n-nodes-base.slack",
  "parameters": {
    "operation": "postMessage",
    "channel": "#sales-leads",
    "text": "🎯 High-value prospect found: {{ $json.name }} at {{ $json.company }}\n📍 Location: {{ $json.location }}\n🔗 Profile: {{ $json.profileUrl }}"
  }
}
```

## Next Steps

* [Twitter Node](/n8n-nodes/twitter-node) - Extract Twitter data
* [Instagram Node](/n8n-nodes/instagram-node) - Instagram content analysis
* [Reddit Node](/n8n-nodes/reddit-node) - Reddit discussion monitoring
* [Installation Guide](/n8n-nodes/installation) - Set up Anysite nodes in n8n
