diff --git a/apps/web/lib/webhooks/integrationTemplate.tsx b/apps/web/lib/webhooks/integrationTemplate.tsx index 242c8dcc..6c9c9f9c 100644 --- a/apps/web/lib/webhooks/integrationTemplate.tsx +++ b/apps/web/lib/webhooks/integrationTemplate.tsx @@ -21,7 +21,7 @@ const customTemplate = (props: WebhookIntegrationProps) => { const integrationTemplate = (webhookIntegration: string) => { switch (webhookIntegration) { case "https://discord.com/api/webhooks/": - return '{"content": "A new event has been scheduled","embeds": [{"color": 2697513,"fields": [{"name": "What","value": "{{title}} ({{type}})"},{"name": "When","value": "Start: {{startTime}} \\n End: {{endTime}} \\n Timezone: ({{organizer.timeZone}})"},{"name": "Who","value": "Organizer: {{organizer.name}} ({{organizer.email}}) \\n Booker: {{attendees.0.name}} ({{attendees.0.email}})" },{"name":"Description", "value":": {{description}}"},{"name":"Where","value":": {{location}} "}]}]}'; + return '{"content": "An event has been scheduled/updated","embeds": [{"color": 2697513,"fields": [{"name": "Event Trigger","value": "{{triggerEvent}}"}, {"name": "What","value": "{{title}} ({{type}})"},{"name": "When","value": "Start: {{startTime}} \\n End: {{endTime}} \\n Timezone: ({{organizer.timeZone}})"},{"name": "Who","value": "Organizer: {{organizer.name}} ({{organizer.email}}) \\n Booker: {{attendees.0.name}} ({{attendees.0.email}})" },{"name":"Description", "value":": {{description}}"},{"name":"Where","value":": {{location}} "}]}]}'; } }; diff --git a/apps/web/server/routers/viewer/webhook.tsx b/apps/web/server/routers/viewer/webhook.tsx index 579e95c5..e69fee1a 100644 --- a/apps/web/server/routers/viewer/webhook.tsx +++ b/apps/web/server/routers/viewer/webhook.tsx @@ -146,6 +146,7 @@ export const webhookRouter = createProtectedRouter() }; const data = { + triggerEvent: "PING", type: "Test", title: "Test trigger event", description: "", @@ -161,7 +162,7 @@ export const webhookRouter = createProtectedRouter() ], organizer: { name: "Cal", - email: "", + email: "no-reply@cal.com", timeZone: "Europe/London", language, },