Loopfour
Triggers

Event Triggers

React to platform events from Salesforce, HubSpot, and Slack

Event Triggers

Event triggers start workflows in response to events emitted by connected platforms -- Salesforce Change Data Capture and Platform Events, HubSpot property changes, and Slack messages. Unlike generic webhooks, event triggers are typed to a specific provider event so you only receive the changes you care about.

Configuration

Event triggers use a provider-specific type. The shape of the trigger depends on which platform you are subscribing to.

{
  "trigger": {
    "type": "salesforce_event",
    "eventKind": "cdc",
    "cdcEntity": "Opportunity",
    "cdcChangeTypes": ["create", "update"]
  }
}
FieldTypeRequiredDescription
typestringYesProvider event type (e.g. salesforce_event, hubspot_event, slack_event)
eventKindstringConditionalThe specific event kind for the provider
enabledbooleanNoEnable/disable the trigger (default: true)

Event triggers require an active OAuth connection to the source platform. Set up the connection before enabling the trigger.

Salesforce Events

Salesforce supports Platform Events and Change Data Capture (CDC).

{
  "trigger": {
    "type": "salesforce_event",
    "eventKind": "platform_event",
    "platformEventName": "Invoice_Created__e"
  }
}
{
  "trigger": {
    "type": "salesforce_event",
    "eventKind": "cdc",
    "cdcEntity": "Opportunity",
    "cdcChangeTypes": ["create", "update"]
  }
}

CDC Change Types:

  • create - Record created
  • update - Record updated
  • delete - Record deleted
  • undelete - Record restored

Salesforce CDC Input

{
  "input": {
    "ChangeEventHeader": {
      "entityName": "Opportunity",
      "changeType": "UPDATE",
      "changedFields": ["Amount", "StageName"]
    },
    "Id": "006xxx",
    "Name": "Big Deal",
    "Amount": 50000,
    "StageName": "Closed Won"
  }
}

HubSpot Events

React to HubSpot property changes and object lifecycle events.

{
  "trigger": {
    "type": "hubspot_event",
    "eventKind": "deal.propertyChange",
    "propertyName": "dealstage"
  }
}

HubSpot Event Kinds:

  • contact.propertyChange - Contact property changed
  • company.propertyChange - Company property changed
  • deal.propertyChange - Deal property changed
  • deal.creation - Deal created
  • deal.deletion - Deal deleted
  • * - Match all events

Slack Events

React to messages and interactions in a connected Slack workspace. Slack triggers use eventType (not eventKind) and support keyword, regex, and user filters.

{
  "trigger": {
    "type": "slack_event",
    "eventType": "message",
    "channelTypes": ["channel"],
    "keywords": ["invoice", "billing"]
  }
}

Common Slack event types:

  • message - A message was posted to a channel or DM
  • app_mention - The app was @mentioned
  • reaction_added / reaction_removed - An emoji reaction changed

Slack triggers require the relevant event subscriptions enabled on the Slack app. See Slack Triggers for the full event/command/interactive reference and the Slack integration for scope and setup details.

Complete Example

Notify finance when a Salesforce Opportunity moves to Closed Won:

{
  "name": "Closed Won Notification",
  "trigger": {
    "type": "salesforce_event",
    "eventKind": "cdc",
    "cdcEntity": "Opportunity",
    "cdcChangeTypes": ["update"]
  },
  "steps": [
    {
      "id": "check-stage",
      "type": "condition",
      "name": "Check if Closed Won",
      "config": {
        "conditions": {
          "left": "{{input.StageName}}",
          "operator": "eq",
          "right": "Closed Won"
        },
        "then": ["notify-finance"],
        "else": []
      }
    },
    {
      "id": "notify-finance",
      "type": "slack",
      "name": "Notify Finance",
      "config": {
        "action": "sendMessage",
        "channel": "#finance",
        "text": "{{input.Name}} closed for ${{input.Amount}}"
      }
    }
  ]
}

Troubleshooting

Trigger Not Firing

  1. Check the connection - The source platform must have an active OAuth connection
  2. Verify event subscription - Platform Events/CDC entities must be enabled in Salesforce; event subscriptions must be enabled on the Slack app
  3. Confirm workflow status - The workflow must be active
  4. Check the event kind - The eventKind must match a supported value for the provider

Next Steps

On this page