Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to https://control.openpath.com/login and log in

  2. Go to Configurations > Rules Engine, then click Create Rule

  3. Enter a name and description for the rule, select a Trigger Type, then select an Event

    1. In this example we want the rule to trigger on Entry Unlock events

  4. On the right side of the page, check Use JSON Editor

    Image Removed
Markdown
![use JSON editor](https://info.openpath.com/hubfs/images/kustomer-articles/openpath-to-slack-rule.png)

Create a rule using JSON, using the Slack app’s Webhook URL. Your rule should look something like this:

“entry.unlocked” is the event type that will trigger the rule:

...

Code Block
  "requests": [
    {
      "curlOpts": {
        "post": 1,
        "postFields": "{\"username\":\"openpath\",\"icon_emoji\":\":openpath:\",\"channel\":\"webhooktest\",\"text\":\"{{event.event}} {{event.timestamp}} {{event.data.org.name}} {{event.data.entries.0.name}} Unlocked using {{event.data.requestType}} {{event.data.connectionType}} by {{event.data.userId}} at {{event.data.requestTimestamp}}\",\"attachments\":[{\"color\":\"warning\",\"title\":\"Click here to see Entry Report\",\"title_link\":\"https://control.openpath.com/o/###/reports/entryActivity\"}]}",
        "url": "{{base_url}}"
      }
    }
  ]
}

...

Markdown
![slack webhook example](https://info.openpath.com/hubfs/images/kustomer-articles/slack-webhook.png)

Openpath notification in Slack example

...