Skip to main content
A run that fails at 3am is only a problem if nobody finds out until morning. Run-completion alerts close that gap: when a run reaches any final state — succeeded, failed, cancelled, or nothing-to-compare — Darpan posts a summary to chat with the counts that matter and a link straight to the result. Alerts are built around a registry of named chat spaces for the tenant. A space posts to Google Chat or to Slack; the rest of Darpan does not care which. An automation points at one space permanently. Anyone watching a run can point that single run at their own space with Notify me, without touching tenant settings or interrupting anyone else’s alerts.

How the flow works

  1. A run finishes. This applies to a run started manually and to a run started by an automation.
  2. Darpan collects the destinations for that run: the automation’s linked chat space, plus one space for each person who subscribed with Notify me.
  3. That list is deduplicated, then filtered to spaces that are active, still deliverable, and belong to the run’s own tenant. One space subscribed by three people receives one message.
  4. Darpan classifies the result, writes the message, and posts it to each surviving destination.
A run never fails because an alert could not be sent. If a webhook is unreachable or a Slack channel rejects the post, the result is still saved and viewable in the app. Each run notifies at most once, even if several stages report completion.
Alerts fire on final states, not only success, since silence used to be indistinguishable from success. A run that fails is the exception: it sends one plain line, and its error goes to the Darpan team. See When an automation run does not run and When a saved run you started fails.

When an automation run does not run

From 3.4.6, an automation run that does not run never posts its error to your chat spaces, and from 3.5.1 no error or warning reaches a client chat room at all. That covers a run that fails, one that gives up after its retries, one whose rules could not run, and one where a side read no records, or kept none after its filters, while the other side read some. The error goes to the Darpan team, which is alerted and works on the fix. A Notify me space gets one plain line instead: “name did not run this morning. Darpan has been alerted and is working on a fix.”
  • From 3.5.1 the automation’s own chat space is never posted a run error; only Notify me gets the line, on any run, scheduled or started by hand.
  • An automation behind an audit’s checks posts nothing here. The audit update’s email says which checks did not run; its chat card does not. See Audit settings.
A failed run’s page still shows its full error. An automation run where both sides read nothing is a quiet day, not an error. So is one where a side read nothing and the other kept nothing after its filters, such as a store’s run on a day the store was closed. A side that kept nothing the morning after it kept some is a quiet day too; on the second morning in a row it is an error. A quiet day posts one plain line where a finished run posts, the automation’s chat space and each Notify me space, once: “name · day: nothing to compare (system kept, system kept)” The day is the run’s window in the automation’s time zone, and each count is what that side kept, for example “Daily Return Reconciliation · Nov 26: nothing to compare (HotWax 0, Shopify 0)”. A run that rechecks findings by key posts nothing.

When a saved run you started fails

From 3.4.7, a saved run you start by hand never sends its error to chat. That covers a run that stops with an error and one whose rules could not run. The error goes to the Darpan team. Everyone who chose Notify me on the run gets one plain line instead, with the saved run’s name: “name did not finish. Darpan has been alerted and is working on a fix.” A run cancelled while it was failing sends nothing. The run’s page still shows its full error.

What the alert says

The message leads with a verdict rather than a table of numbers, because the first question anyone asks is whether they need to act. Darpan picks the verdict from three independent counts:
The alert keeps these apart, even though a saved run’s difference count may not. For a run with rules, the difference count adds rule differences and duplicate ids to the missing records. The alert splits them back out so you can see which kind you have.
Under the verdict, a Details block lists the counts:
  • Missing from <system>: N, one line per side. Both lines print, even at zero, since a zero says that side came back complete.
  • <rule name> Mismatch: N, one line per named rule, busiest first. Past eight rules, the rest share one +N more rules line.
  • Field mismatches: N pools mismatches from rules with no name.
From 3.6.2 these lines count only the rows the run reports: rows a conclusion hides come off their rule’s line, and a rule whose every row is hidden has no line. Mismatch lines appear only when there are mismatches. No alert prints a rule’s formula. The verdict names the situation: Every message also carries the run name, the tenant, the result identifier, and a deep link that opens the result in the app for the right tenant. Clean runs additionally mention a run of consecutive clean results when there is one, and the wording varies with the time of day in the tenant’s own timezone — a run finishing at 6am in the tenant’s timezone reads as an early-morning run regardless of where the server sits.

Before you start

Confirm:
  • You are a Tenant Admin for the tenant, if you intend to connect a chat product or add or change chat spaces. Choosing your own default space and using Notify me are personal preferences and need no tenant write access.
  • The correct tenant is active.
  • You can reach the destination: a Google Chat incoming webhook, or a Slack workspace you can install an app into or generate a bot token from.

Connect a chat product

Google Chat needs no connection step — a space holds its own webhook. Slack is connected once per tenant, then any number of spaces pick channels from it.

Google Chat

In the Google Chat space that should receive alerts, create an incoming webhook and copy its URL. Keep it secret; treat it like a credential. The URL must be an https URL on chat.googleapis.com that targets a space messages endpoint and includes its key and token query parameters. That URL goes straight into the chat space you create below. There is nothing else to set up.

Slack

Slack offers two routes. Darpan shows whichever the deployment supports, and the bot-token route is always available.
1

Start from Add space

Open Tenant Settings, choose Open on Notifications, then choose Add space and pick A Slack channel. It reads Connect a Slack workspace first until one is connected.
2

Choose a route

Connect Slack opens Slack to authorise Darpan and returns you here. This one-click install appears only when the deployment has Slack app credentials configured; if it is missing, the deployment has no darpan.slack.clientId and the token route below is the way in.Paste a bot token takes a pasted token instead. Use it when your Slack administrators do not permit installing apps.
3

Paste the bot token, if you chose that route

In your Slack app, go to OAuth & Permissions and copy the Bot User OAuth Token. It starts with xoxb-. Paste it and choose Connect.Darpan rejects a token that does not start with xoxb-. A user token (xoxp-) authenticates fine but posts as the human who created it, so it is refused by shape before it can be mistaken for a bot token.Darpan verifies the token with Slack before storing it, and takes the workspace name, team ID and bot user from Slack’s answer rather than from anything you typed. The token is stored encrypted and is never readable back.
4

Read any scope warning

If the token is missing scopes, Darpan connects anyway and names what will not work: notifications still send, but listing channels or posting to channels the app has not joined may fail. Add the scopes in Slack and paste the token again.
Once a workspace is connected, a Slack line on the Notifications page shows its name. Beside it are Replace token — the way to rotate a token — Reconnect (when the deployment offers the one-click install), and Disconnect. Add space then goes straight to the channel list.

Register a chat space

A chat space is a named destination: a column on the Notifications page.
1

Open Notifications

Open Ask Darpan, search for Open Tenant Settings, and open the result. Confirm the active tenant is the one you want alerts on. In Chat, choose Open on Notifications, then choose Add space.
2

Choose where it posts

Pick A Slack channel or A Google Chat space. A space’s product is fixed once it is created; to move a destination to the other product, register a new space.
3

Point it at a destination

For Google Chat, paste the webhook URL. Darpan validates it on save. The URL is stored in clear text and returned to members of the tenant who can read its chat spaces, so anyone in the tenant can see it. If it leaks, create a new webhook in Google Chat and update the space.For Slack with a connected workspace, pick the channel from the searchable list. Darpan reads every page of channels rather than the first one, and says so when a workspace has more channels than it lists at once — you are never shown a partial list that looks complete.
4

Name the space

For Google Chat, the name must be unique within the tenant and is what everyone else picks from later, so name it after the destination rather than the run — Ops alerts rather than Nightly Shopify. A Slack space is named for its channel, such as #ops; rename either from its column heading.
5

Choose what posts there

Switch on what should post to the new space, or choose Skip. Choose Send test to confirm it delivers.
If the channel you pick is private, invite the Darpan app to it. Slack will not let the app post to a private channel it has not joined, and the first run is where you would find out.
Repeat for each destination. Each column heading shows the space’s chat product and whether it delivers by bot or webhook. A tenant can hold as many spaces as it needs — one for operations, one for a client-facing channel, one for a single team — and they can mix chat products freely.

Route alerts to a space

There are three ways a run alert reaches a space, and they stack. An automation’s linked space. When you create or edit an automation, the chat-space step offers My default space (<name>), any other active space, a new space, or none. Every run that automation starts reports to the space it is linked to. An automation can link only a space of its own tenant: saving one that names another tenant’s space, or an inactive one, is refused with Chat space ’…’ was not found or is inactive. Your personal default. In User Settings, the Notifications card sets which space your own alerts go to. This is a personal preference — it needs no tenant write access, and it does not change anyone else’s alerts. A default pointing at a space that was deleted or deactivated reads as not configured. Notify me, for one run. On a running run, choose Notify me. Darpan snapshots your default space at that moment and notifies it when that run finishes; the button then reads Notifying — followed by the space name. Choosing it again unsubscribes. Subscriptions are cleared once the run finishes, so they never leak into later runs.
Notify me needs a default chat space to snapshot. If you have not set one, Darpan says so instead of subscribing you silently — set the default in User Settings first.

Other messages a space receives

Run alerts are not the only thing that posts to a chat space. A space can also receive:
  • An audit’s update after each run, when the audit’s settings pick it under Chat space. See Audits.
  • A query’s summary, when its schedule posts to it. See Queries.
  • Tenant-wide streak messages, when the Streaks row on the Notifications page points to it. A streak one automation earns posts to that automation’s own space.

Expected result

Every finished run reports to its automation’s space, and to the space of anyone who asked to be notified. The message opens with what happened rather than a wall of counts, and a failure surfaces in chat with a one-click path to the result in the right tenant.

Turning alerts off

Deactivate the space from its edit button on the Notifications page (Deactivate space) to stop messages while keeping the configuration. Alternatively, unlink the automation from its space, or clear your personal default. A space that nothing references can be deleted outright. A space still referenced by an automation or a subscription must be deactivated instead — Darpan refuses the delete rather than silently breaking the automation pointing at it. Choosing Disconnect on a Slack workspace follows the same rule. Darpan refuses while chat spaces still post through it and names them, because a silent disconnect would leave those destinations resolving to nothing and the tenant would learn about it from missing notifications. Repoint or delete those spaces first.

Upgrading from the single tenant webhook

Before v1.2.0 a tenant had exactly one Google Chat webhook. On upgrade, that webhook is copied into a space named Default space, and every automation without its own space is linked to it. Existing alerts keep arriving in the same place with no action from you. The one change worth making afterwards is renaming Default space to something that describes the destination, since it now sits in a list beside the others.

Troubleshooting

See Manage tenant settings for the full tenant settings surface and Author reconciliation rules for the rules that produce the mismatches these alerts report.