Skip to main content

LinkedIn Integration

Connect your AI agents to LinkedIn for automated social media management, including posting updates, sharing articles, replying to messages, and monitoring engagement.

Overview

The LinkedIn Integration enables agents to manage LinkedIn profiles and company pages on your behalf. Using OAuth 2.0 authentication, you can connect multiple accounts and create customized action tools that agents use during email processing or autonomous operations.

Use Cases

  • Executive Assistant - Draft and publish LinkedIn posts based on email instructions
  • Company Social Media - Share company news and articles to company pages
  • Professional Networking - Reply to LinkedIn messages on your behalf
  • Community Management - Monitor and engage with company page posts
  • Analytics - Track post engagement and follower statistics

Architecture

LinkedIn Account          LinkedIn Actions           Agent Execution
| | |
v v v
+--------------+ +--------------+ +--------------+
| OAuth 2.0 | -> | 11 Action | -> | Agents use |
| Connection | | Types | | tools for |
| (encrypted) | | configured | | LinkedIn ops |
+--------------+ +--------------+ +--------------+

Creating a LinkedIn Connection

Prerequisites

Before creating a connection:

  1. LinkedIn Developer Account - Register at https://www.linkedin.com/developers/
  2. LinkedIn App - Create an app with the appropriate products enabled
  3. OAuth Credentials - Have your Client ID and Client Secret ready

Step 1: Navigate to LinkedIn Settings

  1. Navigate to Build > Connections > LinkedIn
  2. Click Add Connection
  3. Select Personal Profile or Company Page

Step 2: Enter OAuth App Credentials

FieldDescription
Connection NameUnique identifier (lowercase, no spaces)
Display NameHuman-readable name shown in the UI
Account TypePersonal Profile or Company Page
Client IDFrom your LinkedIn Developer App
Client SecretFrom your LinkedIn Developer App (stored encrypted)

Step 3: Authorize with LinkedIn

  1. Click Authorize with LinkedIn
  2. A popup opens to LinkedIn's authorization page
  3. Review and approve the requested permissions
  4. You're redirected back to Control Bridge upon success

Step 4: Verify Connection

After authorization, the connection shows:

  • Profile name and image from LinkedIn
  • Token expiration date
  • Daily post limit and usage

LinkedIn Developer App Setup

Creating a LinkedIn App

  1. Go to https://www.linkedin.com/developers/apps
  2. Click Create app
  3. Fill in the required fields:
    • App name - e.g., "Outermind Integration"
    • LinkedIn Page - Your company's LinkedIn page
    • Privacy policy URL - Your privacy policy
    • App logo - 400x400px image

Configuring OAuth Settings

  1. Go to the Auth tab in your LinkedIn app
  2. Add OAuth 2.0 redirect URLs:
    • Development: http://localhost:4001/api/console/linkedin-connections/oauth/callback
    • Production: https://[your-domain]/api/console/linkedin-connections/oauth/callback

Required Products

Enable the following products for your LinkedIn app:

ProductRequired For
Share on LinkedInPersonal profile posts
Sign In with LinkedIn using OpenID ConnectProfile information
Community Management APICompany page operations (requires approval)
tip

The Community Management API requires approval from LinkedIn. Apply through the LinkedIn Developer Portal and allow 1-2 weeks for review.

OAuth Scopes by Account Type

Personal Profile:

  • openid - User identification
  • profile - Profile data
  • email - Email address
  • w_member_social - Create posts

Company Page:

  • openid, profile, email - Same as personal
  • w_organization_social - Post on behalf of organization
  • r_organization_social - Read organization posts

Available Action Types

LinkedIn Actions define what operations your agents can perform. Each action becomes a tool that agents can use.

Social Media Actions

Action TypeAccount TypesDescription
create_postPersonal, CompanyCreate a new post
reply_messagePersonalReply to inbox messages
share_articlePersonal, CompanyShare links with commentary

Community Management Actions

Action TypeAccount TypesDescription
add_commentCompanyComment on company posts
add_reactionCompanyReact to posts (like, celebrate, etc.)
delete_postCompanyDelete company posts
delete_commentCompanyDelete comments

Analytics Actions

Action TypeAccount TypesDescription
get_recent_postsCompanyGet recent posts for monitoring
get_post_engagementCompanyGet metrics (views, reactions, comments)
get_follower_statsCompanyGet follower statistics
get_activity_historyPersonal, CompanyGet audit trail of actions

Creating LinkedIn Actions

After creating a connection, configure actions that agents can use.

Step 1: Navigate to Actions

  1. Navigate to Build > Connections > LinkedIn
  2. Click on your connection
  3. Go to the Actions tab
  4. Click Add Action

Step 2: Basic Configuration

FieldDescription
Action TypeSelect from 11 available types
Action NameUnique identifier for this action
Display NameName shown to agents
Tool NameThe tool name agents will use
Tool DescriptionHelps agent decide when to use this tool

Step 3: Action Settings

Settings vary by action type:

For create_post:

SettingDescription
Default VisibilityPublic, Connections, or Private
Max Text LengthMaximum characters (default: 3000)
Require ConfirmationHuman approval before posting

For share_article:

SettingDescription
Allowed DomainsRestrict which URLs can be shared
Require ConfirmationHuman approval before sharing

Step 4: Parameter Configuration

Each action has configurable parameters that agents provide:

Example: create_post parameters

ParameterTypeRequiredDescription
textstringYesPost text content (max 3000 chars)
visibilitystringNopublic, connections, or private
imageUrlstringNoOptional image URL to attach

Step 5: Grant Tool Access

After creating an action, grant access to agents:

  1. A modal appears to select which agents can use this tool
  2. Select AICOS, SMEs, or regular agents
  3. Click Save to grant access

Assigning Tools to Agents

If you didn't grant access during creation:

  1. Navigate to Build > AI Agents > Agents
  2. Edit the agent that should use LinkedIn
  3. In the Tools section, find your LinkedIn tools
  4. Check the boxes to enable them
  5. Save the agent

Rate Limiting

LinkedIn enforces strict API rate limits to protect their platform.

Default Limits

LimitValueResets
Posts per day25Midnight UTC
Read operations100/dayMidnight UTC
Analytics queriesVariesPer endpoint

Configuration

You can customize limits per connection:

  1. Navigate to Build > Connections > LinkedIn
  2. Click on your connection
  3. Edit Daily Post Limit (default: 25)

Monitoring Usage

The connection card displays:

  • Current day's usage
  • Remaining quota
  • Last post date

Security

Token Encryption

All OAuth tokens are encrypted using AES-256-CBC:

  • Tokens decrypted only at execution time
  • No tokens in logs or API responses
  • Environment variable: LINKEDIN_ENCRYPTION_KEY

Audit Logging

All LinkedIn actions are comprehensively logged:

  • Request and response payloads (with PII redacted)
  • Execution timing and duration
  • Success/failure status with error details
  • Rate limit tracking

View logs at Manage > Data & Logs > Integration Logs and filter by LinkedIn.

Automatic Redaction

Sensitive data is automatically redacted before storage:

  • OAuth access and refresh tokens
  • Email addresses and phone numbers
  • Profile image URLs with signed tokens

Content Validation

Actions validate parameters before execution:

  • Text length limits enforced
  • URL validation for article sharing
  • Domain whitelisting (when configured)

Troubleshooting

OAuth Authorization Fails

Problem: Popup closes without completing authorization

Solutions:

  1. Verify Client ID and Secret are correct
  2. Check redirect URI matches exactly (including http/https)
  3. Ensure required products are enabled on your LinkedIn app
  4. Check popup blockers aren't preventing the window

Token Expired

Problem: Actions fail with "token expired" error

Solutions:

  1. Navigate to Build > Connections > LinkedIn
  2. Click Refresh Token on the connection
  3. If refresh fails, re-authorize the connection

Rate Limit Exceeded

Problem: Actions fail with "rate limit exceeded"

Solutions:

  1. Wait until midnight UTC for daily reset
  2. Check current usage in connection details
  3. Reduce posting frequency
  4. Consider using multiple connections

Post Not Appearing on LinkedIn

Problem: Action succeeds but post isn't visible

Solutions:

  1. Check LinkedIn directly for the post
  2. Verify visibility setting (private posts only visible to you)
  3. LinkedIn may take 1-2 minutes to process posts
  4. Check for LinkedIn account restrictions

Tool Not Appearing in Agent

Problem: LinkedIn tool not available when configuring agent

Solutions:

  1. Verify the action is Active (not disabled)
  2. Check the connection is Active
  3. Ensure the tool was granted to this agent
  4. Refresh the page

Company Page Actions Fail

Problem: Company page operations return 403

Solutions:

  1. Verify you have admin access to the company page
  2. Check Community Management API is approved
  3. Re-authorize with company page scopes
  4. Contact LinkedIn support if issues persist

Best Practices

Content Quality

  • Keep posts concise and professional
  • Include calls-to-action when appropriate
  • Use domain whitelisting for article sharing to prevent inappropriate links

Security

  • Use separate LinkedIn apps for development and production
  • Set token expiration reminders
  • Regularly audit action usage in Integration Logs
  • Enable "Require Confirmation" for high-impact actions

Agent Instructions

Help agents use LinkedIn tools effectively:

When posting to LinkedIn:
1. Keep posts under 700 characters for best engagement
2. Use professional tone matching executive's style
3. Include relevant hashtags (2-3 maximum)
4. Set visibility to "connections" for sensitive updates
5. Always wait for confirmation before posting

Rate Limit Management

  • Spread posts throughout the day rather than batching
  • Use read-only actions for monitoring before posting
  • Consider the 25 post/day limit when planning campaigns