# Create Note — Wealthbox

> Create a note linked to a contact via POST /notes. Run List Contact Options to find the id of the contact to link the note to. Example: create a note with body Called client to discuss Q3 portfolio review linked to contact id 67890…

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

## Description

Create a note linked to a contact via POST /notes. Run **List Contact Options** to find the id of the contact to link the note to. Example: create a note with body `Called client to discuss Q3 portfolio review` linked to contact id `67890`; returns the note object including `id`, `content`, `linked_to`, `visible_to`, and `created_at`. [See the documentation](https://dev.wealthbox.com/#notes-retrieve-all-notes-post)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `body` | `string` | Yes | The main body text of the note. Example: Called client to discuss Q3 portfolio review. |
| `linkedToId` | `string` | Yes | Free-form id of the resource to link the note to. Run List Contact Options first. Example: 67890. |
| `linkedToType` | `string` | No | Type of the linked resource. Defaults to Contact (the only supported type). |
| `visibleTo` | `string` | No | Note visibility. One of Everyone or Private. Defaults to Everyone. |
| `tags` | `string[]` | No | Optional list of tag name strings to attach to the note. Example: portfolio, q3-review. |

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

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: "wealthbox-create-note",
  arguments: {
    body: "Body",
    linkedToId: "Linked To 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: "wealthbox-create-note",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    wealthbox: { authProvisionId: "apn_xxxxxxx" },
    body: "Body",
    linkedToId: "Linked To 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": "wealthbox-create-note",
    "configured_props": {
      "wealthbox": { "authProvisionId": "apn_xxxxxxx" },
      "body": "Body",
      "linkedToId": "Linked To ID"
    }
  }'
```

---

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