After 5+ hours of testing and refining, I got it working, fetching unread Gmail messages, extracting key info, and logging everything neatly into Google Sheets.
Fixes & Wins:
- Handled
.map()
onundefined
by using safe fallbacks - Switched from
updateValues()
toappendValues()
for Sheets - Improved email parsing for consistent data logging
Lessons Learned:
- Always check your state variables!
- Read adaptor docs — they’ll save your day
- OpenFn’s error logs are gold when debugging
Next up: scam detection logic + alerts + packaging it as a template for NGOs
Check out the repo GitHub - Centpizzy-cloud/GreenTEK-OpenFn-Email-Workflow: A smart automation project using OpenFn to filter, log, and organize emails into Google Sheets.