# Create Post — Bluesky by Unshape

> Creates a new post in Bluesky. See the documentation

- Key: `bluesky_by_unshape-create-post`
- Type: Action (Write)
- Version: 0.0.2
- App: Bluesky by Unshape (`bluesky_by_unshape`) — https://pipedream.com/apps/bluesky-by-unshape.md
- This page (HTML): https://pipedream.com/apps/bluesky-by-unshape/actions/create-post
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/bluesky_by_unshape/actions/create-post/create-post.mjs

## Description

Creates a new post in Bluesky. [See the documentation](https://unshape.readme.io/reference/post_bluesky-create-post)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `content` | `string` | Yes | The body of the post |
| `embedUrl` | `string` | No | URL which will have an embed in the post if provided |
| `image` | `string` | No | URL of an image to add to the post |
| `tags` | `string[]` | No | Hashtags to add at the end of the post. This will truncate the text of the post. Example: #pipedream |
| `lang` | `string` | No | Post language. If set, will override Bluesky's language detection |
| `shareTheLove` | `boolean` | No | Will auto-post about Unshape if checked. This will only happen the first time, after that the information is stored in Stripe so the auto-post do not replay other times. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "bluesky_by_unshape",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "bluesky_by_unshape-create-post",
  arguments: {
    content: "Content",
    embedUrl: "Embed URL",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "bluesky_by_unshape-create-post",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    bluesky_by_unshape: { authProvisionId: "apn_xxxxxxx" },
    content: "Content",
    embedUrl: "Embed URL",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "bluesky_by_unshape-create-post",
    "configured_props": {
      "bluesky_by_unshape": { "authProvisionId": "apn_xxxxxxx" },
      "content": "Content",
      "embedUrl": "Embed URL"
    }
  }'
```

---

- App: https://pipedream.com/apps/bluesky-by-unshape.md · All apps: https://pipedream.com/apps
