I made a “proper case” name formatter with Claude as a custom-coded action.
= A comprehensive JavaScript function for Operations Hub Pro that handles proper case formatting for contact names while respecting cultural conventions. Processes names through workflow inputs/outputs (no API calls needed) and handles 95% of common naming scenarios correctly.
✅ Key Features
Basic formatting: `john smith` → `John Smith`, handles mixed case cleanup
Surname prefixes: `mcdonald` → `McDonald`, `o'connor` → `O'Connor`
Smart quotes: Handles Unicode apostrophes from copy/paste operations
Cultural particles: `van der berg` → `van der Berg` (connected), `van` → `Van` (standalone)
Special cases: Roman numerals (`iii` → `III`), initials (`tj` → `TJ`), hyphens (`mary-jane` → `Mary-Jane`)
International: Preserves accented characters (`josé garcía` → `José García`)
Edge cases: Quoted names (`'edward'` → `'Edward'`), parentheses (`john (manager)` → `John (Manager)`)
❌ Limitations
Complex cultural: Hawaiian multi-apostrophe names, Arabic transliterations, Asian naming conventions
Philosophy: Conservative approach - better to under-format than incorrectly format cultural names
Good when standard Western naming conventions are most common. I ran it on one million contacts and I’m pleased
Inputs: firstname, lastname
Outputs: formatted_firstname, formatted_lastname
I apply the outputs in separate workflow steps for better error handling, but everything could be done in one action with a few pivots. Thanks— js below: