CentercodeDitto
DittoPorygonAPI

Trigger Builder

Component for creating integration triggers with when/if/then logic.

Slack Trigger

1When
2If(optional)
3Then

Use {{field.path}} for dynamic values

Webhook Trigger

1When
2If(optional)
3Then

JSON payload template with {{field.path}} tokens

With Initial Values

1When
2If(optional)
3Then

Use {{field.path}} for dynamic values

Usage

import { TriggerBuilder } from '@/features/integrations/components';

<TriggerBuilder
  integrationType="slack" // or "webhook"
  initialEventType="insight.created"
  initialConditions={[
    { field: 'insight.severity', operator: 'gte', value: 4 }
  ]}
  initialActionConfig={{
    actionType: 'send_message',
    text: 'New bug: {{insight.title}}'
  }}
  initialEnabled={true}
  onSave={(data) => {
    // data: { eventType, conditions, config, isEnabled }
  }}
  onCancel={() => {}}
  isSaving={false}
/>