Quick overview
This Slack ChatOps workflow uses AI agents and a pyATS MCP server to handle day-to-day data network housekeeping tasks: from on-demand checks and validations per device, to configuration change proposals that require human approval before commit. Read the docs here: https://cs.co/9004BEMGZm
How it works
- A network engineer mentions the Slack bot in a channel or thread. The workflow acknowledges the request and captures the full message
- The request is sent to a Planning Agent connected to pyATS through read-only MCP tools. The agent determines whether the user wants operational data or a configuration change, gathers live device evidence if needed, and evaluates whether the request is safe.
- If the request is operational only, or if the proposed change is unsafe, the workflow replies in the same Slack thread with a clear technical summary, including the relevant device findings or the reason why no change will be made.
- If the request is a safe configuration change, the workflow creates one approval card per target device. Each card shows the proposed change, the pre-check evidence collected from the device, and the safety rationale so the engineer can review exactly what will happen.
- When an engineer clicks a button on a card, the workflow receives the approval or cancellation through a webhook. It then updates the thread accordingly, either closing the request or marking it as approved and ready for execution.
- For approved changes, a Commit-And-Verify Agent uses pyATS MCP full-access tools to apply the configuration, run post-change validation checks, and send a verification summary back to Slack so the engineer can confirm the final device state.
Setup
- Create a Slack app and connect it to n8n using Slack Trigger and Slack API credentials. Enable app_mention events so engineers can call the workflow from Slack, and configure the interactive message request URL to point to the When a Card is Clicked webhook.
- Add your LLM API credential in n8n and select the model used by both agents. By default, both are plugged to Anthropic nodes but you can switch to your favorite provider
- Deploy a pyATS MCP server that n8n can reach over the network, then update the MCP node endpoints in the workflow. Make sure the server exposes the read-only tools needed for operational checks, and the write plus verification tools needed if you want to allow configuration changes.
- Configure your pyATS testbed and device inventory on the MCP side so hostnames, credentials, platforms, and management addresses are correctly defined.
- Review and customize the Slack block content, channels, and approval button behavior if you need different guardrails, formatting, or routing.