LinkedIn connector

Publish LinkedIn posts for a person or a company page, upload images, and read posts from AgentRuntime workflows.

On this page

The linkedin connector connects workflows to the LinkedIn API. Use it to publish posts to a member's feed or a company page, attach an image, list and read posts, and look up the organizations you administer. Most teams add a Human approval step before anything is published.

Prerequisites

  • A LinkedIn developer app with the products your use case needs (for example sharing and community management), from the LinkedIn Developer Portal.
  • The app's client ID and client secret, and a refresh token for the member who will post. Getting the token is a one-time OAuth step you do outside AgentRuntime.
  • Admin rights on any company page you will post to.
  • The project_contributor role or higher in your workspace, which lets you manage connections and MCP instances. See Roles and permissions.

Connect in AgentRuntime

  1. Prepare your LinkedIn app

    In the LinkedIn Developer Portal, open your app and copy the client ID and client secret. Complete the OAuth authorization for the member who will post, and keep the resulting refresh token safe. For a quick test you can use a short-lived access token instead.

  2. Add the connector to your workspace

    Click MCP in the sidebar, then Add connectors. Find LinkedIn in the App catalog, select it, and click Add to workspace. The instance now appears on the MCP connectors page. See MCP instances.

  3. Add your credentials to a profile

    Open the new instance to reach Instance config. Under Profiles for this connector, click New profile, enter a Display name, and on the Type secrets on this screen tab fill in linkedin_client_id, linkedin_client_secret, and linkedin_refresh_token (or linkedin_access_token for a short test). Set Status to Active — can be used in workflows and click Save. Then click Use this profile for workflows.

  4. Test it

    In Workflow Studio, add the linkedin_get_userinfo tool from your LinkedIn instance (use Browse platform MCP if it is not listed), fill in its arguments, and run the workflow. A successful step means the connection works. This tool has no arguments and returns the member the token belongs to. Then run linkedin_list_organizations to see the company pages you can post to.

Note

To reuse the same credentials in more than one profile, save them first under Connections → New custom connection, using the exact key names from Configuration, then choose Use a saved connection on the profile instead.

There is no Sign in with LinkedIn button in the Console; LinkedIn credentials are entered as keys.

What you can build

  • Approved posts. An LLM drafts copy from a blog item, a Human step approves it, and linkedin_create_company_update or linkedin_create_share_update publishes it.
  • Posts with images. linkedin_upload_image returns an image URN that you pass as image_asset_id when you create the post.
  • Content calendar. A sheet row marked "Ready" triggers a post, and the workflow updates the row afterward.
  • Post review. linkedin_list_posts by author URN gathers posts for a report, and linkedin_delete_post removes one after approval.

Tools

The Required arguments column lists the fields the tool's input schema marks as required. Some of them are optional in practice; if you have nothing to set, pass an empty value such as "", [], {}, or false.

Tools marked Delete remove a post. linkedin_custom_api_call sends a raw LinkedIn API request with the method, path, and body you give it.

ToolAccessWhat it doesRequired arguments
linkedin_create_company_updateWriteCreate a LinkedIn company page post.organization_id, text
linkedin_create_share_updateWriteCreate a personal LinkedIn post.text
linkedin_custom_api_callWriteMake a custom LinkedIn API request.method, path
linkedin_delete_postDeleteDelete a LinkedIn post by URN.post_urn
linkedin_get_postReadGet a LinkedIn post by URN.post_urn
linkedin_get_userinfoReadGet the authenticated LinkedIn member profile from the OpenID userinfo endpoint.—
linkedin_list_organizationsReadList LinkedIn organizations the authenticated member can administer.—
linkedin_list_postsReadList LinkedIn posts by author URN.author_urn
linkedin_upload_imageWriteUpload an image for a LinkedIn post and return the image URN.image_base64

Example

Publish a company page post after approval. organization_id is the numeric ID from the organization URN.

{
  "id": "linkedin-post",
  "type": "mcp",
  "name": "Publish company post",
  "tool_name": "linkedin_create_company_update",
  "tool_args": {
    "organization_id": "{{input.org_id}}",
    "text": "{{steps.human-approve.result.approved_text}}",
    "link": "https://example.com/blog/new-feature",
    "link_title": "New feature launch"
  },
  "depends_on": [
    "human-approve"
  ],
  "timeout_s": 60
}

Configuration

KeyRequiredDescription
linkedin_client_idWith a refresh tokenLinkedIn OAuth client ID.
linkedin_client_secretWith a refresh tokenLinkedIn OAuth client secret.
linkedin_refresh_tokenRecommendedRefresh token used to get new access tokens.
linkedin_access_tokenTesting onlyAn access token used directly. It expires, so avoid it for real workflows.
linkedin_linkedin_versionNoThe LinkedIn-Version header, as YYYYMM. Default 202601.
linkedin_api_baseNoAPI base URL. Default https://api.linkedin.com.
linkedin_token_urlNoOAuth token URL. Default https://www.linkedin.com/oauth/v2/accessToken.

Troubleshooting

ProblemWhat to do
401 or token expiredUse the refresh token setup (client ID, client secret, refresh token) instead of a one-time access token.
Cannot post to a company pageThe member must administer that organization. Run linkedin_list_organizations to check.
An image is not attachedCall linkedin_upload_image first, then pass the URN it returns as image_asset_id.
Need an endpoint without a toolUse linkedin_custom_api_call with a method and path.
Edit this pageagentruntime-io/agentruntime-docs