# Clay Workflow Build Guide - PHT South Africa

## 🔑 API Keys (Stored)
- **Clay:** f5f46266f50887c25f53
- **Apollo:** xss1Wu8lX4jTxHjEZdTJyg
- **Hunter:** ad94c47afbcd3c27f46fe04480d32f72fd72bbdf

## 📊 Source Data
**South Africa List:** https://docs.google.com/spreadsheets/d/1km6raUNDLyru8VLrqLv69lS1sfA5jgMQJhN9c1dlXTQ/edit#gid=0

---

## Step-by-Step Build (30 minutes)

### STEP 1: Create New Table (2 min)

1. Go to https://clay.com/tables
2. Click **"+ New Table"**
3. Name it: **"PHT South Africa Prospects"**
4. Click **"Import from Google Sheets"**
   - Paste: `1km6raUNDLyru8VLrqLv69lS1sfA5jgMQJhN9c1dlXTQ`
   - Select all columns
   - Click **Import**

---

### STEP 2: Add Apollo Integration (3 min)

1. Click **"Integrations"** (top right)
2. Search **"Apollo"**
3. Click **"Connect"**
4. Enter API Key: `xss1Wu8lX4jTxHjEZdTJyg`
5. Click **"Test Connection"** → Should show ✓

Repeat for **Hunter.io:**
- API Key: `ad94c47afbcd3c27f46fe04480d32f72fd72bbdf`

---

### STEP 3: Enrich Cold Room Count (5 min)

**Add Column:** "Cold Room Count"

1. Click **"+ Add Enrichment"**
2. Select **"Use AI"** → **"Scrape with GPT"**
3. Settings:
   - **Input:** `{{Company Website}}` (from imported sheet)
   - **Prompt:**
   ```
   Visit this website and find information about their cold storage facilities.
   
   Look for:
   - Number of cold rooms
   - Number of CA (controlled atmosphere) rooms
   - Total storage capacity in rooms
   
   Return ONLY a number if found (e.g., "50" if they have 50 rooms).
   If no specific number is mentioned, return "Unknown".
   If the website doesn't load, return "Error".
   ```
   - **Output field name:** "room_count"

4. Click **"Run on 5 rows"** → Check results
5. If good → **"Run on all rows"**

---

### STEP 4: Enrich Fruit Type (4 min)

**Add Column:** "Fruit Type"

1. **+ Add Enrichment** → **"Use AI"** → **"Scrape with GPT"**
2. Settings:
   - **Input:** `{{Company Website}}`
   - **Prompt:**
   ```
   Visit this website and identify what types of fruit they store, pack, or export.
   
   Return ONLY the fruit types as a comma-separated list.
   Focus on: apples, citrus, pears, grapes, stone fruit, kiwis, avocados.
   
   Example outputs:
   - "apples, pears"
   - "citrus"
   - "grapes, stone fruit"
   
   If unclear, return "Unknown".
   ```
   - **Output field name:** "fruits"

3. **Run on 5 rows** → Check → **Run on all**

---

### STEP 5: Qualify Prospects (2 min)

**Add Column:** "Qualified?"

1. **+ Add Enrichment** → **"Formula"**
2. Formula:
   ```javascript
   if (
     (room_count >= 10 || room_count === "Unknown") &&
     (fruits.includes("apples") || fruits.includes("citrus") || fruits.includes("pears"))
   ) {
     return "YES";
   } else {
     return "NO";
   }
   ```

3. **Run on all rows**

4. **Filter table:**
   - Click filter icon
   - **Qualified? = "YES"**
   - Apply

---

### STEP 6: Find People with Apollo (6 min)

**Add Column:** "Contact"

1. **+ Add Enrichment** → **"Apollo"** → **"Find People"**
2. Settings:
   - **Company name:** `{{Company Name}}`
   - **Job titles:** Add multiple:
     - "Quality Manager"
     - "Operations Manager"
     - "General Manager"
     - "Cold Storage Manager"
     - "Technical Manager"
   - **Seniority:** Manager, Director, VP
   - **Max results:** 3
   - **Return:** Name, Title, Email, LinkedIn URL

3. **Run on 5 rows** → Check you're getting contacts
4. **Run on all qualified rows**

**Result:** You'll get 3 columns auto-created:
- Contact Name
- Contact Title  
- Contact Email
- Contact LinkedIn

---

### STEP 7: Email Validation Waterfall (5 min)

Clay has built-in email validation. Let's add it:

**Add Column:** "Email Valid?"

1. **+ Add Enrichment** → **"Email Validation"** → **"ZeroBounce"**
2. Input: `{{Contact Email}}`
3. **Run on all**

**Add fallback enrichment (if Apollo email fails):**

1. Click on **"Contact Email"** column header → **"Add waterfall"**
2. **Waterfall order:**
   - Apollo (already there)
   - → If null → **Hunter Email Finder**
     - Input: `{{Company Name}}`, `{{Contact Name}}`
   - → If still null → Skip row

---

### STEP 8: Scrape Website Copy (3 min)

**Add Column:** "Website Copy"

1. **+ Add Enrichment** → **"HTTP API"** → **"Scrape Website"**
2. URL: `{{Company Website}}/about`
3. Extract: First 1000 characters of text
4. **Run on all qualified rows**

---

### STEP 9: AI Personalization - Pain Points (4 min)

**Add Column:** "Pain Points"

1. **+ Add Enrichment** → **"Use AI"** → **"GPT-4"**
2. Prompt:
   ```
   You are analyzing a fruit storage company's website.
   
   Website copy: {{Website Copy}}
   Fruits they handle: {{Fruit Type}}
   Location: South Africa
   
   Task: Identify 1-2 specific pain points this company likely faces related to:
   - Post-harvest quality control
   - Export compliance (especially to EU)
   - Ethylene management
   - Multi-variety storage challenges
   - Ripening consistency
   
   Be specific and practical. Reference details from their website if mentioned.
   
   Format: 2 bullet points max.
   Example:
   - Exports to EU require strict ethylene monitoring for citrus
   - Managing ripening across 50+ rooms creates consistency issues
   ```

3. **Run on 5 rows** → Review quality
4. Adjust prompt if needed
5. **Run on all qualified rows**

---

### STEP 10: AI Personalization - Email Subject (3 min)

**Add Column:** "Email Subject"

1. **+ Add Enrichment** → **"Use AI"** → **"GPT-4"**
2. Prompt:
   ```
   Write 1 email subject line for {{Contact Name}} at {{Company Name}}.
   
   Context:
   - They store {{Fruit Type}} in South Africa
   - Pain points: {{Pain Points}}
   - We help companies like Zespri (NZ) and Costa (AU) monitor ethylene
   
   Rules:
   - 4-7 words maximum
   - Curious and helpful, NOT salesy
   - NO "Quick question" or "Touching base"
   - Reference their specific situation
   
   Examples:
   - "Export rejections at [Company]?"
   - "How Zespri cut citrus waste 40%"
   - "Ethylene spikes in CA storage?"
   
   Return ONLY the subject line, no quotes.
   ```

3. **Run on 5** → Check variety and quality
4. **Run on all**

---

### STEP 11: AI Personalization - Email Body (5 min)

**Add Column:** "Email Body"

1. **+ Add Enrichment** → **"Use AI"** → **"GPT-4"**
2. Prompt:
   ```
   Write a personalized cold email from Jonny Shannon to {{Contact Name}}, {{Contact Title}} at {{Company Name}}.
   
   Context:
   - They store {{Fruit Type}} in South Africa
   - Likely challenges: {{Pain Points}}
   - We help companies like Zespri (NZ kiwis), Costa Group (AU apples), and Wonderful Citrus (USA) monitor ethylene in real-time
   - Our product: Atmos - wireless ethylene sensors for cold rooms
   - Benefit: Catch ripening issues before fruit ships, reduce rejections
   
   Email structure:
   1. Personal observation about their business (1 sentence)
   2. Mention relevant challenge they likely face (1 sentence)
   3. How we help similar company (1 sentence, name-drop Zespri or Costa)
   4. Soft CTA: offer to send quick video walkthrough
   
   Tone:
   - Helpful and genuine, not salesy
   - Brief (50-70 words total)
   - NO hype words: "revolutionize", "game-changer", "cutting-edge"
   - Conversational, like you're messaging a colleague
   
   End with:
   "I recorded a quick video showing how [similar company] uses it. Want me to send it over?"
   
   Sign off:
   "Jonny"
   (no last name, keep casual)
   
   Return ONLY the email body text.
   ```

3. **Run on 5 rows** → Read carefully, check tone
4. Refine prompt if emails feel too generic or salesy
5. **Run on all qualified rows**

**Example output you should see:**
```
Hi Sarah,

Saw you're exporting citrus to Europe — keeping ethylene levels compliant across that many shipments must be tricky.

We help Costa Group monitor their CA rooms in real-time so they catch hot spots before fruit goes out. Cut their EU rejections by 40% last season.

I recorded a quick video showing how they use it. Want me to send it over?

Jonny
```

---

### STEP 12: LinkedIn Message (3 min)

**Add Column:** "LinkedIn Message"

1. **+ Add Enrichment** → **"Use AI"** → **"GPT-4"**
2. Prompt:
   ```
   Write a casual LinkedIn connection request message to {{Contact Name}}.
   
   Context:
   - They work at {{Company Name}} as {{Contact Title}}
   - Company stores {{Fruit Type}} in South Africa
   - We work with fruit exporters on post-harvest tech
   
   Rules:
   - Maximum 250 characters (LinkedIn limit)
   - Casual and friendly, NO pitch
   - Just want to connect
   
   Example:
   "Hey Sarah — saw you're managing quality at FreshPack. We work with a few citrus exporters in SA. Would be great to connect!"
   
   Return ONLY the message text, no quotes.
   ```

3. **Run on all qualified rows**

---

### STEP 13: Export Setup (4 min)

Now we have a table with:
- ✓ Qualified companies (10+ rooms, right fruits)
- ✓ Verified contacts with emails
- ✓ Personalized emails ready to send
- ✓ LinkedIn messages ready

**Set up daily export:**

1. Click **"Automations"** (top right)
2. **"+ New Automation"**
3. **Trigger:** Schedule
   - Time: 6:00 AM NZDT (daily)
4. **Action:** Run enrichments on new rows
5. **Then:** Export to CSV
   - Columns to export:
     - Company Name
     - Contact Name
     - Contact Email
     - Email Subject
     - Email Body
     - LinkedIn URL
     - LinkedIn Message
   - Filename: `pht-sa-outreach-{{date}}.csv`
   - Save to: Google Drive or download

6. **Advanced:** Add filter
   - Only export rows where:
     - Qualified? = YES
     - Email Valid? = Valid
     - Email Body is not null
   - Limit: Top 10 rows (sorted by Company Size or Cold Room Count, descending)

7. Save automation

---

### STEP 14: Instantly Integration (Optional - 3 min)

If you want Clay to send directly to Instantly:

1. **Automations** → **+ New Automation**
2. **Trigger:** When row is enriched (all columns filled)
3. **Filter:** Qualified = YES, Email Valid = Valid
4. **Action:** Webhook
   - URL: `https://api.instantly.ai/api/v1/lead/add`
   - Method: POST
   - Headers:
     ```json
     {
       "Content-Type": "application/json",
       "Authorization": "Bearer [YOUR_INSTANTLY_API_KEY]"
     }
     ```
   - Body:
     ```json
     {
       "campaign_id": "[CAMPAIGN_ID]",
       "email": "{{Contact Email}}",
       "first_name": "{{Contact Name}}",
       "company_name": "{{Company Name}}",
       "personalization": {
         "subject": "{{Email Subject}}",
         "body": "{{Email Body}}"
       }
     }
     ```

5. Test with 1 row
6. Enable automation

---

## Daily Workflow (Once Built)

**Every morning at 6am NZDT, Clay automatically:**

1. Checks for new companies added to Google Sheet
2. Enriches them (rooms, fruits, contacts, emails)
3. Generates personalized emails for qualified prospects
4. Exports top 10 to CSV (or sends to Instantly)
5. You review + approve before sending

**Manual check (5 min/day):**
- Review the 10 generated emails
- Edit any that feel off
- Approve send in Instantly
- Track replies

---

## Monitoring Dashboard

Create a **View** in Clay:

1. Click **"Views"** → **"+ New View"**
2. Name: **"Pipeline"**
3. Group by: **Status**
   - Found (all imported companies)
   - Qualified (10+ rooms, right fruits)
   - Contacted (email sent)
   - Replied (got response)
   - Booked (meeting scheduled)

4. Add **Summary Row** at bottom:
   - Total companies: COUNT
   - Qualified: COUNT WHERE Qualified = YES
   - Emails sent: COUNT WHERE Sent Date exists
   - Reply rate: (Replied / Sent) × 100

---

## Troubleshooting

**"GPT enrichment failed"**
→ Website might be blocking scraping. Add delay (Settings → Rate limiting)

**"Apollo returned no contacts"**
→ Company might not be in Apollo DB. Add Hunter fallback or manual research

**"Email validation shows risky"**
→ Use email anyway for first batch, monitor bounce rate

**"Personalization feels generic"**
→ Refine GPT prompts with more specific examples. Run on 5 rows, iterate.

---

## Next: PhantomBuster for LinkedIn

Once Clay is outputting 10 prospects/day:

1. Export LinkedIn URLs + messages to CSV
2. Upload to PhantomBuster
3. Set up "LinkedIn Auto-Connect" phantom
4. Sends 20 connection requests/day with personalized messages

---

## Cost Tracker

- **Clay:** $149/mo (Starter = 2,000 credits/mo)
- Each enrichment = 1 credit
- We use ~12 enrichments per prospect
- 2,000 credits ÷ 12 = **166 prospects/month** can be processed
- At 10/day outreach = **~300/month needed** → May need Growth plan ($349/mo for 10K credits)

**Monitor usage:**
- Clay dashboard → Usage
- Alert when you hit 80% of monthly credits

---

Ready to build! Let me know if you want me to do any of this programmatically via Clay API, or if you prefer to follow this guide in Clay's UI.
