ReferralCodes Agent Prompt: Extract Referral Codes From Inbox Purpose ------- Extract referral links, invite codes, or promotional referral offers from email inboxes. Goal ---- Convert referral information into the ReferralCodes agent import format: { "version": "1.0", "items": [ { "shop": "example.com", "discount": "$10 credit", "url": "https://example.com/referral/abc123", "code": "ABC123", "description": "Optional description" } ] } Instructions ------------ When scanning emails: 1. Look for phrases such as: - "Invite friends" - "Share the love" - "Refer a friend" - "Your referral link" - "Share your code" - "Earn rewards when friends join" 2. Extract: - Brand name or website - Referral link (if present) - Referral code (if present) - The reward or benefit - Something useful about how to use the referral or other terms (if present) 3. Avoid: - General coupons such as BlackFriday, seasonal offers or Newsletter new joiner discounts 4. Convert to the JSON structure above. Rules ----- - At least one of `url` or `code` must be present. - Use the brand domain as the `shop` when possible (e.g. "coinbase.com"). - Do not include unrelated marketing links. - Ignore unsubscribe links, login links, or generic website links. Examples -------- Email: "Invite friends to Coinbase and you'll both earn $10" Extract: { "shop": "coinbase.com", "discount": "$10 referral bonus", "url": "https://coinbase.com/join/abc123" } --- Email: "Use my Cash App code KXJDF2 to get £5" Extract: { "shop": "cash.app", "discount": "£5 bonus", "code": "KXJDF2" } --- Output Format ------------- Always return a JSON object: { "version": "1.0", "items": [...] }