Skip to main content
A webhook notification channel posts a JSON payload to an HTTPS endpoint you control whenever TrueFoundry raises a notification. Use it to feed budget alerts into your own systems, for example to route a message to a specific person through a relay service.

Add a webhook notification channel

1

Open the integrations page

Go to Integrations in the TrueFoundry UI and click Add Integration Provider.
2

Select Custom

Choose Custom as the provider type and give the provider account a name.
3

Add the integration

Add an integration, choose Webhook Notification Channel, and fill in the fields below.
4

Save

Click Add Integration Provider to save.

Fields

The endpoint must be reachable from the TrueFoundry control plane. When SSRF protection is enabled on the control plane, URLs that resolve to private or internal network addresses are blocked.

Use the channel

Select Webhook as the notification target of a budget alert and pick the integration from the Notification Channel dropdown. In a budget, notification_target is a list under alerts:
Replace the notification_channel value with the FQN of your integration.

Request format

Every notification is sent as POST with Content-Type: application/json.

Event types

The type field tells you which shape data has.

Budget threshold crossed

Sent as type: "budget.threshold_crossed" when usage crosses an alert threshold.

Test notification

The channel test sends type: "test" with an empty data object.

Delivery and retries

  • A 2xx response marks the notification as delivered. Any other response, a timeout (10 seconds), or a connection error fails the attempt, and TrueFoundry retries it, up to 3 attempts in total.
  • Delivery is at-least-once. Your endpoint can receive the same notification more than once, so deduplicate on id.
  • Respond quickly and process asynchronously. Slow responses are treated as failures.

Example: notify a user through a relay

Budget alerts name the breaching user in data.entity.value. A small service can use it to message that person, for example with Slack’s users.lookupByEmail and chat.postMessage:
For Slack direct messages without a relay, you can also use the Slack Bot target with Slack User Emails.