Zapier patterns

From oyi77/1ai-skills · View interactive version

Zapier patterns is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when zapier automation patterns — triggers, actions, filters, formatters, paths, code steps. Use when working with zapier patterns.

How to use this skill

Skill file

Overview

Zapier is the most popular no-code automation platform with 7000+ app integrations. It uses Zaps (workflows) with triggers, actions, filters, formatters, paths, and code steps.

Capabilities

When to Use

Trigger phrases:

When NOT to Use

Pseudo Code

Implementation patterns for common use cases with this skill.

Zap Structure

Trigger → Filter → Formatter → Action 1 → Action 2
                              ↘ Path A → Action A
                               ↘ Path B → Action B

Trigger Types

| Type | Example |

|------|---------|

| App Event | New email, New row in spreadsheet |

| Webhook | Catch Hook (custom URL) |

| Schedule | Every hour, Daily at 9am |

| RSS | New feed item |

Filter

{
  "filter": {
    "conditions": [
      {
        "field": "status",
        "operator": "str",
        "value": "active"
      },
      {
        "field": "amount",
        "operator": "number_greater",
        "value": "100"
      }
    ]
  }
}

Formatter (Data Transformation)

// Text
{{formatter.text.uppercase(input)}}
{{formatter.text.replace(input, "old", "new")}}
{{formatter.text.substring(input, 0, 10)}}

// Number
{{formatter.number.round(input, 2)}}
{{formatter.number.formatCurrency(input, "USD")}}

// Date
{{formatter.date.format(input, "YYYY-MM-DD")}}
{{formatter.date.addDays(input, 7)}}

// Utilities
{{formatter.utilities.lookup(input, lookupTable)}}

Paths (Conditional Branching)

{
  "paths": [
    {
      "conditions": [
        {"field": "priority", "operator": "str", "value": "high"}
      ],
      "actions": ["send_slack", "create_ticket"]
    },
    {
      "conditions": [
        {"field": "priority", "operator": "str", "value": "low"}
      ],
      "actions": ["log_only"]
    }
  ]
}

Code by Zapier (JavaScript)

// Input from previous steps
const email = inputData.email;
const name = inputData.name;

// Process
const domain = email.split('@')[1];
const isCompany = domain !== 'gmail.com' && domain !== 'yahoo.com';

// Output
output = {
  processed: true,
  domain: domain,
  isCompany: isCompany,
  greeting: `Hello ${name}`,
};

Code by Zapier (Python)

import json

# Input
email = input_data['email']
amount = float(input_data['amount'])

# Process
tax = amount * 0.1
total = amount + tax

# Output
output = {
    'subtotal': amount,
    'tax': round(tax, 2),
    'total': round(total, 2),
}

Webhook (Catch Hook)

# Zapier provides a URL like:
# https://hooks.zapier.com/hooks/catch/123456/abcdef/

# POST data to it
curl -X POST "https://hooks.zapier.com/hooks/catch/123456/abcdef/" \
  -H "Content-Type: application/json" \
  -d '{"event": "new_order", "amount": 99.99}'

Common Patterns

| Pattern | When to Use |

|---------|------------|

| New Row → Filter → Send Email | Spreadsheet automation |

| Webhook → Process → Multiple Actions | Custom event handling |

| Schedule → Fetch → Transform → Store | Regular data sync |

| Path A / Path B | Conditional logic |

| Formatter → Clean Data | Data normalization |

| Code Step → Complex Logic | Custom transformations |

Error Handling

| Error | Cause | Fix |

|-------|-------|-----|

| Filter stopped Zap | Conditions not met | Check filter logic |

| Rate limit | Too many tasks | Add delay step or use Paths |

| Code error | Syntax or runtime error | Test code step individually |

| App disconnected | OAuth token expired | Reconnect app |

Red Flags

Verification

Process

  1. Analyze the task requirements
  2. Apply domain expertise
  3. Verify output quality

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "Manual is faster for one-off tasks" | One-off tasks become recurring. Automate early, save time later. |

| "I will add error handling later" | You never do. Handle errors from day one. |

| "Automation is overkill" | If you do it twice, automate it. If you do it daily, it is critical infrastructure. |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.