unipile-linkedin

TotalClaw 作者 totalclaw

通过 Unipile API 与 LinkedIn 交互 - 发送消息、查看个人资料、管理连接、创建帖子、对内容做出反应。当用户要求在 LinkedIn 上向某人发送消息、检查 LinkedIn 消息、查看 LinkedIn 个人资料、发送连接请求、创建 LinkedIn 帖子或与 LinkedIn 内容交互时使用。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~sudhanshu746-unipile-linkedin
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~sudhanshu746-unipile-linkedin/file -o sudhanshu746-unipile-linkedin.md
# Unipile LinkedIn

Access LinkedIn through the Unipile API using the CLI script.

## Setup

Requires environment variables in `~/.openclaw/workspace/TOOLS.md` or shell:
- `UNIPILE_DSN` - Your Unipile API endpoint (e.g., `https://api1.unipile.com:13111`)
- `UNIPILE_ACCESS_TOKEN` - Your Unipile access token

Get credentials from [dashboard.unipile.com](https://dashboard.unipile.com).

## Usage

Run commands via the CLI script:

```bash
./scripts/linkedin.mjs <command> [options]
```

## Commands

### Account Management
```bash
./scripts/linkedin.mjs accounts                    # List connected accounts
./scripts/linkedin.mjs account <account_id>        # Get account details
```

### Messaging
```bash
./scripts/linkedin.mjs chats [--account_id=X] [--limit=N] [--unread]   # List chats
./scripts/linkedin.mjs chat <chat_id>                                   # Get chat details
./scripts/linkedin.mjs messages <chat_id> [--limit=N]                   # List messages in chat
./scripts/linkedin.mjs send <chat_id> "<text>"                          # Send message
./scripts/linkedin.mjs start-chat <account_id> "<text>" --to=<user_id>[,<user_id>] [--inmail]  # Start new chat
```

### Profiles
```bash
./scripts/linkedin.mjs profile <account_id> <identifier> [--sections=experience,education,skills] [--notify]
./scripts/linkedin.mjs my-profile <account_id>                          # Your own profile
./scripts/linkedin.mjs company <account_id> <identifier>                # Company profile
./scripts/linkedin.mjs relations <account_id> [--limit=N]               # Your connections
```

### Invitations
```bash
./scripts/linkedin.mjs invite <account_id> <provider_id> ["message"]    # Send connection request
./scripts/linkedin.mjs invitations <account_id> [--limit=N]             # List pending invites
./scripts/linkedin.mjs cancel-invite <account_id> <invitation_id>       # Cancel invitation
```

### Posts
```bash
./scripts/linkedin.mjs posts <account_id> <identifier> [--company] [--limit=N]  # List posts
./scripts/linkedin.mjs post <account_id> <post_id>                              # Get post
./scripts/linkedin.mjs create-post <account_id> "<text>"                        # Create post
./scripts/linkedin.mjs comments <account_id> <post_id> [--limit=N]              # List comments
./scripts/linkedin.mjs comment <account_id> <post_id> "<text>"                  # Add comment
./scripts/linkedin.mjs react <account_id> <post_id> [--type=like|celebrate|support|love|insightful|funny]
```

### Attendees
```bash
./scripts/linkedin.mjs attendees [--account_id=X] [--limit=N]           # List chat contacts
```

## Examples

```bash
# List all chats, only unread
./scripts/linkedin.mjs chats --unread

# Send a message
./scripts/linkedin.mjs send "abc123" "Thanks for connecting!"

# View someone's profile with experience section
./scripts/linkedin.mjs profile "myaccount" "john-doe-123" --sections=experience,about

# Send connection request with note
./scripts/linkedin.mjs invite "myaccount" "jane-smith-456" "Hi Jane, let's connect!"

# Create a LinkedIn post
./scripts/linkedin.mjs create-post "myaccount" "Excited to announce our new product launch! 🚀"

# React to a post
./scripts/linkedin.mjs react "myaccount" "post789" --type=celebrate
```

## Notes

- `identifier` can be a LinkedIn user ID or profile URL slug
- `account_id` is your connected LinkedIn account ID (get from `accounts` command)
- Use `--inmail` flag when messaging non-connections (requires LinkedIn Premium)

---

## 中文说明

# Unipile LinkedIn

通过 Unipile API 使用 CLI 脚本访问 LinkedIn。

## Setup

需要在 `~/.openclaw/workspace/TOOLS.md` 或 shell 中设置环境变量:
- `UNIPILE_DSN` - 你的 Unipile API 端点(例如 `https://api1.unipile.com:13111`)
- `UNIPILE_ACCESS_TOKEN` - 你的 Unipile 访问令牌

从 [dashboard.unipile.com](https://dashboard.unipile.com) 获取凭据。

## Usage

通过 CLI 脚本运行命令:

```bash
./scripts/linkedin.mjs <command> [options]
```

## Commands

### Account Management
```bash
./scripts/linkedin.mjs accounts                    # List connected accounts
./scripts/linkedin.mjs account <account_id>        # Get account details
```

### Messaging
```bash
./scripts/linkedin.mjs chats [--account_id=X] [--limit=N] [--unread]   # List chats
./scripts/linkedin.mjs chat <chat_id>                                   # Get chat details
./scripts/linkedin.mjs messages <chat_id> [--limit=N]                   # List messages in chat
./scripts/linkedin.mjs send <chat_id> "<text>"                          # Send message
./scripts/linkedin.mjs start-chat <account_id> "<text>" --to=<user_id>[,<user_id>] [--inmail]  # Start new chat
```

### Profiles
```bash
./scripts/linkedin.mjs profile <account_id> <identifier> [--sections=experience,education,skills] [--notify]
./scripts/linkedin.mjs my-profile <account_id>                          # Your own profile
./scripts/linkedin.mjs company <account_id> <identifier>                # Company profile
./scripts/linkedin.mjs relations <account_id> [--limit=N]               # Your connections
```

### Invitations
```bash
./scripts/linkedin.mjs invite <account_id> <provider_id> ["message"]    # Send connection request
./scripts/linkedin.mjs invitations <account_id> [--limit=N]             # List pending invites
./scripts/linkedin.mjs cancel-invite <account_id> <invitation_id>       # Cancel invitation
```

### Posts
```bash
./scripts/linkedin.mjs posts <account_id> <identifier> [--company] [--limit=N]  # List posts
./scripts/linkedin.mjs post <account_id> <post_id>                              # Get post
./scripts/linkedin.mjs create-post <account_id> "<text>"                        # Create post
./scripts/linkedin.mjs comments <account_id> <post_id> [--limit=N]              # List comments
./scripts/linkedin.mjs comment <account_id> <post_id> "<text>"                  # Add comment
./scripts/linkedin.mjs react <account_id> <post_id> [--type=like|celebrate|support|love|insightful|funny]
```

### Attendees
```bash
./scripts/linkedin.mjs attendees [--account_id=X] [--limit=N]           # List chat contacts
```

## Examples

```bash
# List all chats, only unread
./scripts/linkedin.mjs chats --unread

# Send a message
./scripts/linkedin.mjs send "abc123" "Thanks for connecting!"

# View someone's profile with experience section
./scripts/linkedin.mjs profile "myaccount" "john-doe-123" --sections=experience,about

# Send connection request with note
./scripts/linkedin.mjs invite "myaccount" "jane-smith-456" "Hi Jane, let's connect!"

# Create a LinkedIn post
./scripts/linkedin.mjs create-post "myaccount" "Excited to announce our new product launch! 🚀"

# React to a post
./scripts/linkedin.mjs react "myaccount" "post789" --type=celebrate
```

## Notes

- `identifier` 可以是 LinkedIn 用户 ID 或个人资料 URL slug
- `account_id` 是你已连接的 LinkedIn 账户 ID(通过 `accounts` 命令获取)
- 向非连接人发送消息时使用 `--inmail` 标志(需要 LinkedIn Premium)