Integrating with Slack via Webhooks
Last updated
Last updated
As of version 1.1.0, SitecoreDXG now supports integration with Slack for completion notifications via Slack's Incoming Webhooks API. Like all logic that runs after generation completes, the Slack integration is provided by a native that calls the Slack API to post a message with some basic information about the generation and any that were identified.
Depending on the information that you send in via the DocumentationConfiguration
property of the JSON object, you should see a notification similar to the following sample appear in your Slack channel after generation completes:
Fortunately, Slack was nice enough to make the setup super straightforward:
Copy your new Incoming Webhook URL for use in the next step
DocumentationTitle
CommitAuthor
CommitHash
CommitLink
DeployLink
ProjectName
EnvironmentName
for your SitecoreDXG notifications (you just enter a name and select your desired workspace)
for your new app (you just check the box to enable them for your app)
for your new app (you pick the channel that you want to post the messages to and click "Authorize")
Create/update the JSON file at your with the options object to be passed into your SitecoreDXG middleman to include the Slack completion handler and set its Params.Url
property to your new Incoming Webhook URL, as follows:
Note that this completion handler supports the default supported properties, and will display their information in the notification, including: