Automation Platform Integration
Connect Loyalteez to automation platforms like Zapier, Make, IFTTT, n8n, and Pipedream for no-code reward distribution.
Overview
This guide covers platform-specific integration details. For comprehensive automation patterns and workflows, see the Automation Guide.
Quick Links
- Automation Guide - Complete workflow examples and patterns
- Event Handler API - API reference
- Custom Events - Define custom event types
Supported Platforms
| Platform | Type | Difficulty | Best For |
|---|---|---|---|
| Zapier | Cloud | Easy | Business users, quick setup |
| Make | Cloud | Easy | Visual workflows, complex logic |
| IFTTT | Cloud | Very Easy | Simple triggers, social media |
| n8n | Self-hosted | Medium | Privacy, custom hosting |
| Pipedream | Cloud | Medium | Developers, serverless |
Platform Integrations
Zapier
Setup:
- Trigger: Choose app (e.g., "New Email in Gmail")
- Action: "Webhooks by Zapier" → "POST"
- URL:
https://api.loyalteez.app/loyalteez-api/manual-event - Payload Type: JSON
- Data: See Automation Guide
Templates:
- Newsletter signup rewards
- E-commerce purchase rewards
- CRM activity rewards
- Form submission rewards
Make (Integromat)
Setup:
- Add "HTTP" module
- Method: "Make a request"
- URL:
https://api.loyalteez.app/loyalteez-api/manual-event - Method: POST
- Body type: Raw
- Content type: JSON
Use Cases:
- Multi-step workflows
- Conditional rewards
- Data transformation
- Error handling
IFTTT
Setup:
- Choose trigger service
- Action: "Webhooks" → "Make a web request"
- URL:
https://api.loyalteez.app/loyalteez-api/manual-event - Method: POST
- Content Type: application/json
Best For:
- Social media triggers
- IoT device triggers
- Location-based rewards
- Simple automations
n8n
Setup:
- Add "HTTP Request" node
- Method: POST
- URL:
https://api.loyalteez.app/loyalteez-api/manual-event - Authentication: None
- Send Body: Yes
- Body Content Type: JSON
Advantages:
- Self-hosted (full control)
- Open source
- No vendor lock-in
- Custom nodes
Pipedream
Setup:
export default defineComponent({
async run({ steps, $ }) {
await $.send.http({
method: 'POST',
url: 'https://api.loyalteez.app/loyalteez-api/manual-event',
headers: {
'Content-Type': 'application/json'
},
data: {
brandId: process.env.LOYALTEEZ_BRAND_ID,
eventType: steps.trigger.event.type,
userEmail: steps.trigger.event.user.email,
domain: 'yourdomain.com',
metadata: {
source: 'pipedream'
}
}
});
}
});
Advantages:
- Serverless
- Code + no-code
- Built-in OAuth
- Event sources
Request Format
All platforms use the same API format:
{
"brandId": "YOUR_BRAND_ID",
"eventType": "event_name",
"userEmail": "[email protected]",
"domain": "yourdomain.com",
"metadata": {
"source": "platform_name",
"custom_field": "value"
}
}
Common Integration Patterns
For detailed workflow examples, see the Automation Guide:
- Email Marketing - Newsletter signup rewards
- E-Commerce - Purchase and review rewards
- CRM - Deal and activity rewards
- Social Media - Content and engagement rewards
- Project Management - Task completion rewards
Platform Comparison
| Feature | Zapier | Make | IFTTT | n8n | Pipedream |
|---|---|---|---|---|---|
| Price | $$ | $$ | Free/$ | Free | Free/$ |
| Complexity | Low | Medium | Low | Medium | High |
| Hosting | Cloud | Cloud | Cloud | Self | Cloud |
| Code Support | Limited | Limited | No | Yes | Yes |
| Error Handling | Good | Great | Basic | Great | Great |
| Rate Limits | Plan-based | Plan-based | Limited | None | Generous |
Best Practices
1. Use Environment Variables
// Instead of hardcoding
const BRAND_ID = process.env.LOYALTEEZ_BRAND_ID;
const DOMAIN = process.env.DOMAIN;
2. Add Retry Logic
// Example for Pipedream
export default defineComponent({
async run({ steps, $ }) {
let attempts = 0;
const maxAttempts = 3;
while (attempts < maxAttempts) {
try {
await rewardUser(...);
break;
} catch (error) {
attempts++;
if (attempts === maxAttempts) throw error;
await $.sleep(1000 * attempts);
}
}
}
});
3. Validate Data
// Validate before sending
if (!email || !email.includes('@')) {
throw new Error('Invalid email');
}
if (!eventType || eventType.length > 50) {
throw new Error('Invalid event type');
}
4. Log Everything
// Track for debugging
console.log('Rewarding user:', { email, eventType, metadata });
// Log responses
console.log('API response:', response.data);
Troubleshooting
Connection Errors
Problem: "Failed to connect to API"
Solutions:
- Check API URL is correct
- Verify internet connectivity
- Check for firewall blocks
- Retry with exponential backoff
Authentication Errors
Problem: "Domain not authorized"
Solutions:
- Verify domain in Partner Portal settings
- Check domain format (no protocol/slash)
- Use exact domain from website_url
Rate Limit Errors
Problem: "Too many requests"
Solutions:
- Add delays between requests
- Implement queuing
- Contact support for limit increase
Next Steps
- Complete Automation Guide - Detailed workflows and examples
- Event Handler API - Full API documentation
- Custom Events - Create custom event types
- Testing Guide - Test your integrations
Support
- Templates: See Automation Guide
- Community: Discord
- Email: [email protected]