Automation Recipes (Zapier/Make + Cron)
Use these step‑by‑step guides to connect your tools to Avyant. Each recipe calls a secure endpoint in your site to create/update clients, send reminders, and prepare reports.
Endpoints
POST
/api/integrations/stripe/purchasecurl -X POST "$APP_URL/api/integrations/stripe/purchase" -H "Content-Type: application/json" -d '{
"email": "client@example.com",
"businessName": "Client Co",
"contactName": "Alex Client",
"packageType": "growth_engine",
"packagePrice": 1495,
"phone": "+1 555 123 5555"
}'POST
/api/clients/onboardcurl -X POST "$APP_URL/api/clients/onboard" -H "Content-Type: application/json" -d '{
"email": "client@example.com",
"businessName": "Client Co",
"contactName": "Alex Client",
"websiteUrl": "https://client.co",
"instagramHandle": "@clientco"
}'POST
/api/integrations/approval-remindercurl -X POST "$APP_URL/api/integrations/approval-reminder" -H "Content-Type: application/json" -d '{
"clientId": 123
}'POST
/api/integrations/reports/monthly-prepcurl -X POST "$APP_URL/api/integrations/reports/monthly-prep" -H "Content-Type: application/json" -d '{
"clientName": "Client Co",
"clientEmail": "client@example.com",
"month": "2025-11"
}'POST
/api/integrations/referralscurl -X POST "$APP_URL/api/integrations/referrals" -H "Content-Type: application/json" -d '{
"referrerName": "Taylor Referrer",
"referrerEmail": "ref@example.com",
"clientName": "Client Co",
"clientEmail": "client@example.com"
}'Replace $APP_URL with your site URL. In local dev, use http://localhost:4000.
Zapier: Stripe → Create Client + Onboarding
- Trigger: Stripe → New Successful Payment.
- Formatter (optional): split customer name into first/last.
- Action: Webhooks by Zapier → POST.
- URL:
$APP_URL/api/integrations/stripe/purchase. - Payload Type: json.
- Data: email, businessName, contactName, packageType, packagePrice, phone (map from Stripe).
- Test → you should receive a 200 and see the client in your dashboard later.
Zapier: Onboarding Form → Finalize Setup
- Trigger: Your form app (Tally/Typeform/Webflow) → New Submission.
- Action: Webhooks by Zapier → POST.
- URL:
$APP_URL/api/clients/onboard. - Payload Type: json.
- Data: include contact name, email, website, social handles, notes, links to assets.
- Optional step: Email your team with a summary using Gmail/Outlook.
Zapier: Approval Reminder (3 days after send)
- Trigger: Schedule by Zapier → Every Day at 9am.
- Action: Webhooks by Zapier → GET
$APP_URL/api/admin/clients(list all). - Action: Looping by Zapier → For each client → Webhooks POST →
/api/integrations/approval-reminderwithclientId. - Optional: Add a Delay/Filter to run only Mon/Wed/Fri.
This pings clients who still have posts in “pending” or “needs_revision”.
Zapier: Monthly Report Prep (25th each month)
- Trigger: Schedule by Zapier → Every Month on day 25 at 9am.
- Action: Webhooks by Zapier → GET
$APP_URL/api/admin/clients. - Action: Looping by Zapier → For each client → Webhooks POST →
/api/integrations/reports/monthly-prepwith clientName, clientEmail, month (e.g.,{{zap_meta_human_now}}→ format YYYY-MM).
Zapier: Referral Program
- Trigger: New form submission where “Referral Source” is present.
- Action: Webhooks by Zapier → POST →
$APP_URL/api/integrations/referrals. - Map referrerName/referrerEmail and clientName/clientEmail.
Cron examples (no Zapier)
Use your server or a cron service (e.g., GitHub Actions, EasyCron) to call endpoints.
Daily approval reminder for a specific client
0 9 * * * curl -s -X POST \
"$APP_URL/api/integrations/approval-reminder" \
-H "Content-Type: application/json" \
-d '{"clientId": 123}' >/dev/null 2>&1Monthly report prep (25th 9am)
0 9 25 * * curl -s -X POST \
"$APP_URL/api/integrations/reports/monthly-prep" \
-H "Content-Type: application/json" \
-d '{"clientName":"Client Co","clientEmail":"client@example.com","month":"$(date +%Y-%m)"}' >/dev/null 2>&1For all clients, use Zapier/Make to loop through /api/admin/clients, or run a small script that loops over the list and POSTs for each.