# Create Calendar Event — Teamioo

> Creates a new calendar event. See the documentation

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

## Description

Creates a new calendar event. [See the documentation](https://demo.teamioo.com/teamiooapi)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `eventType` | `string` | Yes | The type of the event, either 'personal', 'group' or 'office' |
| `title` | `string` | Yes | Event title. |
| `start` | `string` | Yes | Start DATE of the event. Time fragment of this datetime is ignored. |
| `end` | `string` | No | End DATE of the event. Time fragment of this datetime is ignored. |
| `startTime` | `string` | No | If present, time part of datetime indicates start time of the event. If omitted, the event is considered to be an "all day" event. |
| `endTime` | `string` | No | If present, time part of datetime indicates end time of the event. StartTime parameter must be present as well. |
| `note` | `string` | No | The event note (markdown supported). |
| `privacyLevel` | `string` | No | Visibility of the event. This does not apply to "group" calendar events. |
| `location` | `string` | No | Where the event takes place. |
| `invitedUsers` | `string[]` | No | Users invited to participate in the event. Each invited user receives an notification which he/she has to accept or reject. Options are loaded from the connected account. |
| `connectedUsers` | `string[]` | No | Users connected to this event. Combines well with calEventType. Only for "office" events. Options are loaded from the connected account. |
| `taggedUsers` | `string[]` | No | Tagged users - ignored in private tasks. Options are loaded from the connected account. |
| `tags` | `string[]` | No | Teamioo tags. Options are loaded from the connected account. |

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

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: "teamioo-create-calendar-event",
  arguments: {
    eventType: "Event Type",
    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: "teamioo-create-calendar-event",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    teamioo: { authProvisionId: "apn_xxxxxxx" },
    eventType: "Event Type",
    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": "teamioo-create-calendar-event",
    "configured_props": {
      "teamioo": { "authProvisionId": "apn_xxxxxxx" },
      "eventType": "Event Type",
      "title": "Title"
    }
  }'
```

---

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