I spent my first month at a startup manually copying data between 12 different tools every morning. One day I snapped and built an LLM-powered automation that eliminated 90% of that work.
What you'll build: LLM workflows that automatically process emails, generate reports, and update multiple apps
Time needed: 30 minutes for first automation, 10 minutes for each additional one
Difficulty: Intermediate (basic API knowledge helpful)
By the end, you'll have AI automatically handling repetitive tasks across any combination of 5000+ supported applications.
Why I Built This
My specific situation: Every morning at 8 AM, I had to:
- Read 50+ customer support emails
- Categorize them by urgency and department
- Create tickets in 3 different systems
- Send personalized responses
- Update our internal Slack with summaries
This took 2-3 hours daily. As a startup employee wearing multiple hats, I couldn't afford that time drain.
My setup:
- MacBook Pro M2 with reliable internet
- Zapier Pro account ($19.99/month - worth every penny)
- OpenAI API access ($0.002 per 1K tokens)
- Access to Gmail, Slack, Notion, and our ticketing system
What didn't work:
- Basic Zapier filters (too rigid for complex logic)
- Gmail's built-in rules (can't handle context-dependent routing)
- Manual templates (customers noticed the copy-paste responses)
- Time wasted: 40+ hours trying rule-based solutions
Set Up Your LLM API Connection
The problem: Zapier doesn't natively connect to most LLM APIs
My solution: Use Zapier's Webhooks feature to create a bridge
Time this saves: 15 minutes vs. building custom integrations
Step 1: Get Your LLM API Credentials
First, grab API keys from your preferred LLM provider:
# For OpenAI (most reliable in my experience)
# Go to: https://platform.openai.com/api-keys
# Click "Create new secret key"
# Copy: sk-proj-...your-key-here
# For Anthropic Claude (my current favorite)
# Go to: https://console.anthropic.com/
# Click "Get API keys"
# Copy: sk-ant-...your-key-here
What this does: Gives Zapier permission to send requests to your chosen LLM
Expected output: A long string starting with "sk-"
Getting your API key takes 30 seconds - keep this tab open, you'll need it in Step 3
Personal tip: "Create a separate API key just for Zapier automations. Makes it easier to track usage and rotate keys if needed."
Step 2: Create Your First Zapier Workflow
Log into Zapier and create a new automation:
// Zapier Trigger Setup
1. Click "Create Zap"
2. Choose your trigger app (Gmail, Slack, etc.)
3. Select trigger event ("New Email" works great for testing)
4. Connect your account and test the trigger
What this does: Sets up the event that starts your automation
Expected output: Zapier pulls in a test record from your trigger app
Choose "New Email" for your first test - you can always change this later
Personal tip: "Start with Gmail or Slack triggers. They're the most reliable and you'll see results immediately."
Step 3: Add the LLM Processing Step
Here's where the magic happens - connecting your LLM:
// Add Webhooks by Zapier Action
1. Click "+" to add new step
2. Search "Webhooks by Zapier"
3. Choose "POST" action
4. Configure the webhook:
URL: https://api.openai.com/v1/chat/completions
Method: POST
Headers:
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY_HERE
Body (Raw JSON):
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant that categorizes and responds to customer emails. Return your response as JSON with keys: category, urgency_level, suggested_response, and action_items."
},
{
"role": "user",
"content": "Email subject: {{trigger_subject}}\nEmail body: {{trigger_body}}\n\nPlease categorize this email and suggest a response."
}
],
"max_tokens": 500,
"temperature": 0.3
}
What this does: Sends your email content to the LLM and gets structured analysis back Expected output: JSON response with categorization and suggested actions
This exact configuration works with OpenAI's API - adjust the model name based on your needs
Personal tip: "Use temperature 0.3 for consistent categorization, 0.7 for more creative responses. I learned this after getting wildly different results."
Step 4: Parse the LLM Response
The LLM returns JSON, but Zapier needs individual fields:
// Add "Code by Zapier" step
1. Click "+" for new step
2. Search "Code by Zapier"
3. Choose "Run JavaScript"
4. Input this code:
const response = JSON.parse(inputData.llm_response);
const content = JSON.parse(response.choices[0].message.content);
output = {
category: content.category,
urgency: content.urgency_level,
suggested_response: content.suggested_response,
action_items: content.action_items
};
What this does: Extracts individual values from the LLM's JSON response Expected output: Separate fields you can use in subsequent steps
This code handles the most common JSON response format - adjust based on your LLM's output style
Personal tip: "Always test this step with a real LLM response. I spent an hour debugging until I realized the JSON was nested differently than expected."
Build Smart Routing Based on LLM Analysis
The problem: Static rules can't handle context-dependent decisions
My solution: Use LLM categorization to trigger different action paths
Time this saves: Eliminates manual sorting and reduces response time by 80%
Step 5: Add Conditional Logic
Route your workflow based on the LLM's analysis:
// Add "Paths by Zapier" step
1. Click "+" for new step
2. Search "Paths by Zapier"
3. Set up conditions:
Path A (Urgent):
Rule: urgency equals "high"
Path B (Technical):
Rule: category contains "technical"
Path C (General):
Rule: catch all other emails
What this does: Creates different automation branches based on LLM classification Expected output: Emails automatically routed to appropriate handling workflows
Set up 3-4 paths maximum - more than that becomes hard to maintain
Personal tip: "Always include a catch-all path. You'll be surprised what edge cases the LLM finds that you didn't anticipate."
Step 6: Configure Actions for Each Path
Set up different responses for each path:
// Path A (Urgent) - Immediate Slack notification + Auto-response
Actions:
1. Send Slack message to #urgent-support
Message: "🚨 Urgent email from {{trigger_sender}}: {{category}}"
2. Send Gmail reply
Body: {{suggested_response}}
3. Create Notion task
Title: "URGENT: {{trigger_subject}}"
Priority: High
// Path B (Technical) - Route to engineering
Actions:
1. Create Linear ticket
Title: {{trigger_subject}}
Description: {{action_items}}
Team: Engineering
2. Send Slack message to #eng-support
Message: "New tech issue: {{trigger_subject}}"
// Path C (General) - Standard response
Actions:
1. Send Gmail reply
Body: {{suggested_response}}
2. Add to Notion customer database
Status: "Responded"
What this does: Executes different automation sequences based on email content and urgency Expected output: Appropriate actions taken automatically without manual intervention
Configure 2-3 actions per path - more than that gets complex to troubleshoot
Personal tip: "Test each path separately first. I once had urgent emails going to the wrong Slack channel because I mixed up the path configurations."
Advanced LLM Workflow Patterns
Pattern 1: Multi-Step Analysis Chain
For complex documents that need multiple LLM passes:
// Email → Extract Info → Analyze Sentiment → Generate Response → Review Quality
Step 1: Extract key information
Step 2: Analyze customer sentiment
Step 3: Generate appropriate response
Step 4: Quality check the response
Step 5: Send or flag for review
Personal tip: "Chain 2-3 LLM calls for complex analysis. More than that gets expensive and slow."
Pattern 2: Cross-Platform Data Sync
Keep information synchronized across tools:
// New Notion Task → LLM Summary → Update Slack + Linear + Calendar
Trigger: New task in Notion
LLM: Generate concise summary and estimate effort
Actions:
- Post to relevant Slack channel
- Create Linear sub-tasks
- Block time on calendar
Personal tip: "This pattern saved me 5 hours weekly of manual status updates across tools."
Pattern 3: Intelligent Content Generation
Auto-generate content based on data changes:
// Updated Spreadsheet → LLM Analysis → Generate Report → Distribute
Trigger: Row updated in Google Sheets
LLM: Analyze trends and generate insights
Actions:
- Create formatted report in Google Docs
- Send summary email to stakeholders
- Post key metrics to Slack
Personal tip: "Use this for weekly reports. I haven't manually written a status update in 6 months."
Testing and Debugging Your Workflows
Quick Debug Checklist
When your automation isn't working:
âœ" API Key Issues:
# Test your API key directly
curl -H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
https://api.openai.com/v1/models
# Should return list of available models
âœ" JSON Parsing Problems:
- Copy the exact LLM response from Zapier logs
- Test JSON parsing in a browser console
- Check for escaped quotes or unexpected characters
âœ" Trigger Not Firing:
- Send a test email/message
- Check Zapier's task history
- Verify account permissions
Personal tip: "90% of issues are API key problems or JSON formatting. Check these first before diving deeper."
Performance Optimization
Token Usage Tracking:
// Monitor your API costs
Daily tokens used: ~2,000 (emails + analysis)
Monthly cost: ~$4 for 100 emails/day
ROI: Saves 10 hours @ $50/hour = $500 saved vs $4 spent
Speed Improvements:
- Use faster models (gpt-3.5-turbo) for simple tasks
- Batch similar requests when possible
- Set shorter max_tokens for categorization tasks
Personal tip: "I use GPT-4 for complex analysis and GPT-3.5 for simple categorization. Cuts costs by 60% with minimal quality loss."
What You Just Built
You now have an AI-powered automation system that:
- Automatically processes incoming emails with context awareness
- Routes urgent issues to the right people instantly
- Generates personalized responses without manual writing
- Keeps all your tools synchronized with minimal effort
Key Takeaways (Save These)
- Start Simple: Begin with one trigger and one LLM analysis before adding complexity
- JSON is Key: Structure your LLM prompts to return consistent JSON for easy parsing
- Test Everything: Use Zapier's test feature extensively - it catches 90% of issues before going live
- Monitor Costs: Track token usage daily to avoid surprise bills
- Version Control: Document your prompts and workflows - you'll thank yourself later
Your Next Steps
Pick one based on your experience:
Beginner: Set up a simple email categorization workflow using the exact steps above Intermediate: Add sentiment analysis and dynamic response templates to improve quality Advanced: Build multi-step analysis chains or cross-platform data synchronization
Tools I Actually Use
- Zapier Pro: Essential for complex workflows and faster execution times
- OpenAI API: Most reliable for consistent JSON responses (Claude for creative tasks)
- Postman: Perfect for testing API calls before adding them to Zapier
- Zapier Documentation: Surprisingly good for webhook configuration examples
Cost breakdown for 100 emails/day:
- Zapier Pro: $19.99/month
- OpenAI API: ~$4/month
- Time saved: 10+ hours weekly
- ROI: 2500% (conservatively)
My current setup handles 200+ emails daily across 8 different tools automatically
Personal tip: "Start with free Zapier tier to test your workflow, then upgrade when you're processing 20+ items daily. The speed difference is worth the cost."