# Create Monitor — Pubrio

> Create a new signal monitor for jobs, news, or advertisements. See the documentation

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

## Description

Create a new signal monitor for jobs, news, or advertisements. [See the documentation](https://docs.pubrio.com/en/api-reference/endpoint/monitors/create)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | Name for the monitor |
| `detectionMode` | `string` | Yes | How the monitor detects changes: company_first monitors specific companies for signals, signal_first monitors signals and matches to companies |
| `signalTypes` | `string[]` | Yes | Types of signals to monitor |
| `destinationType` | `string` | Yes | How to deliver monitor results |
| `webhookUrl` | `string` | No | Webhook URL for delivery (required if destination_type is webhook) |
| `email` | `string` | No | Email address for delivery (required if destination_type is email) |
| `sequenceIdentifier` | `string` | No | Outreach sequence identifier (required if destination_type is sequences) |
| `description` | `string` | No | Description for the monitor |
| `frequencyMinute` | `integer` | No | How often to check for new signals in minutes |
| `maxDailyTrigger` | `integer` | No | Maximum number of triggers per day |
| `maxRecordsPerTrigger` | `integer` | No | Maximum records per trigger |
| `companies` | `string[]` | No | Company names to monitor |
| `domains` | `string[]` | No | Domains to monitor |
| `linkedinUrls` | `string[]` | No | LinkedIn URLs to monitor |
| `companyFilters` | `string` | No | JSON object of company filters |
| `signalFilters` | `string` | No | JSON array of signal filter objects |
| `peopleEnrichmentConfigs` | `string` | No | JSON array of people enrichment configuration objects |
| `isCompanyEnrichment` | `boolean` | No | Whether to enrich company data |
| `isPeopleEnrichment` | `boolean` | No | Whether to enrich people data |
| `maxFailureTrigger` | `integer` | No | Maximum number of failure triggers (1-10) |
| `maxRetryPerTrigger` | `integer` | No | Maximum retries per trigger (0-3) |
| `retryDelaySecond` | `integer` | No | Delay between retries in seconds (1-5) |
| `notificationEmail` | `string` | No | Email address for failure notifications |

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

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: "pubrio-create-monitor",
  arguments: {
    name: "Name",
    detectionMode: "Detection Mode",
  },
})
```

**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: "pubrio-create-monitor",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pubrio: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    detectionMode: "Detection Mode",
  },
})

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": "pubrio-create-monitor",
    "configured_props": {
      "pubrio": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "detectionMode": "Detection Mode"
    }
  }'
```

---

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