import { CalendlyIcon } from '@/components/icons'
import type { TriggerConfig } from '@/triggers/types'
export const calendlyWebhookTrigger: TriggerConfig = {
id: 'calendly_webhook',
name: 'Calendly Webhook',
provider: 'calendly',
description: 'Trigger workflow from any Calendly webhook event',
version: '1.0.0',
icon: CalendlyIcon,
subBlocks: [
{
id: 'apiKey',
title: 'Personal Access Token',
type: 'short-input',
placeholder: 'Enter your Calendly personal access token',
password: true,
required: true,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'calendly_webhook',
},
},
{
id: 'organization',
title: 'Organization URI',
type: 'short-input',
placeholder: 'https://api.calendly.com/organizations/XXXXXX',
description:
'Organization URI for the webhook subscription. Get this from "Get Current User" operation.',
required: true,
mode: 'trigger',
condition: {
field: 'selectedTriggerId',
value: 'calendly_webhook',
},
},
{
id: 'triggerInstructions',
title: 'Setup Instructions',
hideFromPreview: true,
type: 'text',
defaultValue: [
'Note: This trigger requires a paid Calendly subscription (Professional, Teams, or Enterprise plan).',
'Get your Personal Access Token from Settings > Integrations > API & Webhooks in your Calendly account.',
'Use the "Get Current User" operation in a Calendly block to retrieve your Organization URI.',
'The webhook will be automatically created in Calendly when you deploy the workflow.',
'This webhook subscribes to all Calendly events (invitee created, invitee canceled, and routing form submitted). Use the event field in the payload to determine the event type.',
]
.map(
(instruction, index) =>
`