Configuring Group Message Notifications for RPA Workflows
This article explains how to add a completion notification to an RPA workflow so that both successful and failed runs are reported to a team chat group. It compares custom group bots with application bots, walks through the configuration steps from creating the bot to obtaining its webhook address, and covers security options such as signature verification. It also reviews the four supported message formats—text, image, rich text, and interactive card—with variable mapping examples, then outlines practices for mentioning specific owners, isolating notification failures, retrying, controlling content length, managing credentials, and closing the observability loop.
1. Why an Automation Workflow Needs a Closing Notification
When deploying RPA (Robotic Process Automation), developers tend to focus on the stability of the main workflow and overlook one critical step: how the result reaches the team after the run finishes. A common anti-pattern is a workflow that runs overnight, with someone logging into the machine during the day and digging through logs to discover that three runs failed the night before. This kind of after-the-fact discovery can multiply the mean time to repair.
A better approach is to treat notification as a standard closing step: whether the run succeeds or throws an exception, push a structured message to the team’s collaboration group containing at least the number of processed items, the number of failures, an exception summary, and the total duration. The next morning, team members open their collaboration tool and see the full picture without logging into the execution machine.
A qualified notification message should meet four conditions. First, it must be timely, triggered as soon as the workflow ends. Second, it must be structured, with fixed fields that are easy to scan. Third, it must be actionable, letting recipients jump to the specific person in one click. Fourth, it must be loosely coupled, so a notification failure cannot affect the main workflow result in reverse.
2. Two Types of Group Bots and How to Choose
Mainstream collaboration platforms generally offer two types of bot capabilities, and understanding the difference is a prerequisite for configuring them correctly.
| Type | How to obtain | Capability boundary | Typical scenario |
|---|---|---|---|
| Custom bot | Added in group settings | One-way message push to this group | Workflow result notification, simplest to configure |
| Application bot | Created as an app on the open platform | Send and receive messages, manage groups, two-way interaction | Complex interaction and command dispatch |
Key takeaway: for a requirement like “send one message when the workflow ends,” a custom bot is the lowest-cost option. Integration requires only a single address, it usually does not count toward workflow runtime, and it is available in the community edition as well.
The pitfall to watch out for is that the credentials differ in form. A custom bot uses an address with a token; an application bot uses an app ID and secret, and you must first exchange them for an access token before calling the API. The two cannot be mixed: putting application credentials into a configuration field that only accepts an address will inevitably cause the send to fail.
3. Configuration Steps: From Creating the Group to Landing the Address
- Open the target group chat and go to the bot management entry in group settings.
- Add a custom bot and give it a recognizable name, for example “Workflow Notification Assistant.”
- Copy the generated address; this is the only configuration item required in the automation workflow.
- For security settings, it is recommended to enable signature verification, which makes the platform generate a secret; if you choose the keyword or IP allowlist method instead, configure it according to the corresponding rules.
- After saving, the bot joins the group. Configure it once and every workflow in the same group can reuse it.
Security settings are not optional. Once the address leaks, anyone who obtains it can flood the group with messages. With signature verification enabled, each request must carry a signature computed from a timestamp and the secret; if server-side verification fails, the request is rejected, which significantly reduces the risk of abuse.
4. Choosing and Implementing the Four Message Formats
The group notification capability of automation platforms generally supports four formats: text, image, rich text, and message card. The choice directly affects information density.
Text is the most common format, suitable for status reports and error alerts, with few fields and high readability. To configure it, you only need the address, an optional signature secret, and a body that supports variable placeholders.
Image is suitable for pushing already-generated charts or report screenshots directly to the group, provided the image has first been uploaded or converted into an accessible resource address.
Rich text supports sections, bold text, and concatenation of multiple blocks, making it suitable for displaying “success details” and “failure details” in separate areas.
Message card carries the most information. A title, multiple key-value field groups, color indicators, and jump buttons can build a dashboard-like effect, making it the first choice for complex notifications.
Variable substitution in the body is the core of making a notification “have content.” An illustrative template:
Task name: {{task_name}}Status: {{status}}Success: {{success_count}} / Failure: {{fail_count}}Duration: {{duration}} secondsException summary: {{error_summary}}
If you use a message card, map the same variables into the card’s field structure:
{"msg_type": "interactive","card": {"header": { "title": { "content": "Workflow Execution Result" } },"elements": [{ "tag": "div", "text": { "content": "Success ${success_count}, Failure ${fail_count}" } },{ "tag": "note", "elements": [ { "tag": "plain_text", "content": "Duration ${duration} seconds" } ] }]}}
5. Mentioning Specific People and Escalation
The value of a notification lies in driving action, so under specific conditions it needs to reach a specific owner. A common practice is to embed a mention marker in the body and bind it with a phone number or user ID; the card format can use a dedicated mention element. The recommended strategy is tiered reach: a successful run only shares information, a run with failures additionally mentions the on-call person, and consecutive failures escalate to the owner.
6. Reliability Design Points
- Failure isolation: wrap the notification step in an exception-handling block so a notification failure only logs an entry and does not change the main workflow state.
- Retry and backoff: retry a limited number of times on network errors to avoid missed reports caused by transient jitter.
- Content length control: truncate overly long details and append a count to prevent the request from being rejected.
- Credential management: keep the address and secret in a configuration center or credential variables instead of hard-coding them in workflow files.
- Observability loop: write the notification send result itself to the logging service so that monitoring and alerting complete the chain.
7. Summary
A group notification may look like a single configuration line at the end of a workflow, but it is actually the observability entry point of the automation system. Mastering five points—the difference between bot types, credentials and security verification, the four message formats and variable mapping, tiered reach, and failure isolation—turns “the run finished and nobody knows the result” into “the result actively finds people,” upgrading RPA from a standalone script into productivity infrastructure the team can trust.
