/ AW - Affiliate.md
AW - Affiliate.md
 1  ---
 2  type: make-scenario-migration
 3  status: pending
 4  make-id: 4265636
 5  active: false
 6  invalid: false
 7  trigger: webhook
 8  apps: [gateway, slack, close-crm]
 9  executions: ~low
10  last-edit: 2026-04-05
11  ---
12  
13  # AW | Affiliate
14  
15  **Status:** INACTIVE
16  **Make ID:** 4265636
17  **Trigger:** Custom Webhook
18  
19  ---
20  
21  ## Module Sequence
22  
23  1. **Custom Webhook** → receives POST (likely from "Calivus Labs | 2b - Demo Booked (Clean)" routing webhook)
24  2. **Slack — Create Message** → post affiliate notification to Slack
25  3. **Close CRM — Search Lead** → find lead by email
26  4. **BasicRouter** → branch: lead exists vs not found
27     - **Branch A (not found):** Close CRM — Create Lead → create with status = Affiliate
28     - **Branch B (found):** Close CRM — Update Lead → update status = Affiliate
29  
30  ---
31  
32  ## n8n Node Mapping
33  
34  | Make Module | n8n Node | Notes |
35  |---|---|---|
36  | Custom Webhook | Webhook node | Receives POST from routing scenario (2b) |
37  | Slack Create Message | Slack node | Send affiliate notification |
38  | Close CRM Search Lead | HTTP Request | GET Close API /lead/ with email |
39  | Switch node | Switch node | Route on search result |
40  | Close CRM Create Lead | HTTP Request | POST Close API /lead/ with status=Affiliate |
41  | Close CRM Update Lead | HTTP Request | PUT Close API /lead/{id}/ with status=Affiliate |
42  
43  ---
44  
45  ## Key Details
46  
47  - This scenario is a **sub-webhook target** — it receives HTTP POSTs from "Calivus Labs | 2b - Demo Booked (Clean)" (scenario 4265378) which routes bookings by Calendly event slug
48  - When migrating to n8n, consider consolidating all AW funnel branch scenarios (Affiliate, EBP-Sales, EBP-Onboarding, Moti Physio) into a single n8n workflow with a Switch node
49  - Currently inactive — activate only if affiliate funnel is live
50  
51  ---
52  
53  ## Migration Checklist
54  
55  - [ ] Confirm if affiliate funnel is currently active
56  - [ ] Decide: keep as separate workflow or consolidate into a single AW funnel workflow
57  - [ ] Recreate Close CRM API credential in n8n
58  - [ ] Recreate Slack credential in n8n
59  - [ ] Build workflow and set n8n webhook URL
60  - [ ] Update "2b - Demo Booked (Clean)" routing to point to new n8n URL (or consolidate)
61  - [ ] Test with sample affiliate booking payload
62  - [ ] Mark active when ready