# LinkedIn

Source: https://docs.autessa.com/docs/tools/linkedin

> Tool types for drafting, publishing, and listing LinkedIn posts through a LinkedIn connector.

# LinkedIn

Let agents write LinkedIn posts as reviewable drafts, publish approved drafts to the connected profile or organization, and list what's in the pipeline.

Every tool on this page requires a LinkedIn connector (see
[Connectors](/docs/guide/connectors.md)); pass its ID as `connectorId`. Drafts
live in an AutessaDB drafts table that the connector provisions, so a human
can review and edit a row before anything goes live — publishing is a
separate, explicit step. A published row is stamped `status = PUBLISHED` with
its `linkedin_post_urn`, and can't be published twice.

## Create a draft **TOOL** `LINKEDIN_CREATE_DRAFT`

Inserts a new row into the connector's drafts table with `status = DRAFT` —
nothing is sent to LinkedIn yet. `postContent` becomes the post body, and the
optional `imageUrl` (JPG, PNG, or GIF) is stored alongside it and only
uploaded to LinkedIn at publish time. The tool returns the new `recordId`,
which the other LinkedIn tools use to reference the draft.

### Example

```json title="Tool config"
{
  "toolType": "LINKEDIN_CREATE_DRAFT",
  "connectorId": "V1StGXR8Z5",
  "postContent": "@@{POST_CONTENT}",
  "imageUrl": "@@{IMAGE_URL}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `postContent` (string) — Required string value.
- `imageUrl` (string · optional) — Optional - URL of image to attach (JPG, PNG, or GIF)

## Update a post **TOOL** `LINKEDIN_UPDATE_POST`

Edits an existing draft row in place. `postContent` and `imageUrl` are both
optional — only the fields you provide are changed, so you can swap the image
without touching the copy. This edits the AutessaDB row, not LinkedIn: it has
no effect on a post that has already been published.

### Example

```json title="Tool config"
{
  "toolType": "LINKEDIN_UPDATE_POST",
  "connectorId": "V1StGXR8Z5",
  "recordId": 42,
  "postContent": "@@{REVISED_CONTENT}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `recordId` (integer) — AutessaDB record ID of the post to update
- `postContent` (string · optional) — New content (optional - only updates if provided)
- `imageUrl` (string · optional) — New image URL (optional - only updates if provided)

## Publish a post **TOOL** `LINKEDIN_PUBLISH_POST`

Reads the draft row, uploads its image to LinkedIn if one is set, and creates
the post publicly on the connected account's main feed. The row must still be
in `DRAFT` status — publishing an already-published record fails with
`ALREADY_PUBLISHED`. On success the row is updated to `status = PUBLISHED`
and the returned `postUrn` is stored in the `linkedin_post_urn` column.

### Example

```json title="Tool config"
{
  "toolType": "LINKEDIN_PUBLISH_POST",
  "connectorId": "V1StGXR8Z5",
  "recordId": 42
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `recordId` (integer) — AutessaDB record ID of the draft to publish

## List drafts **TOOL** `LINKEDIN_LIST_DRAFTS`

Returns rows from the drafts table where `status = DRAFT`, newest first, up
to `limit` (default 10). Each entry includes the `recordId`, content, and
image URL, so an agent can present pending drafts for approval and then
publish the chosen one by ID.

### Example

```json title="Tool config"
{
  "toolType": "LINKEDIN_LIST_DRAFTS",
  "connectorId": "V1StGXR8Z5",
  "limit": 10
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `limit` (integer) — Maximum number of drafts to return (default: 10)

## List published posts **TOOL** `LINKEDIN_LIST_PUBLISHED`

The counterpart to listing drafts: returns rows where `status = PUBLISHED`,
up to `limit` (default 10), including each post's stored LinkedIn post URN.
Useful for reviewing what the agent has already shipped before drafting
something new.

### Example

```json title="Tool config"
{
  "toolType": "LINKEDIN_LIST_PUBLISHED",
  "connectorId": "V1StGXR8Z5",
  "limit": 10
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `limit` (integer) — Maximum number of published posts to return (default: 10)

## Related

- [Tool Types overview](/docs/tools.md)
- [Tools guide](/docs/guide/agentic/tools.md)
- [Connectors guide](/docs/guide/connectors.md)
- [Twitter / X tool types](/docs/tools/twitter.md)
- [Facebook tool types](/docs/tools/facebook.md)
- [Bluesky tool types](/docs/tools/bluesky.md)

