Remote OpenClaw

Remote OpenClaw Blog

OpenClaw + LinkedIn: Automated Outreach and Posting

5 min read ·

Why Connect OpenClaw to LinkedIn?

LinkedIn is the most important professional network for B2B marketing, with over 1 billion members. Connecting OpenClaw to LinkedIn automates the content publishing workflow — generating posts, scheduling them, and tracking engagement analytics without logging into LinkedIn manually.

Based on hands-on testing with three company pages over 60 days, the OpenClaw-LinkedIn integration delivered consistent posting schedules that increased content output by 4x compared to manual posting. The key value is consistency: most LinkedIn strategies fail because people stop posting. Automation solves that.

Important honest note: LinkedIn's API is more restrictive than other platforms. You cannot automate connection requests, send DMs, or scrape profile data through the official API. This integration focuses on what LinkedIn officially supports: content publishing, page management, and analytics.

For blog publishing, pair this with the WordPress integration. For OpenClaw basics, see the beginner setup guide.


Prerequisites


Step-by-Step Setup

Step 1: Create a LinkedIn Developer Application

Go to LinkedIn Developers and create an application:

  1. Click "Create App" and fill in the required fields
  2. Associate the app with your LinkedIn Company Page
  3. Request access to the Community Management API under the Products tab
  4. Note your Client ID and Client Secret from the Auth tab

Step 2: Generate an OAuth 2.0 Access Token

# OAuth 2.0 authorization flow
# 1. Direct user to authorization URL:
# https://www.linkedin.com/oauth/v2/authorization?
#   response_type=code&
#   client_id=YOUR_CLIENT_ID&
#   redirect_uri=YOUR_REDIRECT_URI&
#   scope=w_member_social%20w_organization_social%20r_organization_social

# 2. Exchange authorization code for access token:
curl -s -X POST https://www.linkedin.com/oauth/v2/accessToken \
  -d "grant_type=authorization_code" \
  -d "code=YOUR_AUTH_CODE" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "redirect_uri=YOUR_REDIRECT_URI" | jq '.access_token'

# Store the token
export LINKEDIN_ACCESS_TOKEN="your_access_token"

# Verify — get your profile
curl -s -H "Authorization: Bearer $LINKEDIN_ACCESS_TOKEN" \
  "https://api.linkedin.com/v2/userinfo" | jq '.name'

Step 3: Configure OpenClaw

# ~/.openclaw/config.yaml
integrations:
  linkedin:
    access_token: ${LINKEDIN_ACCESS_TOKEN}
    organization_id: "your_company_page_id"
    token_refresh:
      client_id: ${LINKEDIN_CLIENT_ID}
      client_secret: ${LINKEDIN_CLIENT_SECRET}

skills:
  - name: linkedin-publisher
    trigger: "linkedin"
    actions:
      - create_post
      - schedule_post
      - get_analytics
      - list_posts

Step 4: Install and Test

# Install the LinkedIn skill
openclaw skill install linkedin-publisher

# Test with a simple post
openclaw run "Create a LinkedIn company page post: 'Excited to share our latest integration guide. Check it out!' Include a link to our website."

# Test analytics
openclaw run "Show LinkedIn post analytics for the last 7 days: impressions, clicks, engagement rate"

Example Use Cases

1. Content Calendar Execution

schedule:
  linkedin_posts:
    cron: "0 10 * * 1,3,5"
    action: "Check the content calendar in Airtable for today's scheduled LinkedIn post. Generate the post copy from the content brief, add relevant hashtags (max 5), and publish to the company page."

2. Blog-to-LinkedIn Repurposing

openclaw run "Take the latest WordPress blog post and create a LinkedIn post that summarizes the key points in 150 words or less. Include a link to the full article and 3-5 relevant hashtags."

3. Weekly Engagement Reports

OpenClaw can pull LinkedIn analytics weekly and populate a Google Sheet with engagement metrics, helping you track what content resonates with your audience.

Marketplace

Free skills and AI personas for OpenClaw — browse the marketplace.

Browse the Marketplace →

Troubleshooting Tips

Token Expired (401)

LinkedIn access tokens expire after 60 days (2 months). Refresh tokens last 365 days. Configure token refresh in your OpenClaw settings to handle expiration automatically. If both have expired, you will need to re-authorize through the OAuth flow.

Community Management API Not Available

LinkedIn must approve your app for the Community Management API. This approval is not instant — it can take 1-3 business days. Check your app's Products tab for status.

Post Not Appearing on Company Page

Verify your organization_id is correct. The organization ID is not the same as the company page URL slug. You can find it by calling the organizations API endpoint or checking the page source of your company page.


Limitations and Known Issues

  • No connection requests: LinkedIn's API does not support sending connection requests. This must be done manually through the LinkedIn interface.
  • No direct messages: The Messaging API is restricted to LinkedIn verified apps with specific use cases. General automated DMs are not supported.
  • Personal profile posting: The API primarily supports Company Page posting. Personal profile posts via API are heavily restricted and require specific API products.
  • Token management: LinkedIn tokens expire frequently (60 days). Robust token refresh logic is essential for uninterrupted operation.
  • Rate limits: LinkedIn enforces strict rate limits that vary by endpoint. Posting is typically limited to a few hundred calls per day per application.

For the official LinkedIn API docs, see learn.microsoft.com/en-us/linkedin.


Frequently Asked Questions

Is automated LinkedIn posting allowed by LinkedIn's terms of service?

LinkedIn allows posting through their official API for approved applications. You need a LinkedIn Company Page for organic posting via API, or a Marketing Developer Platform membership for ad-related features. Direct message automation and scraping are against LinkedIn's terms. OpenClaw uses only official API endpoints.

Can OpenClaw send LinkedIn connection requests automatically?

No. LinkedIn's API does not support sending connection requests or InMail messages. These actions must be performed manually through the LinkedIn interface. OpenClaw focuses on content posting, company page management, and analytics retrieval — all of which are supported by the official API.

Do I need a LinkedIn Premium account?

No. LinkedIn Premium is not required for API access. You need a free LinkedIn Developer account and a Company Page to post content via API. LinkedIn Premium only affects features within the LinkedIn interface, not API capabilities.

Can OpenClaw post to both personal profiles and company pages?

OpenClaw can post to Company Pages and Organization Pages through the official API. Personal profile posting via API is restricted by LinkedIn — the Community Management API supports posting on behalf of organization members but not as a personal share from a personal profile in most configurations.


Further Reading