Webhooks & Alert Channels
LiteLambda provides two-way webhook integrations: Alert Channels to notify your team when jobs fail, and Trigger Webhooks to execute jobs on-demand from external services.
Alert Channels (Outbound)
Receive automated Slack, Discord, and Telegram alerts with stack traces whenever a job fails.
Trigger Webhooks (Inbound)
Trigger jobs on-demand from Stripe, GitHub Actions, or Zapier with JSON payloads forwarded to Python.
Part 1: Configuring Failure Alert Channels
When a cron job experiences 3 consecutive failures, LiteLambda immediately dispatches an alert payload to all configured channels (Slack, Discord, Telegram, and Email) with the job name, failure count, execution timestamp, and error message.
You can configure and test your channels anytime in Settings → Alert Channels.
---1. Slack Incoming Webhook
Posts structured failure alerts directly to a channel in your Slack workspace.
Step 1: Create Webhook in Slack
- Visit api.slack.com/apps and click Create New App.
- Select From scratch, name your app (e.g.
LiteLambda Alerts), and choose your Slack Workspace. - In the left sidebar under Features, select Incoming Webhooks.
- Toggle Activate Incoming Webhooks to On.
- Click Add New Webhook to Workspace at the bottom of the page.
- Choose the channel where alerts should arrive (e.g.
#cron-alertsor#engineering) and click Allow. - Copy your generated Webhook URL. It looks like:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Step 2: Connect in LiteLambda
- Navigate to Settings → Alert Channels in your LiteLambda dashboard.
- Paste the copied URL into the Slack Webhook URL field.
- Click Send Test. A test notification will immediately appear in your Slack channel:
{"text": "✅ LiteLambda test alert — your notification channel is connected!"} - Click Save Preferences at the bottom of the page.
Example Failure Alert in Slack
🚨 *LiteLambda Alert: crypto-price-sync is failing* 🚨
Job ID: `e1a8b321-4f10-41ab-8b92-91f7c5e14012`
Failures: 3 in a row
Time: Sep 27, 2026 12:45:00 UTC
Error: requests.exceptions.HTTPError: 429 Too Many Requests
---
2. Discord Webhook
Dispatches alerts directly to any Discord text channel.
Step 1: Create Webhook in Discord
- Open Discord and navigate to your server.
- Hover over the channel where you want notifications (e.g.
#alerts), click the ⚙️ Edit Channel gear icon. - Click Integrations in the left sidebar, then click Webhooks.
- Click New Webhook (or Create Webhook).
- Name the bot (e.g.
LiteLambda) and optionally upload an avatar. - Click Copy Webhook URL. The URL format is:
https://discord.com/api/webhooks/123456789012345678/abcdefghijklmnopqrstuvwxyz_0123456789
Step 2: Connect in LiteLambda
- Go to Settings → Alert Channels.
- Paste the URL into Discord Webhook URL.
- Click Send Test to verify the connection.
- Click Save Preferences.
3. Telegram Bot Webhook
Sends alerts directly to your personal Telegram or group chat using the Telegram Bot API.
Step 1: Create a Bot via @BotFather
- Open Telegram and search for @BotFather.
- Send the command
/newbot. - Choose a name for your bot (e.g.
My Server Alerts) and a username ending inbot(e.g.my_lambda_alerts_bot). - BotFather will reply with your HTTP API Bot Token:
7123456789:AAHfkj39kjsd9834kjnsdf9834kjnsdf893
Step 2: Obtain your Chat ID
- Start a conversation with your newly created bot by clicking its link (e.g.
t.me/my_lambda_alerts_bot) and clicking Start (or send/start).Note: Telegram bots cannot message you first; you must send at least one message to the bot.
- To find your Chat ID:
- Option A (Easiest): Start @userinfobot in Telegram. It will reply immediately with your numeric ID (e.g.
987654321). - Option B (Group Chats): Add your bot to the group, send a message in the group, then visit:
Look forhttps://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates"chat":{"id": -1001234567890}in the JSON output.
- Option A (Easiest): Start @userinfobot in Telegram. It will reply immediately with your numeric ID (e.g.
Step 3: Construct the Webhook URL
Combine your Bot Token and Chat ID into this standard endpoint format:
https://api.telegram.org/bot<BOT_TOKEN>/sendMessage?chat_id=<CHAT_ID>
Example:
https://api.telegram.org/bot7123456789:AAHfkj39kjsd9834kjnsdf9834kjnsdf893/sendMessage?chat_id=987654321
Step 4: Connect in LiteLambda
- Paste the full URL into the Telegram Webhook URL field in Settings.
- Click Send Test. Your bot will send:
✅ LiteLambda test alert — your notification channel is connected! - Click Save Preferences.
Part 2: Triggering Jobs via Inbound Webhooks
Every LiteLambda job has a dedicated, secret webhook endpoint that allows you to invoke execution instantly with an HTTP POST request.
Finding your Job Webhook URL
- Navigate to your Cron Jobs Dashboard.
- Each job row displays an instant Webhook URL button. Click it to copy the URL to your clipboard.
- Alternatively, open the job's Edit screen to view the full URL in the Instant Webhook Trigger card.
The URL structure is:
https://litelambda.in/crons/webhook/<JOB_UUID>/<WEBHOOK_SECRET>/
Triggering with cURL
curl -X POST "https://litelambda.in/crons/webhook/3c9b1f20-9428-48b0-810a-3a780b91e123/a84c81ef-92e1-4560-b98a-211f43a99e01/" \
-H "Content-Type: application/json" \
-d '{"event": "deployment_success", "branch": "main", "commit": "8f3a12b"}'
Triggering with Python (requests)
import requests
webhook_url = "https://litelambda.in/crons/webhook/3c9b1f20-9428-48b0-810a-3a780b91e123/a84c81ef-92e1-4560-b98a-211f43a99e01/"
payload = {
"user_id": 42,
"action": "recompute_kpi",
"requested_by": "backend_api"
}
response = requests.post(webhook_url, json=payload, timeout=10)
print(response.json())
# Output: {"status": "success", "message": "Job triggered successfully."}
Accessing the POST Payload in your Script
LiteLambda automatically makes your POST payload accessible inside your Python code using two straightforward methods:
Method 1: Direct via the event Parameter (Recommended)
def handler(event, context):
# If triggered via Webhook, `event` is the parsed JSON dictionary
event_type = event.get("event")
user_id = event.get("user_id")
print(f"Triggered by webhook! Event: {event_type}, User ID: {user_id}")
return {"status": "processed", "user": user_id}
Method 2: Via Environment Variable
import os
import json
def handler(event, context):
raw = os.environ.get("LITELAMBDA_PAYLOAD", "{}")
payload = json.loads(raw)
print(f"Received payload: {payload}")
return {"status": "ok"}
---
Trigger Metadata & Logs
When reviewing executions in the Logs view, each execution displays a dedicated trigger badge:
- ⏰ Cron — Run automatically by Celery Beat on your cron schedule.
- 🔗 Webhook — Triggered externally via HTTP POST with custom payload.
- ▶️ Manual — Triggered directly by you via the Dashboard or LiteLambda CLI.
Need help setting up alerts?
Feel free to reach out to us at [email protected] or message us on Twitter/X.