> loops
Send marketing and transactional emails with Loops. Use when a user asks to set up email marketing for a SaaS, create drip campaigns, send product update emails, or use a modern alternative to Mailchimp for startups.
curl "https://skillshub.wtf/TerminalSkills/skills/loops?format=md"Loops
Overview
Loops is email marketing built for SaaS. Clean UI, event-based automations, transactional emails, and marketing campaigns. Designed as a modern Mailchimp alternative for startups and product teams.
Instructions
Step 1: Transactional Email
// lib/loops.ts — Send transactional email via Loops API
export async function sendTransactional(
email: string,
transactionalId: string,
data: Record<string, string>
) {
await fetch('https://app.loops.so/api/v1/transactional', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.LOOPS_API_KEY}`,
},
body: JSON.stringify({
email,
transactionalId, // template ID from Loops dashboard
dataVariables: data,
}),
})
}
// Usage: send welcome email
await sendTransactional('user@example.com', 'welcome_email', {
firstName: 'John',
planName: 'Pro',
})
Step 2: Track Events
// Track events to trigger automated sequences
await fetch('https://app.loops.so/api/v1/events/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.LOOPS_API_KEY}`,
},
body: JSON.stringify({
email: 'user@example.com',
eventName: 'plan_upgraded',
eventProperties: { plan: 'pro', mrr: 49 },
}),
})
Step 3: Contact Management
// Create or update contact
await fetch('https://app.loops.so/api/v1/contacts/update', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.LOOPS_API_KEY}`,
},
body: JSON.stringify({
email: 'user@example.com',
firstName: 'John',
userGroup: 'pro-users',
plan: 'pro',
}),
})
Guidelines
- Free tier: 1,000 contacts, 2,000 emails/month.
- Event-based automations: trigger email sequences from app events (signup, upgrade, churn risk).
- Built for SaaS — has concepts like user groups, event properties, and lifecycle stages.
- For transactional-only needs, Resend is simpler. For full marketing, Loops is better.
> related_skills --same-repo
> zustand
You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.
> zod
You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.
> xero-accounting
Integrate with the Xero accounting API to sync invoices, expenses, bank transactions, and contacts — and generate financial reports like P&L and balance sheet. Use when: connecting apps to Xero, automating bookkeeping workflows, syncing accounting data, or pulling financial reports programmatically.
> windsurf-rules
Configure Windsurf AI coding assistant with .windsurfrules and workspace rules. Use when: customizing Windsurf for a project, setting AI coding standards, creating team-shared Windsurf configurations, or tuning Cascade AI behavior.