Email Alerts
Receive instant email notifications when your on-chain conditions are met. Set up price alerts, governance notifications, and custom triggers in minutes.
Step 1: Register Your Email
Get a privacy-preserving email ID that connects your email to triggers without storing personal information on-chain.
Enter your email address below to receive a unique ID that you'll use in your trigger code.
Step 2: Available Email Templates
Select from pre-built email templates that format your alert data into clear, actionable notifications.
price-alert
Template IDFor crypto price notifications and threshold alerts
ticker
- Asset symbol (e.g. "ETH")price
- Current price (number)threshold
- Trigger level (number)condition
- "above" or "below"generic-alert
Template IDFor governance alerts, gas notifications, and custom events
title
- Alert subject line (string)message
- Alert body content (string)Step 3: Create Your Trigger
Deploy smart triggers that automatically monitor blockchain data and send formatted emails when your conditions are triggered.
Complete Example: ETH Price Alert
Follow this complete workflow to create a trigger that emails you when ETH crosses $3000.
1. Install the SDK
npm install @rebar_xyz/sdk
2. Create the trigger (JavaScript)
import { RebarClient } from '@rebar_xyz/sdk';
const client = new RebarClient();
const trigger = await client.createTrigger({
name: 'ETH Price Alert',
description: 'Email when ETH crosses $3000',
triggerLogicType: 'starlark',
triggerLogic: `
# This logic runs on-chain whenever ETH price updates
eth_price = inputs[0].value
threshold = 3000.0
if eth_price > threshold:
return {
"emailId": "YOUR_EMAIL_ID",
"templateId": "price-alert",
"ticker": "ETH",
"price": eth_price,
"threshold": threshold,
"condition": "above"
}
return None # No email if condition not met
`,
action: 'rebar1emailaction...', // Pre-created by Rebar
inputs: ['rebar1ethprice...'] // ETH price data source
});
console.log('Trigger created:', trigger.address);
3. How it works
rebar1emailaction...
) is provided by Rebar. You create triggers that reference this action using your email ID and template data.Why Email Alerts?
Privacy Protected
Your email address stays private. Only encrypted IDs are used on-chain, keeping your contact information secure.
Instant Delivery
Get notifications within seconds of your trigger conditions being met on-chain.
Reliable
99.9% delivery rate with automatic retries and delivery confirmation tracking.