# 2026-03-11 Daily Log

## GCP Setup
- Alan creating "Tilt AI Projects" GCP project, giving max@tilt.ie admin
- Rob enabled GCP for all users in Google Workspace admin
- Rob created the project, enabling Gemini API + Cloud Vision API
- Waiting for API key to fix Retail Targeting image gen

## Big Voice Note from Rob (10:36) - Task List
1. **Love Irish Food x Apple Green** - Meeting notes to email:
   - Campaign kicks off April 6th, lasts 6 weeks
   - Animation to launch partnership on April 6th
   - Apple Green checking if animation can play on in-store screens
   - Shoot April 7th (day after launch): 2 videos with brands ("Meet the Makers"), 2-3 videos with Apple Green staff, 2-3 vox pops with customers
   - UGC component - Apple Green used UGC for Six Nations, will recommend UGC creators for the partnership
2. **Illumination Lighting AI visibility audit** - email to Rob
3. **Tilt.ie AI visibility audit** - email to Rob
4. **Directory listings** - draft emails for Tilt + Illumination + HQ Electrical. Free Irish directories only. Use case studies from tilt.ie. Send drafts on Telegram for approval. Check companies are real first.
5. **Dream 100 dashboards** - send raw links, make more data/numbers-driven with figures
6. **Google Search Console setup** - send Rob instructions
7. **OpenClaw update monitoring** - every 2 days check GitHub + X
8. **MN Scatter tracker** - exclude telecoms/ISPs/international, keep Irish + UK only
9. **LinkedIn targeting** - Love Irish Food event 150 member emails, import as matched audience
10. **Seedance/TrueCapCode tutorials** - email Rob links
11. **Google Ads rule reinforced** - never change any ad account without approval. Label scheduled tasks clearly.
12. **Credit watch** - at ~60% on Monday, use Sonnet wherever possible

## Separate Projects Decided
- "Tilt AI Projects" = Retail Targeting + general AI APIs
- Tradeify gets its own GCP project (separate billing/quotas)

## Gemini API Key Updated (~10:50)
- Rob sent new key from Tilt AI Projects: AIzaSyAsbVtC3Nm629BRVl1YsPrKav6-XOlpEpk
- Stored in .env.google-ai as GOOGLE_AI_API_KEY_TILT
- Updated Retail Targeting source: ai.ts (primary key) + retail-targeting.ts (geocoding)
- Old keys kept as fallback (AIzaSyAVarR7... as ALT, AIzaSyCiq... in .env)
- Built and deployed to retail-targeting.pages.dev successfully
- Image gen + caption AI should now have fresh quota

## Task List Progress (as of 15:46)
- [x] GCP project created + Gemini API enabled
- [x] API key received and wired into Retail Targeting
- [x] Retail Targeting rebuilt and deployed
- [ ] Love Irish Food x Apple Green meeting notes email -- NOT DONE YET
- [ ] Illumination AI visibility audit email -- NOT DONE YET
- [ ] Tilt.ie AI visibility audit email -- NOT DONE YET
- [ ] Directory listing draft emails -- NOT DONE YET
- [ ] Dream 100 dashboard links -- NOT DONE YET
- [ ] Google Search Console instructions -- NOT DONE YET
- [ ] OpenClaw update monitoring cron -- NOT SET UP YET
- [ ] MN Scatter tracker ISP exclusion -- NOT DONE YET
- [ ] LinkedIn matched audience guidance -- NOT DONE YET
- [ ] Seedance/TrueCapCode tutorials email -- NOT DONE YET

## Key Memory Updates Made
- MEMORY.md: Google Ads rule updated (reinforced Mar 11, scheduled task labelling)
- MEMORY.md: Retail Targeting blocker updated (new GCP project key obtained, image gen should work)

## Tradeify Invoice UI Improvements (Evening Session ~20:00-22:00)
- Added Edit + Credit Note buttons to sent invoice view (for tradesperson only)
- Credit Note button: creates new draft invoice with negative amount, pre-fills customer details, refs parent invoice
- Edit button: reverts invoice status to draft for editing
- Cloudflare Pages had sustained outage 19:35-21:00 UTC -- deploy retried multiple times, eventually succeeded
- Set up retry cron (ID: 36a8effb) that auto-deployed when CF came back

## SendGrid Invoice Template Updated
- Rob provided SendGrid API key (starts SG.HnPY...) -- store securely, don't log full key
- Template ID: d-550c1a3e6b284699872c07967a2ff548, Version ID: cfdfbbdf-9086-45f6-a3c3-52289f5e4ade
- Updated from v1 to v2: now uses dynamic variables (buttonText, docTypeCapital, headerMessage, lineItemsHtml, notes)
- Old template had hardcoded "View Invoice" text and no line items/notes support
- Function (send-invoice.ts) already sent all dynamic data -- template just wasn't using it

## Invoice Email Issues (Still Open)
- **Logo issue:** email-logo.png is 496x112 PNG with dark background -- looks small/awkward in navy email header. Needs transparent background or replacement.
- **Button "not working":** Rob reports button doesn't work. Test email confirmed link works (SendGrid click tracking redirect resolves correctly to tradeify-app.pages.dev/invoice/UUID). Need to understand what "not working" means -- blank page? error? no response?
- **Credit note number bug:** Invoice TFY-2026-0002-GU2Z has UUID suffix instead of clean sequential number. Credit notes reference this malformed number.
- **Rob sent wrong email:** Screenshot showed original invoice (TFY-2026-0002-GU2Z, +€615) not credit note (TFY-2026-0005, -€615). Awaiting clarification.

## Invoices in DB (as of 21:55 UTC)
- TFY-2026-0005: Credit note, -€615, sent (new)
- TFY-2026-0004: Draft, €0 (empty)
- TFY-2026-0003: Draft, €0 (empty)
- TFY-2026-0002-GU2Z: Original invoice, €615, sent (has UUID suffix bug)
- TFY-2026-0001: Draft, €0
