# Create Post — Canny

> Create a post. See the documentation

- Key: `canny-create-post`
- Type: Action (Write)
- Version: 0.0.1
- App: Canny (`canny`) — https://pipedream.com/apps/canny.md
- This page (HTML): https://pipedream.com/apps/canny/actions/create-post
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/canny/actions/create-post/create-post.mjs

## Description

Create a post. [See the documentation](https://developers.canny.io/api-reference#create_post)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `authorId` | `string` | Yes | The ID of the author of the post Options are loaded from the connected account. |
| `boardId` | `string` | Yes | The ID of a board Options are loaded from the connected account. |
| `title` | `string` | Yes | The title of the post |
| `details` | `string` | Yes | The details of the post |
| `categoryId` | `string` | No | The ID of a category Options are loaded from the connected account. |
| `eta` | `string` | No | The estimated date of the post's completion. In the format of MM/YYYY, eg, 06/2022. |
| `etaPublic` | `boolean` | No | If the ETA should be made visible to all users |
| `ownerId` | `string` | No | The ID of the user responsible for the completion of the work described in the post Options are loaded from the connected account. |
| `imageUrls` | `string[]` | No | An array of the URLs of post's images |
| `customFields` | `object` | No | Any custom fields associated with the post. Each field name (key) must be between 0 and 30 characters long. If field values are strings, they must be less than 200 characters long. |

## 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": "canny",
      },
    },
  },
)

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: "canny-create-post",
  arguments: {
    authorId: "Author ID",
    boardId: "Board ID",
  },
})
```

**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: "canny-create-post",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    canny: { authProvisionId: "apn_xxxxxxx" },
    authorId: "Author ID",
    boardId: "Board ID",
  },
})

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": "canny-create-post",
    "configured_props": {
      "canny": { "authProvisionId": "apn_xxxxxxx" },
      "authorId": "Author ID",
      "boardId": "Board ID"
    }
  }'
```

---

- App: https://pipedream.com/apps/canny.md · All apps: https://pipedream.com/apps
