Slack Connector Documentation Notify a Slack Channel whenever a User enters or leaves a Segment


Hull to Slack Mapping

Hull Object Sent to Slack as Description
Account New Slack Message
Event

Account Entered Segment trigger

Account New Slack Message
Event

Account Left Segment trigger

User New Slack Message
Event

User Entered Segment trigger

User New Slack Message
Event

User Left Segment trigger

Event
Event
New Slack Message
Event

New User Event in Hull


Hull Slack Connector

This Connector adds a Bot (@hull) to your Slack Team. The Bot can:

  • Notify a channel or a Slack User when a Hull User enters or leaves specific segments.
  • Notify a channel or a Slack User when a Hull User performs certain events.
  • Notify a channel or a Slack User when a Hull Account enters or leaves specific segments.

Data

To setup the bot, create one or more conditions that trigger slack notifications. For each notification, you can pick the channel or user to notify, and the content of the message. To compose the message, you’re allowed to use the (Liquid templating language)[https://shopify.github.io/liquid/] - This allows you to create dynamic messages. The fields at your disposal are:

  • user: All user Attributes.
  • account: All Account Attributes.
  • event: The event that triggered the notification (with it’s properties).
  • segment: The segment that triggered the notification.
  • account_segments: All the Segments that the Accounts belongs to.
  • segments: All the Segments that the user belongs to.

The full payload for each object is documented in the (Hull Documentation)[https://www.hull.io/docs/data_lifecycle/notify/#format-of-a-user-update-notification] - Here’s a sample:

{
  "user": {
    "email": "foo@bar.com",
    ...
    "clearbit/employment_role": "ceo"
  },
  "account": {
    "domain": "bar.com",
    "clearbit/name": "The Bar Company"
  },
  "event": {
    "event": "Viewed a page"
  },
  "segment": {
    "name": "Important People"
  },
  "segments": [...],
  "account_segments": [...]
}

NOTE You should OMIT the traits_ prefix and wrap the attribute in brackets while writing your queries.

DO NOT write {{user.traits_clearbit/employment_role}}, DO write {{user["clearbit/employment_role"]}}

With this, you could compose a liquid message such as:

Hey, User with email {{user.email}} (
  {{user.traits_clearbit/employment_role}}
  at {{account.clearbit/name}}: {{account.domain}}
) just {{event.event}}.
He's in segment "{{segment.name}}".

Result:

Hey, User with email foo@bar.com ( ceo at The Bar Company: bar.com ) just Viewed a page. He’s in segment “Important People”

To install:

  • Click the “Connect to Slack” button on the Dashboard page,
  • Authorize Slack to access your account.
  • You should see the Team ID show up in green. If that’s not the case, start over.

See how Hull works

Learn how Hull unifies and syncs customer data by watching our product tour