Function Recipes¶
Copy-pasteable recipes for common integration patterns. Each recipe includes the function code, trigger setup, frontend SDK call, and common gotchas.
Available Recipes¶
Proxy Third-Party APIs¶
Call any external API with server-side secret handling. Includes examples for OpenAI and Stripe.
Send Transactional Email¶
Send emails via SendGrid, Resend, or AWS SES. Includes event-driven pattern for sending on record creation.
Scheduled Cleanup & Maintenance¶
Run periodic tasks — expire old records, generate daily summaries, sync external data.
Pattern Summary¶
| Pattern | Trigger Type | Use Case |
|---|---|---|
| API Proxy | Endpoint | Frontend needs to call external API with secrets |
| Transactional Email | Endpoint or Event-driven | Send emails on demand or when data changes |
| Scheduled Job | Scheduled | Periodic cleanup, reports, data sync |
Before You Start¶
- Secrets: Store API keys in trigger static params, or use orchestration encrypted params for stronger protection
- Allowed domains: Add external API domains to Logic → Domains in the Console
- Function format: All functions use
async function run()— see Writing Functions