loops

$npx mdskill add vm0-ai/vm0-skills/loops

Manage SaaS user data and lifecycle emails via Loops API.

  • Handles onboarding, transactional, and marketing email tasks.
  • Integrates with Loops.so API for contact creation and updates.
  • Executes requests using Bearer token authentication.
  • Returns contact status and email delivery confirmation.

SKILL.md

.github/skills/loopsView on GitHub ↗
---
name: loops
description: Loops email platform for SaaS. Use when user mentions "Loops", "Loops.so", "email marketing", "onboarding emails", "transactional email", or asks about SaaS lifecycle emails.
---

## Troubleshooting

If requests fail, run `zero doctor check-connector --env-name LOOPS_TOKEN` or `zero doctor check-connector --url https://app.loops.so/api/v1/api-key --method GET`

## Core APIs

### Test API Key

Verify your API key is valid:

```bash
curl -s "https://app.loops.so/api/v1/api-key" --header "Authorization: Bearer $LOOPS_TOKEN"
```

### Create Contact

Write to `/tmp/loops_request.json`:

```json
{
  "email": "user@example.com",
  "firstName": "Jane",
  "lastName": "Doe",
  "userId": "clerk_user_abc123",
  "subscribed": true,
  "userGroup": "free"
}
```

```bash
curl -s -X POST "https://app.loops.so/api/v1/contacts/create" --header "Authorization: Bearer $LOOPS_TOKEN" --header "Content-Type: application/json" -d @/tmp/loops_request.json
```

Docs: https://loops.so/docs/api-reference/create-contact

### Update Contact

Write to `/tmp/loops_request.json`:

```json
{
  "email": "user@example.com",
  "userGroup": "pro",
  "planUpgradedAt": "2024-01-15"
}
```

```bash
curl -s -X PUT "https://app.loops.so/api/v1/contacts/update" --header "Authorization: Bearer $LOOPS_TOKEN" --header "Content-Type: application/json" -d @/tmp/loops_request.json
```

### Find Contact

Find a contact by email address. Replace `<email>` with the actual email:

```bash
curl -s "https://app.loops.so/api/v1/contacts/find?email=<email>" --header "Authorization: Bearer $LOOPS_TOKEN"
```

### Delete Contact

Write to `/tmp/loops_request.json`:

```json
{
  "email": "user@example.com"
}
```

```bash
curl -s -X DELETE "https://app.loops.so/api/v1/contacts/delete" --header "Authorization: Bearer $LOOPS_TOKEN" --header "Content-Type: application/json" -d @/tmp/loops_request.json
```

### Send Event

Trigger an automated email loop by sending an event. Events map to loops configured in your Loops dashboard.

Write to `/tmp/loops_request.json`:

```json
{
  "email": "user@example.com",
  "eventName": "signup",
  "eventProperties": {
    "planType": "free",
    "signupSource": "landing_page"
  }
}
```

```bash
curl -s -X POST "https://app.loops.so/api/v1/events/send" --header "Authorization: Bearer $LOOPS_TOKEN" --header "Content-Type: application/json" -d @/tmp/loops_request.json
```

Docs: https://loops.so/docs/api-reference/send-event

### Send Transactional Email

Send a one-off email using a transactional template. Replace `<transactional-id>` with the ID from your Loops dashboard.

Write to `/tmp/loops_request.json`:

```json
{
  "transactionalId": "<transactional-id>",
  "email": "user@example.com",
  "dataVariables": {
    "firstName": "Jane",
    "resetLink": "https://app.example.com/reset?token=abc123"
  }
}
```

```bash
curl -s -X POST "https://app.loops.so/api/v1/transactional" --header "Authorization: Bearer $LOOPS_TOKEN" --header "Content-Type: application/json" -d @/tmp/loops_request.json
```

Docs: https://loops.so/docs/api-reference/send-transactional-email

### List Transactional Emails

```bash
curl -s "https://app.loops.so/api/v1/transactional" --header "Authorization: Bearer $LOOPS_TOKEN" | jq '[.[] | {id, name}]'
```

### List Mailing Lists

```bash
curl -s "https://app.loops.so/api/v1/lists" --header "Authorization: Bearer $LOOPS_TOKEN" | jq '[.[] | {id, name}]'
```

### List Contact Properties

```bash
curl -s "https://app.loops.so/api/v1/contacts/customFields" --header "Authorization: Bearer $LOOPS_TOKEN" | jq '[.[] | {key, label, type}]'
```

## Guidelines

1. **Contact identity**: Use `email` as the primary identifier. Optionally pass `userId` (e.g., Clerk user ID) to link contacts across systems.
2. **Event names**: Must exactly match the event name configured in your Loops dashboard loop trigger.
3. **Transactional IDs**: Find the `transactionalId` in Loops under **Transactional > [template] > API**.
4. **Rate limit**: 10 requests per second per team. Implement exponential backoff on HTTP 429.
5. **Field length**: Maximum 500 characters per field value.
6. **No CORS**: All requests must be server-side — never expose the API key to the browser.

More from vm0-ai/vm0-skills

SkillDescription
account-reconciliationPerform account reconciliations comparing general ledger balances against subledgers, bank statements, or external records. Use for bank reconciliation, GL-to-subledger reconciliation, intercompany reconciliation, balance sheet reconciliation, reconciling item analysis, outstanding item aging, or clearing open items.
agentphoneBuild AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything related to telephony, phone numbers, or voice AI.
ahrefsAhrefs SEO API for backlink and keyword analysis. Use when user mentions
amplitudeAmplitude product analytics API. Use when user mentions "Amplitude",
analysis-qaQuality-check a data analysis before sharing — verify joins, aggregations, denominators, time ranges, and metric definitions. Detect pitfalls like survivorship bias, average-of-averages, join explosion, timezone mismatches, incomplete periods, and selection bias. Includes documentation templates for reproducible analyses.
anthropic-managed-agentsAnthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
apifyApify web scraping platform. Use when user mentions "scrape website",
asanaAsana API for tasks and projects. Use when user mentions "Asana", "asana.com",
atlassianAtlassian API for Confluence and Jira. Use when user mentions "Confluence
attioAttio REST API for AI-native CRM operations — manage companies, people, deals, and custom objects, plus notes, tasks, lists, and comments. Use when the user mentions "Attio", "CRM record", "create company", "add person", "list entry", "CRM note", or "CRM task".