Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

1.4 KB
Raw Blame
import {
  createSessionsUsWebhookTrigger,
  SessionsUsWebhookTrigger,
} from '../common';

export const eventPublished = createSessionsUsWebhookTrigger({
  name: 'event_published',
  displayName: 'Event Published',
  description: 'Triggered when an event is published.',
  aiMetadata: {
    description: 'Fires when an event goes from draft to published, meaning it is now live and open for registration. The payload includes the underlying session, the event id and slug, and the owning participant.',
  },
  trigger: SessionsUsWebhookTrigger.EVENT_PUBLISHED,
  storeKey: 'sessions_event_published_trigger',
  sampleData: {
    session: {
      id: '8208f783-fba9-4045-ae6e-dea64f5ab7ea',
      name: 'My Best Event',
      description: null,
      quickSession: false,
      room: null,
      createdAt: '2023-11-30T10:46:13.675Z',
      startAt: '2023-11-30T11:00:00.000Z',
      actualStart: null,
      endedAt: null,
      booking: null,
      event: {
        id: '52259a5f-f706-41d9-8b58-1b8796bd0ffc',
        slug: 'f34bd8a5-a7d9-47f2-aee9-031d10a76b75-83897/my-best-event',
      },
      participants: [
        {
          id: 'd98f984f-982b-4a17-8a3d-093a4a774b49',
          isOwner: true,
          guest: null,
          user: {
            id: '9090bd7c-0cf9-4716-837e-43f3821a65c4',
            email: '[email protected]',
            lastName: 'Pieces',
            firstName: 'Active',
          },
        },
      ],
    },
  },
});