Webhook Integrations (Slack, Microsoft Teams & Google Chat)
Categories:
Webhook Integrations
psLens dispatches real-time alert notifications (firing and resolution events) and scheduled report completion summaries to incoming webhooks. psLens automatically detects the target platform from the webhook URL and formats native rich card payloads without extra configuration:
| Platform | URL Pattern Detected | Native Payload Format |
|---|---|---|
| Google Chat | chat.googleapis.com | Google Chat Cards v2 (cardsV2) with Material Symbols icons, 2-column metadata grid, color-coded status, action buttons, and conversation threading (threadKey) |
| Slack | hooks.slack.com or slack | Slack Block Kit (attachments + blocks) with color-coded sidebar, fields, and interactive link buttons |
| Microsoft Teams | webhook.office.com, logic.azure.com, or powerautomate | Adaptive Cards v1.4 (message attachment) with FactSet metadata and Action.OpenUrl buttons |
| Custom Webhook | Any other http:// or https:// URL | Structured JSON payload containing event_type, status, alert, database, timestamp, and details |
Setting Up Google Chat Webhooks
Google Workspace spaces support incoming webhooks that allow psLens to post formatted Cards v2 alert and report messages directly into a space.
Where to Get a Google Chat Webhook URL
Open Google Chat in your web browser (creating webhooks requires the web or desktop app, not the mobile app) and open the Space where you want psLens notifications delivered.
Click the Space name at the top of the conversation header to open the space menu, then select Apps & integrations.
In the Webhooks section, click + Add webhooks (or Manage webhooks).
Enter a name for the webhook (for example, psLens Alerts) and optionally provide an avatar image URL, then click Save.
Click the three-dot menu (⋮) next to your newly created webhook and select Copy link.
The copied URL will look like this:
https://chat.googleapis.com/v1/spaces/AAQAn4B-uPg/messages?key=AIzaSy...&token=bCtXq1...
Note: If Apps & integrations → Webhooks is not visible or is greyed out, ask your Google Workspace administrator to enable incoming webhooks in the Google Admin Console under Apps → Google Workspace → Google Chat → Externaligs / Webhooks.
How Google Chat Delivery Works in psLens
- Rich Cards v2 Layout: Alert and report notifications render as structured Google Chat
cardsV2messages with a header, severity/environment metadata columns, affected item summaries, and an Open in psLens button (whenserver.appBaseURLis configured). - Automatic Threading: Alert notifications automatically include a deterministic
threadKeyper database and alert type along withmessageReplyOption=REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD, so firing alerts, reminders, andRESOLVEDnotifications group into the same conversation thread in your space. - Secret Obfuscation: Both
keyandtokenquery parameters inchat.googleapis.comURLs are automatically masked (***) in the psLens UI, delivery history, and application logs.
Setting Up Slack Webhooks
In Slack, open your workspace settings or visit the Slack Apps portal and create or select an app with Incoming Webhooks enabled.
Click Add New Webhook to Workspace, select the target channel, and copy the generated https://hooks.slack.com/services/... URL.
Setting Up Microsoft Teams Webhooks
In Microsoft Teams, open the target channel, click the three-dot menu (⋯) next to the channel name, and select Workflows (or Connectors).
Choose the Post to a channel when a webhook request is received workflow template, select your team and channel, and copy the generated Power Automate / Office 365 webhook URL.
Registering & Routing Webhooks in psLens
Once you have copied your webhook URL from Google Chat, Slack, or Microsoft Teams, register it in psLens either through the web UI or in config.yaml.
Via the Web UI (Recommended)
Open Settings → Notifications (/settings/notifications) and scroll to the Webhook Destinations card.
Click Add Webhook, enter an ID (e.g., gchat_ops), a Display Name (e.g., Google Chat Ops Space), paste the Webhook URL, leave Active checked, and click Save. psLens automatically displays a Google Chat, Slack, or Microsoft Teams badge as you type the URL.
Click the Send Test (paper-plane) button next to the webhook to send a test card to your channel or space and confirm connectivity.
To temporarily pause a webhook destination without deleting it or editing the rules that use it, toggle its Status switch off in the Webhook Destinations table (or uncheck Active when editing it). While inactive, psLens skips automatic alert and scheduled report deliveries to that destination and marks any rules, database delivery settings, and scheduled reports referencing it with a Webhook Inactive or (Inactive) badge. Manual Test Webhook buttons continue to send test cards while a webhook is inactive so you can verify a replacement URL before re-enabling delivery.
Once registered, you can route notifications to this webhook in three places:
- Global Alert Subscriptions: On Settings → Notifications, add a subscription under Notification Subscriptions, set Delivery Method to
Webhook, and select your webhook from the dropdown. - Database-Specific Alert Delivery: On Settings → Databases → [Database] → Alerts, under Notification Delivery Settings, toggle Webhook Delivery on, select your webhook, and click Save Delivery.
- Scheduled Reports: On any report page under Schedule & Notifications, toggle Webhook delivery on and select your webhook.
Via config.yaml
You can also define reusable webhooks and subscriptions directly in config.yaml (including op:// 1Password secret references):
notifications:
webhooks:
gchat_ops:
name: "Google Chat Operations Space"
url: "https://chat.googleapis.com/v1/spaces/AAAA.../messages?key=...&token=..."
slack_alerts:
name: "Slack Alert Channel"
url: "https://hooks.slack.com/services/T000/B000/XXXX"
teams_ops:
name: "Teams Operations Channel"
url: "https://default...powerautomate.../invoke"
active: false # Optional (defaults to true); pauses automatic deliveries when false
subscriptions:
- id: "google-chat-prod"
enabled: true
alertTypes: ["*"]
databases: ["PROD"]
severityMin: "warning"
type: "webhook"
target: "gchat_ops"
Delivery Pacing, Batching, and Retries
psLens throttles outbound webhook requests per destination so high-volume alert sweeps across multiple databases do not trigger HTTP 429 (RESOURCE_EXHAUSTED) errors on Google Chat or Slack.
- Per-destination rate pacing: Alert notifications and scheduled report notifications targeting the same webhook destination (including the same Google Chat space path) share one outbound rate limit tuned for the target platform.
- Burst digest batching: When multiple alerts fire or resolve for the same webhook within a 3-second window, psLens combines them into one digest card listing up to 15 alerts sorted by severity. Single alerts continue to send individual cards and keep their Google Chat
threadKeythreading. - Duplicate subscription filtering: When multiple global notification rules match the same alert and resolve to the same destination, psLens delivers once instead of sending duplicates.
- Automatic 429 and 503 retries: If a webhook endpoint returns HTTP
429or503, psLens honors theRetry-Afterheader (or uses exponential backoff with jitter up to 4 attempts) and pauses queued deliveries to that same destination until the cooldown ends. - Staggered multi-database checks: When monitoring multiple PeopleSoft databases, psLens staggers scheduled alert sweeps across databases and bounds concurrent checks so hourly reminder waves do not all fire at the same second.