# Create RSVP Template — Add to Calendar PRO

> Create an RSVP template. See the documentation

- Key: `add_to_calendar_pro-create-rsvp-template`
- Type: Action (Write)
- Version: 0.0.3
- App: Add to Calendar PRO (`add_to_calendar_pro`) — https://pipedream.com/apps/add-to-calendar-pro.md
- This page (HTML): https://pipedream.com/apps/add-to-calendar-pro/actions/create-rsvp-template
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/add_to_calendar_pro/actions/create-rsvp-template/create-rsvp-template.mjs

## Description

Create an RSVP template. [See the documentation](https://docs.add-to-calendar-pro.com/api/rsvp#add-an-rsvp-template)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `rsvpTemplateName` | `string` | Yes | The name of the RSVP template |
| `max` | `integer` | No | Max amount of seats; defaults to unlimited |
| `maxPP` | `integer` | No | Max seats per sign-up; defaults to 1 |
| `expires` | `string` | No | an optional expiration date as ISO 8601 UTC datetime |
| `maybeOption` | `boolean` | No | Whether to allow users to select a maybe option |
| `initialConfirmation` | `boolean` | No | If true, the initial sign-up will always be "confirmed" |
| `doi` | `boolean` | No | If true, each user will need to confirm his email |
| `headline` | `string` | No | The headline of the RSVP template |
| `text` | `string` | No | The text of the RSVP template |
| `fields` | `string[]` | No | The fields of the RSVP template. Example: [{ "type": "text", "name": "additional_info", "label": "Additional note", "required": false, "placeholder": "Type here...", "default": "Call me maybe" }] See the documentation for more information. |
| `emailRsvpDoi` | `integer` | No | The ID of an email template Options are loaded from the connected account. |
| `emailRsvpThankYou` | `integer` | No | The ID of an email template Options are loaded from the connected account. |
| `emailRsvpSignupConfirmation` | `integer` | No | The ID of an email template Options are loaded from the connected account. |
| `emailRsvpChangeConfirmation` | `integer` | No | The ID of an email template Options are loaded from the connected account. |
| `emailRsvpEventUpdate` | `integer` | No | The ID of an email template Options are loaded from the connected account. |
| `emailRsvpMagicLink` | `integer` | No | The ID of an email template Options are loaded from the connected account. |
| `emailRsvpSecondSignup` | `integer` | No | The ID of an email template 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": "add_to_calendar_pro",
      },
    },
  },
)

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: "add_to_calendar_pro-create-rsvp-template",
  arguments: {
    rsvpTemplateName: "RSVP Template Name",
    max: 10,
  },
})
```

**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: "add_to_calendar_pro-create-rsvp-template",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    add_to_calendar_pro: { authProvisionId: "apn_xxxxxxx" },
    rsvpTemplateName: "RSVP Template Name",
    max: 10,
  },
})

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": "add_to_calendar_pro-create-rsvp-template",
    "configured_props": {
      "add_to_calendar_pro": { "authProvisionId": "apn_xxxxxxx" },
      "rsvpTemplateName": "RSVP Template Name",
      "max": 10
    }
  }'
```

---

- App: https://pipedream.com/apps/add-to-calendar-pro.md · All apps: https://pipedream.com/apps
