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:
- LinkedIn Developer Account - Register at https://www.linkedin.com/developers/
- LinkedIn App - Create an app with the appropriate products enabled
- OAuth Credentials - Have your Client ID and Client Secret ready
Step 1: Navigate to LinkedIn Settings
- Navigate to Build > Connections > LinkedIn
- Click Add Connection
- Select Personal Profile or Company Page
Step 2: Enter OAuth App Credentials
| Field | Description |
|---|---|
| Connection Name | Unique identifier (lowercase, no spaces) |
| Display Name | Human-readable name shown in the UI |
| Account Type | Personal Profile or Company Page |
| Client ID | From your LinkedIn Developer App |
| Client Secret | From your LinkedIn Developer App (stored encrypted) |
Step 3: Authorize with LinkedIn
- Click Authorize with LinkedIn
- A popup opens to LinkedIn's authorization page
- Review and approve the requested permissions
- 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
- Go to https://www.linkedin.com/developers/apps
- Click Create app
- 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
- Go to the Auth tab in your LinkedIn app
- 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
- Development:
Required Products
Enable the following products for your LinkedIn app:
| Product | Required For |
|---|---|
| Share on LinkedIn | Personal profile posts |
| Sign In with LinkedIn using OpenID Connect | Profile information |
| Community Management API | Company page operations (requires approval) |
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 identificationprofile- Profile dataemail- Email addressw_member_social- Create posts
Company Page:
openid,profile,email- Same as personalw_organization_social- Post on behalf of organizationr_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 Type | Account Types | Description |
|---|---|---|
create_post | Personal, Company | Create a new post |
reply_message | Personal | Reply to inbox messages |
share_article | Personal, Company | Share links with commentary |
Community Management Actions
| Action Type | Account Types | Description |
|---|---|---|
add_comment | Company | Comment on company posts |
add_reaction | Company | React to posts (like, celebrate, etc.) |
delete_post | Company | Delete company posts |
delete_comment | Company | Delete comments |
Analytics Actions
| Action Type | Account Types | Description |
|---|---|---|
get_recent_posts | Company | Get recent posts for monitoring |
get_post_engagement | Company | Get metrics (views, reactions, comments) |
get_follower_stats | Company | Get follower statistics |
get_activity_history | Personal, Company | Get audit trail of actions |
Creating LinkedIn Actions
After creating a connection, configure actions that agents can use.
Step 1: Navigate to Actions
- Navigate to Build > Connections > LinkedIn
- Click on your connection
- Go to the Actions tab
- Click Add Action
Step 2: Basic Configuration
| Field | Description |
|---|---|
| Action Type | Select from 11 available types |
| Action Name | Unique identifier for this action |
| Display Name | Name shown to agents |
| Tool Name | The tool name agents will use |
| Tool Description | Helps agent decide when to use this tool |
Step 3: Action Settings
Settings vary by action type:
For create_post:
| Setting | Description |
|---|---|
| Default Visibility | Public, Connections, or Private |
| Max Text Length | Maximum characters (default: 3000) |
| Require Confirmation | Human approval before posting |
For share_article:
| Setting | Description |
|---|---|
| Allowed Domains | Restrict which URLs can be shared |
| Require Confirmation | Human approval before sharing |
Step 4: Parameter Configuration
Each action has configurable parameters that agents provide:
Example: create_post parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Post text content (max 3000 chars) |
visibility | string | No | public, connections, or private |
imageUrl | string | No | Optional image URL to attach |
Step 5: Grant Tool Access
After creating an action, grant access to agents:
- A modal appears to select which agents can use this tool
- Select AICOS, SMEs, or regular agents
- Click Save to grant access
Assigning Tools to Agents
If you didn't grant access during creation:
- Navigate to Build > AI Agents > Agents
- Edit the agent that should use LinkedIn
- In the Tools section, find your LinkedIn tools
- Check the boxes to enable them
- Save the agent
Rate Limiting
LinkedIn enforces strict API rate limits to protect their platform.
Default Limits
| Limit | Value | Resets |
|---|---|---|
| Posts per day | 25 | Midnight UTC |
| Read operations | 100/day | Midnight UTC |
| Analytics queries | Varies | Per endpoint |
Configuration
You can customize limits per connection:
- Navigate to Build > Connections > LinkedIn
- Click on your connection
- 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:
- Verify Client ID and Secret are correct
- Check redirect URI matches exactly (including http/https)
- Ensure required products are enabled on your LinkedIn app
- Check popup blockers aren't preventing the window
Token Expired
Problem: Actions fail with "token expired" error
Solutions:
- Navigate to Build > Connections > LinkedIn
- Click Refresh Token on the connection
- If refresh fails, re-authorize the connection
Rate Limit Exceeded
Problem: Actions fail with "rate limit exceeded"
Solutions:
- Wait until midnight UTC for daily reset
- Check current usage in connection details
- Reduce posting frequency
- Consider using multiple connections
Post Not Appearing on LinkedIn
Problem: Action succeeds but post isn't visible
Solutions:
- Check LinkedIn directly for the post
- Verify visibility setting (private posts only visible to you)
- LinkedIn may take 1-2 minutes to process posts
- Check for LinkedIn account restrictions
Tool Not Appearing in Agent
Problem: LinkedIn tool not available when configuring agent
Solutions:
- Verify the action is Active (not disabled)
- Check the connection is Active
- Ensure the tool was granted to this agent
- Refresh the page
Company Page Actions Fail
Problem: Company page operations return 403
Solutions:
- Verify you have admin access to the company page
- Check Community Management API is approved
- Re-authorize with company page scopes
- 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
Related Topics
- Tools Overview - All available agent tools
- Agents - Configure agents to use tools
- HTTP API Tools - Connect other REST APIs
- Agent Executions - View tool execution logs