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/purchase
curl -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/onboard
curl -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-reminder
curl -X POST "$APP_URL/api/integrations/approval-reminder"   -H "Content-Type: application/json"   -d '{
    "clientId": 123
  }'
POST/api/integrations/reports/monthly-prep
curl -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/referrals
curl -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

  1. Trigger: Stripe → New Successful Payment.
  2. Formatter (optional): split customer name into first/last.
  3. Action: Webhooks by Zapier → POST.
  4. URL: $APP_URL/api/integrations/stripe/purchase.
  5. Payload Type: json.
  6. Data: email, businessName, contactName, packageType, packagePrice, phone (map from Stripe).
  7. Test → you should receive a 200 and see the client in your dashboard later.

Zapier: Onboarding Form → Finalize Setup

  1. Trigger: Your form app (Tally/Typeform/Webflow) → New Submission.
  2. Action: Webhooks by Zapier → POST.
  3. URL: $APP_URL/api/clients/onboard.
  4. Payload Type: json.
  5. Data: include contact name, email, website, social handles, notes, links to assets.
  6. Optional step: Email your team with a summary using Gmail/Outlook.

Zapier: Approval Reminder (3 days after send)

  1. Trigger: Schedule by Zapier → Every Day at 9am.
  2. Action: Webhooks by Zapier → GET $APP_URL/api/admin/clients (list all).
  3. Action: Looping by Zapier → For each client → Webhooks POST → /api/integrations/approval-reminder with clientId.
  4. 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)

  1. Trigger: Schedule by Zapier → Every Month on day 25 at 9am.
  2. Action: Webhooks by Zapier → GET $APP_URL/api/admin/clients.
  3. Action: Looping by Zapier → For each client → Webhooks POST → /api/integrations/reports/monthly-prep with clientName, clientEmail, month (e.g., {{zap_meta_human_now}} → format YYYY-MM).

Zapier: Referral Program

  1. Trigger: New form submission where “Referral Source” is present.
  2. Action: Webhooks by Zapier → POST → $APP_URL/api/integrations/referrals.
  3. 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>&1

Monthly 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>&1

For 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.

Get Started