# Create Notification — Notiff (OAuth)

> Send a new notification to a user or system via notiff.io. See the documentation

- Key: `notiff_io-create-notification`
- Type: Action (Write)
- Version: 0.0.2
- App: Notiff (OAuth) (`notiff_io`) — https://pipedream.com/apps/notiff-io.md
- This page (HTML): https://pipedream.com/apps/notiff-io/actions/create-notification
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/notiff_io/actions/create-notification/create-notification.mjs

## Description

Send a new notification to a user or system via notiff.io. [See the documentation](https://notiff.io/articles/welcome-to-notiff-getting-started-with-your-notification-center)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `idNotificationSource` | `string` | Yes | To get your Notification Source ID, sign in to Notiff, go to the Settings menu with the gear icon on the top right, click the "Settings" option. Copy your Notification Source ID from the list. |
| `title` | `string` | Yes | The title of the notification. |
| `description` | `string` | Yes | The content/description of the notification. |
| `url` | `string` | Yes | The URL associated with the notification. |

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

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: "notiff_io-create-notification",
  arguments: {
    idNotificationSource: "ID Notification Source",
    title: "Title",
  },
})
```

**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: "notiff_io-create-notification",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    notiff_io: { authProvisionId: "apn_xxxxxxx" },
    idNotificationSource: "ID Notification Source",
    title: "Title",
  },
})

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": "notiff_io-create-notification",
    "configured_props": {
      "notiff_io": { "authProvisionId": "apn_xxxxxxx" },
      "idNotificationSource": "ID Notification Source",
      "title": "Title"
    }
  }'
```

---

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