unipile-linkedin
Provides a CLI to interact with LinkedIn via the Unipile API using ./scripts/linkedin.mjs. It requires UNIPILE_DSN and UNIPILE_ACCESS_TOKEN, instructs running ./scripts/linkedin.mjs (shell execution), and makes network calls to https://api1.unipile.com:13111 and https://dashboard.unipile.com.
Unipile LinkedIn Skill
This repository contains a ClawHub Skill for interacting with LinkedIn via the Unipile API. It allows you to send messages, view profiles, manage connections, create posts, and react to content programmatically.
About ClawHub
ClawHub is a platform for sharing and discovering agent skills. A "skill" in ClawHub is a folder containing a SKILL.md file that defines how an agent can use the tools provided in the repository.
The SKILL.md file in this repository is the source of truth for the skill's definition. This README.md provides developer documentation for setting up and using this repository directly.
Setup
Prerequisites
- Functions with Node.js (v18+ recommended)
- A Unipile account and API access. Get your credentials from dashboard.unipile.com.
Installation
-
Clone the repository:
git clone https://github.com/sudhanshu746/unipile-linkedin-skill.git cd unipile-linkedin-skill -
Install dependencies:
npm install -
Configure Environment Variables: You can set these in your shell or create a
.envfile (if you adddotenvsupport to your runner).UNIPILE_DSN: Your Unipile API endpoint (e.g.,https://api1.unipile.com:13111)UNIPILE_ACCESS_TOKEN: Your Unipile access token
Usage
You can run the skill's commands directly using the provided CLI script in scripts/linkedin.mjs.
Syntax:
./scripts/linkedin.mjs <command> [options]
Account Management
- List connected accounts:
./scripts/linkedin.mjs accounts - Get account details:
./scripts/linkedin.mjs account <account_id>
Messaging
- List chats:
./scripts/linkedin.mjs chats [--account_id=X] [--limit=N] [--unread] - Get chat details:
./scripts/linkedin.mjs chat <chat_id> - List messages in a chat:
./scripts/linkedin.mjs messages <chat_id> [--limit=N] - Send a message:
./scripts/linkedin.mjs send <chat_id> "Hello there!" - Start a new chat:
./scripts/linkedin.mjs start-chat <account_id> "Hello!" --to=<user_id>[,<user_id>] [--inmail]
Profiles
- View a profile:
./scripts/linkedin.mjs profile <account_id> <identifier> [--sections=experience,education] [--notify]identifier: LinkedIn user ID or profile URL/username.--notify: If set, sends a profile view notification.
- View your own profile:
./scripts/linkedin.mjs my-profile <account_id> - View a company profile:
./scripts/linkedin.mjs company <account_id> <identifier> - List your connections:
./scripts/linkedin.mjs relations <account_id> [--limit=N]
Invitations
- Send connection request:
./scripts/linkedin.mjs invite <account_id> <provider_id> "Optional message" - List pending sent invitations:
./scripts/linkedin.mjs invitations <account_id> [--limit=N] - Cancel an invitation:
./scripts/linkedin.mjs cancel-invite <account_id> <invitation_id>
Posts & Interactions
- List posts from user or company:
./scripts/linkedin.mjs posts <account_id> <identifier> [--company] [--limit=N] - Get a specific post:
./scripts/linkedin.mjs post <account_id> <post_id> - Create a post:
./scripts/linkedin.mjs create-post <account_id> "My new post content!" - List comments on a post:
./scripts/linkedin.mjs comments <account_id> <post_id> [--limit=N] - Add a comment:
./scripts/linkedin.mjs comment <account_id> <post_id> "Great post!" - React to a post:
./scripts/linkedin.mjs react <account_id> <post_id> --type=like- Reaction types:
like,celebrate,support,love,insightful,funny
- Reaction types:
Attendees (Contacts)
- List people you have messaged:
./scripts/linkedin.mjs attendees [--account_id=X] [--limit=N]
Contributing
- Make changes to
scripts/linkedin.mjs. - Update
SKILL.mdto reflect any new CLI usage or features. - Update this
README.mdif necessary.