Notifications (Teams, Slack and webhook alerts)

Notifications send a short message from Polysync to a place your team already watches:

  • a Microsoft Teams channel, through a Teams workflow;
  • a Slack channel, through an incoming webhook;
  • your own public https endpoint, as signed JSON (a Webhook channel).

Two things can send a message:

  • Task alerts. You turn them on for each Task, on its Alerts tab. For example, tell the team when the final attempt of a run fails.
  • Agent alerts. The AI Monitoring Agent can send its alerts to a channel as well as to the notification bell.

Messages carry names, statuses, counts and times. Task messages never include error text. An agent alert carries the insight's title, which the agent writes and which can describe the failure in a few words. Every message is recorded under Monitor, Notifications.

Nothing is sent until an administrator adds a channel and turns alerts on.

Who can do what

Action Administrator Operator
Add, edit, test and delete notification channels Yes No
Turn on alerts on a Task's Alerts tab Yes No
Send agent alerts to channels (Also send to) Yes No
Turn a channel back on after Polysync turned it off Yes No
See the delivery history under Monitor, Notifications Yes Yes
Resend a message Yes No

Channels and alerts are set up on the Setup and Organisation Settings pages, which only administrators can open. See Instances for the two roles.

Add a channel

A channel is set up once. Many Tasks, and the agent, can send to the same channel.

  1. Open Setup. In the tree, next to NotificationChannel, choose ⋯ and then New.
  2. On the General tab, enter a Name (up to 100 characters, not used by another channel) and choose the Type: Microsoft Teams, Slack or Webhook. The type is fixed after the first save. A Description is optional. Leave Enabled ticked.
  3. On the Connection tab, enter the URL for that type, as described below.
  4. Save, then press Send test.

Send test posts a fixed message, "Polysync test message", that names the channel. It is available once the channel is saved with no unsaved changes. You see the result straight away: "Test message delivered." or a hint about what went wrong. Each test is also recorded in the delivery history.

An instance can have up to 20 channels.

Where the URL is kept

Anyone who has a channel URL can post to that channel, so Polysync treats every channel URL, and the webhook signing secret, as a secret. In the URL field you can either:

  • paste the URL, and Polysync keeps it in its managed vault; or
  • enter a vault:// reference to a secret in one of your own secret vaults.

Polysync reads the secret each time it sends. The URL is never shown in messages, error text or logs. A vault:// reference is checked when Polysync sends, not when you save, so press Send test after saving.

Microsoft Teams

Teams alerts use a Teams workflow that posts to a channel. Nothing is installed in Teams, and Polysync needs no Microsoft permissions in your tenant.

  1. In Microsoft Teams, open the channel, choose ⋯ (More options) and then Workflows.
  2. Choose the template Send webhook alerts to a channel. Older guides, and the hint in the Polysync editor, call it Post to a channel when a webhook request is received.
  3. Name the workflow, choose Next, check the team and channel, and finish.
  4. Copy the URL the workflow gives you.
  5. In Polysync, add a channel of type Microsoft Teams, paste the URL into Workflow URL, save and press Send test.

Good to know:

  • Microsoft does not require a premium Power Automate licence for this template.
  • The workflow runs as the person who created it, and messages may show as "name via Workflows". If that person leaves your organisation, the workflow stops and so do the alerts. Add a co-owner to the workflow in Power Automate, under Owners.
  • Polysync accepts workflow URLs on *.environment.api.powerplatform.com only. URLs for the old Office 365 connectors are refused, because Microsoft retired that connector type. Create a workflow instead.
  • Messages arrive as an Adaptive Card. A card too large for Teams is shortened to fit.

Slack

  1. In Slack, open your Slack app (or create one), go to Incoming Webhooks and choose Add New Webhook to Workspace. Pick the channel.
  2. Copy the webhook URL. It starts with https://hooks.slack.com/.
  3. In Polysync, add a channel of type Slack and paste the URL into Webhook URL.
  4. Optionally set Mention on Critical to @here or @channel. The default is None.
  5. Save and press Send test.

A mention is added only to Critical messages, such as a Critical agent insight. Task alerts are never Critical, so they never mention the channel.

Webhook

Use a Webhook channel to send alerts to your own service, an automation tool, or a relay into another alerting product.

  1. Add a channel of type Webhook and enter the endpoint URL. Payload Format is polysync.v1, the only option.
  2. Save. Polysync creates a signing secret and shows it once, under Signing secret: copy it now. Copy it into your receiving service, then choose I have copied it.
  3. Press Send test.

After that the editor shows Signing secret: set and never shows the value again. To replace it, an administrator chooses Regenerate and saves. The old secret stops working as soon as you save, with no overlap, so update your receiver at the same time.

The URL must:

  • use https on port 443;
  • use a public host name, not an IP address, localhost or an internal name such as .local, .internal or .corp;
  • be no longer than 2,048 characters.

Polysync does not follow redirects. A redirect counts as a failed delivery.

What a webhook receives

Each message is an HTTP POST with a JSON body:

Field Contents
schema Always polysync.v1
id The message id. It is the same on every retry
type The event: task.run.failed, task.run.succeeded, task.run.recovered, task.run.failures.grouped, agent.insight, agent.approval_needed, agent.retry_outcome, agent.paused, agent.grant_expiring, agent.grant_suspended or channel.test
severity info, warning, error or critical. A High agent insight is sent as error
occurredUtc When it happened, in UTC (ISO 8601)
title Up to 200 characters
summary Up to 2,000 characters
facts Up to 50 label and value pairs, such as Task, Job and Platform
items For grouped failures, up to 10 task names
moreCount How many more items there were
link The text and url of a page in Polysync, or null

Two headers come with it:

  • X-Polysync-Delivery carries the message id. It stays the same on every retry, so use it to ignore a message you have already handled.
  • X-Polysync-Signature has the form t=<unix seconds>,v1=<signature>.

Check the signature

  1. Read t and v1 from the X-Polysync-Signature header.
  2. Reject the request if t is more than five minutes old.
  3. Compute an HMAC-SHA256 of t, then a full stop, then the raw request body exactly as received. The key is the signing secret as UTF-8 text, exactly as Polysync showed it. Do not Base64-decode it.
  4. Write the result as lower-case hex and compare it with v1 using a constant-time comparison. Reject the request if they differ.

For example, in Python:

import hashlib, hmac, time

def is_from_polysync(secret: str, signature_header: str, body: bytes) -> bool:
    parts = dict(p.split("=", 1) for p in signature_header.split(","))
    t, v1 = parts["t"], parts["v1"]
    if abs(time.time() - int(t)) > 300:
        return False
    expected = hmac.new(secret.encode("utf-8"), t.encode() + b"." + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, v1)

Change, turn off or delete a channel

  • Untick Enabled and save to stop sending to a channel for a while.
  • The Usage tab lists the Tasks and agent alerts that send to the channel.
  • A channel cannot be deleted while a Task with alerts turned on sends to it. Polysync lists those Tasks. Remove the channel from their Alerts tab first.
  • Deleting a channel removes it from agent alerts, and drops any grouped failures it was still collecting without sending them.
  • A deleted channel goes to the Recycle Bin and can be restored, unless the instance already has 20 channels or another channel has taken its name.

Task alerts

Alerts are set on the Alerts tab of the Task editor, after Runtime Settings. They are saved with the Task when you press the Task's Save.

Alerts are off by default, for new and existing Tasks. Turn on Send alerts for this task. Polysync then ticks The final attempt fails and Send each failure straight away, which you can change.

Alert when

Option You get a message when
The final attempt fails A run fails or times out and no retry is left
The task succeeds A run ends Completed
It succeeds after a failure A run succeeds and the previous final result was a failure. The message says "recovered" instead of "succeeded"
Any final result Both of the first two

Choose at least one.

  • A run that timed out counts as a failure.
  • A Cancelled run never sends an alert.
  • Turning alerts on does not send anything for runs that had already finished.

Send to

Tick up to 10 channels. Each one shows its type, and a warning if it is disabled or was turned off by Polysync. Disabled, deleted and turned-off channels are skipped when an alert is sent.

Failures: straight away or grouped

Option What happens
Send each failure straight away One message for each failed run. This is the default
Group failures into one message every 5, 15 or 60 minutes Polysync collects the failures for each channel and sends one message when the window closes. 15 minutes is selected when you first choose this option

Only failures are grouped. Success and recovery messages are always sent on their own. A grouped message lists the first 10 task names and then "and N more", and can link to the failures under Monitor, Notifications. A window that closes with only one failure sends it as a normal message.

What "final attempt" means

With retries on, Polysync waits for the last retry before it alerts. A failure that a retry then fixes does not wake anyone up.

When a run fails and the Task's retry settings still allow another attempt, Polysync holds the alert. If no retry run has been created by the time it was due plus two minutes, Polysync treats the failure as final and sends the alert. A Run Once is not a retry, so it does not hold the alert back. See Task for the retry settings.

Agent alerts

  1. Open Organisation Settings and find the AI Monitoring Agent card.
  2. Under Also send to, tick each channel and choose the lowest insight severity it should get: Info, Warning, High or Critical "and above". The default is High and above. The severity applies to insights only.
  3. Under Send these too, choose the other agent messages to send. One set applies to every channel you ticked.
  4. Save changes.
Send these too Default
Actions waiting for approval On
Agent paused On
Retry outcomes Off
Action grant expiring. This also covers standing authorizations being suspended On

An expiring standing authorization sends a reminder 14 days and 3 days before it ends.

Channels get the alert title, which the agent writes, and can get a link back to Polysync. They never get the diagnosis. Channels still receive alerts when the in-app bell is off. Agent alerts are only sent while the agent is switched on. See Using the AI Monitoring Agent.

What a message contains

Polysync builds each message once, then formats it for Teams (an Adaptive Card), Slack (Block Kit) or your webhook (JSON).

Message Title Details
Task run Task 'name' failed, succeeded or recovered Task, Job, Platform, Status, Attempts and Ended (UTC)
Grouped failures N task runs failed The time window, the number of failures and the first 10 task names
Held back N notifications held back Sent instead of many separate failure messages. See Delivery
Agent insight The insight's title, written by the agent None. The severity sets the colour of the Teams card
Other agent messages For example "The agent needs approval for task 'name'" or "The agent paused itself" The task, the days remaining, or the reason for a pause
Test Polysync test message The channel name

A message can also have a button that opens Polysync: the Task Execution tab for a task run, the grouped failures under Monitor, Notifications, or Agent Insights for the agent.

Never included:

  • the platform's error message as returned, or anything else the platform returned;
  • task parameter values;
  • channel URLs, secrets or credentials;
  • the agent's diagnosis, evidence or recommended action.

Task, job, platform and channel names are included, so choose names you are happy to see in the channel. An agent insight's title is written by the agent and can describe the failure. The Agent paused message gives the reason for the pause. Known secret patterns are removed from both first. Titles are cut to 200 characters.

Delivery

Alerts take a little time. Polysync looks at finished runs about a minute after they end, then sends from a queue, so a message usually arrives a minute or more after the run ends. A pending retry or a grouping window adds to that.

  • Retries. If the destination does not answer in time, is throttling (HTTP 429) or returns a server error, Polysync tries again after 30 seconds, 2 minutes, 10 minutes, 30 minutes and 2 hours: up to 6 attempts within 24 hours. A Retry-After header is respected, up to one hour. A redirect, most other 4xx responses, or an address Polysync will not send to fails at once with no retry.
  • Rate limit. At most 20 messages per channel per minute. The rest wait for the next minute.
  • Bursts of failures. If more than 10 task-failure messages are due on one channel within two minutes, Polysync sends one "N notifications held back" message instead. The individual messages are marked Suppressed.
  • One message per run. Polysync queues at most one message per run for each channel. If a destination accepts a message but answers too slowly, the retry can post it twice. A webhook retry keeps the same X-Polysync-Delivery id, so your endpoint can ignore the copy.
  • Channels turned off by Polysync. After 10 failed delivery attempts in a row (retries count), or 3 permanent failures with no successful delivery in between, such as a URL that no longer exists, Polysync turns the channel off. Every administrator gets an in-app notification, and the channel editor says "Polysync turned this channel off on date: reason. Alerts are not sent until it is re-enabled." Fix the cause, then press Re-enable. Alerts raised while the channel was off are not sent later.
  • Inactive subscriptions. While the instance's subscription is suspended or cancelled, nothing is sent and due messages are marked Skipped.

Delivery history

The Notifications tab on the Monitor page lists every message, for administrators and operators:

  • Tiles for Channels, Turned off by Polysync, Waiting to send, Failed (24 h) and Last delivered.
  • Filters for the last 24 hours, 7 days or 30 days, the channel, the event and the status.
  • Columns for Created, Channel, Event, Title, Status and Attempts.
  • Turn on Auto-refresh to refresh every 30 seconds, or press Refresh. The choice is remembered in this browser.

Open a row to see the channel, event, severity, status, times, attempts with the last HTTP status, the last error, a preview of the message and the attempt log. The last error is a short description, never the destination's response.

Status Meaning
Pending Waiting to be sent
Retrying An attempt failed and another is scheduled
Delivered The destination accepted it
Failed Polysync gave up: a permanent error, or 6 attempts or 24 hours used
Suppressed Replaced by a "held back" message during a burst of failures
Skipped Not sent, for example because the subscription is not active
Batched Included in a grouped message

Resend. An administrator can resend a message that is Delivered, Failed, Suppressed or Skipped. Polysync queues a new copy, linked to the original by Resend of. A test message cannot be resent; use Send test on the channel instead.

History is kept for 90 days, then deleted.

Limits

Limit Value
Channels per instance 20
Channel name 100 characters
Channel URL 2,048 characters, https on port 443, public host name
Channels per Task 10
Grouping window 5, 15 or 60 minutes
Messages per channel per minute 20
Delivery attempts 6, within 24 hours
Burst guard More than 10 task-failure messages on one channel in 2 minutes
Message title 200 characters
Task names in a grouped message 10, then "and N more"
Delivery history 90 days

Cost

Notifications are not task runs. They are not billed, and they do not count towards your plan's task runs or any monthly run limit.

Why didn't I get an alert?

Work down the table. Most answers are on the Task's Alerts tab or under Monitor, Notifications.

Check Why What to do
Is Send alerts for this task on? Alerts are off by default Turn it on and save the Task
Does an Alert when option match the result? Only ticked results send. A cancelled run never does Tick the result you want
Is a retry still due? Polysync waits for the last retry, plus two minutes Wait, or check the retry chain under Monitor, Task Execution
Are failures grouped? A grouped message is sent when the window closes Wait, or choose Send each failure straight away
Did the run finish before alerts were turned on? Earlier runs are not sent Nothing to fix. The next run will alert
Is the channel ticked, and enabled? Disabled, deleted and turned-off channels are skipped Open the channel. If Polysync turned it off, fix the cause and press Re-enable
Is there a row under Monitor, Notifications? Every message is recorded there Filter by channel and open the row
The row says Retrying or Failed The destination refused the message or did not answer Read the last error and fix the URL or the destination. A Retrying row tries again by itself. Once a row says Failed, press Resend
The row says Suppressed A burst of failures was replaced by one message Look for the "held back" message in the channel
The row says Skipped The subscription is not active Check the subscription
The row says Delivered but nothing is in Teams Teams accepted it, but the workflow did not post it Check the workflow's run history and owner in Power Automate
Send test says "Teams did not recognise the workflow URL" The workflow was deleted or the URL is incomplete Copy the URL again, or create the workflow again
Send test says "Slack rejected the webhook" The webhook was removed or its channel was archived Add a new webhook in Slack and paste its URL
Send test says "The endpoint did not respond in time" Your endpoint is slow or cannot be reached from the internet Check the endpoint and its firewall
An agent alert is missing Its severity is below the channel's setting, its type is not ticked under Send these too, or the agent is off Check Also send to on the agent card

If it still looks wrong, contact support at support@polysync.com.au and say which instance, which Task or channel, and roughly when.