# Create Notebook — Evernote

> Creates a new notebook in Evernote. See the documentation

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

## Description

Creates a new notebook in Evernote. [See the documentation](https://dev.evernote.com/doc/reference/NoteStore.html#Fn_NoteStore_createNotebook)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | The name of the notebook. |
| `defaultNotebook` | `boolean` | No | If true, this notebook should be used for new notes whenever the user has not (or cannot) specify a desired target notebook. |
| `published` | `boolean` | No | If this is set to true, then the Notebook will be accessible either to the public, or for business users to their business, via the 'publishing' or 'businessNotebook' specifications, which must also be set. If this is set to false, the Notebook will not be available to the public (or business). |
| `publishing` | `object` | Yes | If the Notebook has been opened for public access, then this will point to the set of publishing information for the Notebook (URI, description, etc.). A Notebook cannot be published without providing this information, but it will persist for later use if publishing is ever disabled on the Notebook. See the documentation for further details. |
| `stack` | `string` | No | If this is set, then the notebook is visually contained within a stack of notebooks with this name. All notebooks in the same account with the same 'stack' field are considered to be in the same stack. Notebooks with no stack set are "top level" and not contained within a stack. |

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

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: "evernote-create-notebook",
  arguments: {
    name: "Name",
    defaultNotebook: true,
  },
})
```

**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: "evernote-create-notebook",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    evernote: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    defaultNotebook: true,
  },
})

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": "evernote-create-notebook",
    "configured_props": {
      "evernote": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "defaultNotebook": true
    }
  }'
```

---

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