{"id":"code-work-mkt-lead-email-domain","audience":"marketing","category":"coding","track":"coding","technique":"context","title":"Pull company domains from lead emails, flag personal ones","free":false,"task":"Write one Google Sheets formula for C2 (filled down) that pulls the domain from the email in B2, lowercased (Ana@Birch-Cole.example gives birch-cole.example). If the domain is on your personal-email list in Lists!$A$2:$A$20, show Personal instead, and leave C2 blank when B2 is empty. One formula in one code block, then under 25 words outside the code.","materialLabel":"Webinar leads preview (attached to your prompt automatically)","material":"WEBINAR LEADS - \"Spring Ops Playbook\" registrations (row 1 is headers)\nA Name | B Email | C Company domain | D Job title\nAna Ortiz | Ana@Birch-Cole.example | ? | Ops Manager\nRaj Mehta | raj.mehta@mailbox.example | ? | Founder\nMei Wu | mei@lakeviewdental.example | ? | Office Lead\nLou Grant | | ? | (walk-in, no email)\nPat O'Neil | pat.oneil@post.example | ? | Buyer\nJae Kim | JKIM@RIDGEAUTO.EXAMPLE | ? | Fleet Manager\n\nLists tab, column A (personal email domains we keep):\nmailbox.example, post.example, inbox.example, homemail.example\n\nNotes:\n- Sales only wants company leads for account-based ads.\n- Personal-email leads go to the newsletter instead.\n- 640 registrations so far.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":25}],"mistakes":[{"title":"Not saying lowercase","why":"The AI keeps capitals, so RIDGEAUTO.EXAMPLE and ridgeauto.example look like two companies.","fix":"Add: \"Lowercase the domain.\"","checks":["r0"]},{"title":"Not pointing at your list","why":"The AI types its own guesses of personal providers into the formula.","fix":"Add: \"If the domain is in Lists!$A$2:$A$20, show Personal.\"","checks":["r1"]},{"title":"Forgetting walk-ins","why":"An empty email gives an error in the domain column.","fix":"Add: \"If B2 is empty, leave C2 blank.\"","checks":["r2"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself.","fix":"Add: \"Give one formula only, in one code block, no alternatives.\"","checks":["codeBlocks"]},{"title":"Getting a tutorial","why":"By default the AI explains every part of the code at length, which you then have to scroll past.","fix":"Add: \"After the code, one line under 10 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Asks for lowercase","patterns":["lower"]},{"label":"Points at the personal list","patterns":["lists!","a2:a20","personal"]},{"label":"Handles empty emails","patterns":["blank","empty"]},{"label":"Asks for one answer only","patterns":["\\b(one|single|1)\\s+(formula|code block|block|version)","only one","no (alternatives|options|other versions)"]},{"label":"Limits the explanation","patterns":["\\d+\\s*words","no (explanation|notes|commentary)","one (short )?(line|sentence)","nothing else"]}],"hint":"You already keep a list of personal domains. Tell the AI where it is, plus how the domain should look and what to do with missing emails.","rubricLabels":["Takes the part after the @ in B2 and lowercases it (for example LOWER(REGEXEXTRACT(B2,\"@(.+)$\")) or MID with FIND)","Shows Personal when the domain appears in Lists!$A$2:$A$20 (such as COUNTIF or MATCH on that locked range), not a list typed into the formula","Returns a blank (\"\") when B2 is empty"]}