RCP-001-001-002-EMAIL-SUBJECT-v1.00a

CRAFT RECIPE START

RECIPE_ID: RCP-001-001-002-EMAIL-SUBJECT-v1.00a

TITLE: Email Subject Line Generator

DESCRIPTION: Generate compelling email subject lines optimized for open rates and engagement. This recipe creates attention-grabbing subject lines tailored to your specific context, audience, and goals.

DIFFICULTY: easy

CATEGORY: CAT-Content

SUBCATEGORY: SUBCAT-Email

PROMPT TEMPLATE:

Generate {count} compelling email subject lines for the following:

Topic: {topic}

Context: {context}

Target Audience: {audience}

Tone: {tone}

Email Purpose: {purpose}

Requirements:

- Maximum length: {max_length} characters

- Include action words that create urgency when appropriate

- Avoid spam trigger words

- Make each subject line unique and engaging

{emoji_instruction}

{personalization_instruction}

Format the output as a numbered list with each subject line on its own line.

PARAMETERS:

- count: integer, default=5, required=False, "Number of subject lines to generate (1-20)"

- topic: string, required=True, "Main topic or content of the email"

- context: string, default="business email", required=False, "Context or industry (e.g., e-commerce, B2B, newsletter)"

- audience: string, default="general audience", required=False, "Target audience description"

- tone: string, default="professional", required=False, "Desired tone (professional, casual, urgent, friendly, formal)"

- purpose: string, default="inform", required=False, "Email purpose (inform, sell, engage, announce, invite)"

- max_length: integer, default=60, required=False, "Maximum characters per subject line (30-100)"

- include_emoji: boolean, default=False, required=False, "Whether to include emojis in subject lines"

- personalization_tokens: boolean, default=False, required=False, "Include merge tags like {{FirstName}} or {{Company}}"

PARAMETER VALIDATION:

- count: Must be between 1 and 20

- max_length: Must be between 30 and 100

- topic: Must not be empty

- tone: Must be one of [professional, casual, urgent, friendly, formal]

- purpose: Must be one of [inform, sell, engage, announce, invite]

EXAMPLES:

1. Basic usage:

result = quick_recipe(

"https://www.aicookbook.ai/recipes-via-craft-api/rcp-001-001-002-email-subject",

topic="AI automation tools",

count=5

)

2. E-commerce promotion:

result = quick_recipe(

recipe_url,

topic="Summer sale on outdoor furniture",

context="e-commerce",

audience="homeowners aged 30-55",

tone="urgent",

purpose="sell",

count=10,

include_emoji=True

)

3. Newsletter with personalization:

result = quick_recipe(

recipe_url,

topic="Monthly tech trends update",

context="B2B newsletter",

audience="IT managers and CTOs",

tone="professional",

purpose="engage",

personalization_tokens=True,

max_length=50

)

4. Event invitation:

result = quick_recipe(

recipe_url,

topic="Annual customer appreciation dinner",

context="corporate events",

tone="friendly",

purpose="invite",

count=8

)

ADVANCED USAGE:

This recipe can be combined with A/B testing workflows:

# Generate variants for testing

variants_a = quick_recipe(recipe_url, topic="New feature launch", tone="professional", count=5)

variants_b = quick_recipe(recipe_url, topic="New feature launch", tone="casual", count=5)

# Use with CRAFT AB_Test object

test = AB_Test("Subject Line Test", "Casual vs Professional tone", "Higher open rate")

test.add_variant("professional", variants_a)

test.add_variant("casual", variants_b)

INTEGRATION NOTES:

- Compatible with CRAFT v0.0625b1 and later

- Can be used with email workflow objects and campaign builders

- Supports integration with A/B testing frameworks

- Results can be passed to email automation platforms

- Subject lines are optimized for common email clients

HELPER FUNCTIONS:

The recipe includes internal logic for:

- emoji_instruction: Adds "Include relevant emojis at the beginning or end of subject lines" when include_emoji=True

- personalization_instruction: Adds "Include personalization tokens like {{FirstName}}, {{Company}}, or {{LastPurchase}} where appropriate" when personalization_tokens=True

BEST PRACTICES:

1. Test generated subject lines with spam checkers

2. A/B test different tones and styles for your audience

3. Keep subject lines under 50 characters for mobile optimization

4. Use the personalization_tokens parameter for email platforms that support merge tags

5. Generate more options than needed and select the best ones

CRAFT RECIPE END

Previous
Previous

RCP-001-002-001-PROMPT-REFINER-v1.00a

Next
Next

CRAFT Recipe Creation Guidelines