Exemples par usage

Ce que les gens envoient à Zenhook, et ce que chaque envoi devient dans le fil. Copiez le JSON, ou collez la consigne dans votre agent de code pour qu'il branche l'événement.

Ventes et prospects

Le total du jour avec un champ Amount, ou le nombre de nouveaux prospects.

json
{
  "title": "Payment received",
  "level": "success",
  "fields": [
    { "label": "Amount", "value": "$129.00" },
    { "label": "Plan", "value": "Pro" }
  ],
  "actor": { "name": "Sarah Chen", "email": "[email protected]" }
}
Consigne pour votre agent IA

When a payment succeeds, send a POST request with a JSON body to the URL in the ZENHOOK_URL environment variable: title "Payment received", level "success", a field Amount with the price and currency, a field Plan, and the customer as actor with name and email. Read https://zenhook.dev/docs/api for the fields. Do nothing if ZENHOOK_URL is not set, and never let a failed request break the app.

Inscriptions

Le compte du jour avec ses barres par heure, et chaque nouvelle personne avec son nom et son e-mail.

json
{
  "title": "New sign-up",
  "level": "info",
  "actor": { "name": "Lucas Martin", "email": "[email protected]", "plan": "Free" }
}
Consigne pour votre agent IA

When a user signs up, send a POST request with a JSON body to the URL in the ZENHOOK_URL environment variable: title "New sign-up", level "info", and the user as actor with name, email and plan. Read https://zenhook.dev/docs/api for the fields. Do nothing if ZENHOOK_URL is not set, and never let a failed request break the app.

Activité d'un produit ou d'un jeu

Un compteur avec ses barres par heure. Au-delà de 3 par heure, votre téléphone reçoit un résumé par heure au lieu de chaque événement.

json
{
  "title": "Game started",
  "level": "info",
  "fields": [
    { "label": "Level", "value": "3" },
    { "label": "Platform", "value": "iOS" }
  ]
}
Consigne pour votre agent IA

When a game starts, send a POST request with a JSON body to the URL in the ZENHOOK_URL environment variable: title "Game started", level "info", and fields Level and Platform. Read https://zenhook.dev/docs/api for the fields. Do nothing if ZENHOOK_URL is not set, and never let a failed request break the app.

Automatisations personnelles

Une série de jours d'affilée. Les échecs envoyés en niveau error ressortent en rouge.

json
{
  "title": "Nightly backup",
  "level": "success",
  "message": "12.4 GB in 3m 12s"
}
Consigne pour votre agent IA

When the nightly backup finishes, send a POST request with a JSON body to the URL in the ZENHOOK_URL environment variable: title "Nightly backup", level "success" (or "error" if it failed), and a message with the size and duration. Read https://zenhook.dev/docs/api for the fields. Do nothing if ZENHOOK_URL is not set, and never let a failed request break the app.

Comment les événements deviennent des widgetsSans code ? Utilisez n8n, Make ou Zapier