Automatically Notify Zendesk Guide Article Updates to Slack using Github Actions
Introduction
In Zendesk Guide, there is no built-in feature to automatically notify specific locations when new articles are created or updated (though it is possible to request reviews from specific users using workflows). To address this limitation, I created a Github Actions workflow that periodically executes Zendesk Guide API to check for article updates every 60 minutes and sends notifications to Slack if there are any updates.
Prerequisites
- Github Account
- Zendesk API Token (You can generate it following the steps here: API Token Generation for Zendesk Help)
- Slack Incoming Webhook URL (Create a new Slack App via Slack API: Applications, then generate a URL under the Incoming Webhook menu for the desired channel.)
Instructions
- Access the repository and click on the “Fork” button: GitHub — toru-takahashi/actions-zendesk-guide-subscriber
- After forking, go to Settings -> Secrets, and set the following uppercase parameters and their values under “New Repository Secrets”:
- SLACK_WEBHOOK: The URL of the Slack Incoming Webhook created in the prerequisites.
- ZENDESK_EMAIL: The email address used to access Zendesk API.
- ZENDESK_SUBDOMAIN: The subdomain of your Zendesk account (e.g., https://ZENDESK_SUBDOMAIN.zendesk.com/ — only enter the subdomain, without “zendesk.com”).
- ZENDESK_TOKEN: The Zendesk API Token created in the prerequisites.
By default, the workflow is set to run every 60 minutes. However, Github Actions scheduling is not precise, so it’s recommended to wait for a while to see it execute. The first run will fail as it checks for article updates between the last execution and the current time.
The final output will look something like this:
What it does:
The Github Actions workflow performs the following steps:
- Retrieves the last execution time from the previous run.
- Pulls article updates from Zendesk Guide API using the Guide API and parses the JSON to obtain the necessary information.
- Notifies Slack by posting the retrieved article updates.
Workflow Configuration (in YAML):