Work Culture & Behind the Scenes

Slack Bot for Incidents: How the UK Department for Education's Digital Team Made Incident Response Consistent

The DfE Digital team built a Slack bot so that anyone can open an incident with a single command and every incident follows the same steps. Here are the lessons.

By Oemah Solution Editorial 4 min read

This article was prepared with AI assistance from the official sources listed below, and checked automatically before publication.

A digital service suddenly going down is hard to avoid completely. What a team can control is how quickly and cleanly it handles the problem. In a post on the DfE Digital, Data and Technology blog, the technology unit of the UK Department for Education, developer James Glenn describes how his team improved its incident handling process by building its own Slack bot. The post was published on 3 February 2022.

The problem: a procedure existed, but it did not help

According to DfE, the previous incident handling instructions were kept in a Google Doc that often fell behind the latest situation. As a result, team members who were not familiar with the process were often unsure whom to contact and how to assess severity. The author admits the team spent longer thinking about what to do than handling the incident itself. When the process was finally followed, it amounted to just a Slack thread and a video call.

DfE then set three requirements for the new process:

  • easy and accessible, so that every team member feels confident opening an incident;
  • automated, always carrying out the same sequence of actions;
  • producing better incident documentation.

The practice they chose

The team wanted the process to stay in Slack, a tool they already use. They briefly considered a ready-made app from the Slack Marketplace, but chose to build their own so that it would fit their needs and could be developed further. The bot is written in the team's main languages, C# or Ruby, and built on the principles they usually follow: well-tested, open source and documented code. The bot's source code is published on GitHub.

How it works

The flow is deliberately simple:

  1. A developer who sees a problem with a service types the /incident command in Slack. A form window appears to be filled in.
  2. Once the required fields are completed, the bot immediately creates a dedicated Slack channel for that incident.
  3. The bot invites the incident leads to that channel.
  4. The bot fills in the channel topic with a summary of the incident and its severity, and pins useful documentation so it is easy to find.
  5. When the incident is over, a team member types /closeincident. The bot announces that the incident is closed so the team can move on to the post-mortem.

The example in the image in the post shows the priority label "P3 (Low) - <20% of users affected", complete with the incident title and the name of its communication channel. This means severity is expressed in language that everyone understands immediately.

Things to watch out for

From the DfE post, there are several points relevant to other teams:

  • Outdated procedure documents. DfE's original problem was not the absence of a procedure, but a procedure that was poorly maintained and not used in a crisis. Automation reduces reliance on such documents.
  • Limited usage so far. DfE says the bot has only been used a few times because the team is trying to reduce the number of incidents. Its long-term effectiveness will only be proven over time.
  • The choice to build in-house. Building a bot gives freedom to customise, but it means the team has to maintain the code. This is why DfE emphasises testing and documentation.
  • User needs change. DfE says it wants to gather feedback so the bot keeps evolving to meet needs, including accepting outside contributions.

How to apply it in your team and client projects

You do not have to build a bot to copy the principles. Development teams, including those that run public services, can adopt the following pattern:

  • Use the chat tool you already use every day, rather than creating a new channel that has to be learned.
  • Make opening an incident a single step, so that no one hesitates to report.
  • Always create a dedicated channel per incident, name the person responsible, and record the severity from the start.
  • Pin links to important documentation in that channel.
  • Close the incident explicitly and then move on to the post-mortem, so that lessons are recorded.

For business owners or officials who oversee vendors, this pattern provides clear questions to ask: is there a standard procedure during an incident, who is responsible, how is severity assessed, and are there records that can be reviewed afterwards. The DfE example shows that consistency can be achieved with simple tools that are already available.

#incident response#slack#devops#work culture#post-mortem

Sources & references

This article is a summary and interpretation by the Oemah Solution team of the sources below. Refer to the original sources for full details and context.

  1. How we use Slack to respond to service incidents – DfE Digital, Data and Technology DfE Digital, Data and Technology (UK Department for Education) · dfedigital.blog.gov.uk