Documentation Index
Fetch the complete documentation index at: https://mintlify.com/twentyhq/twenty/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Twenty’s AI email generation helps you write emails faster by generating professional drafts based on context and your instructions. Whether you’re reaching out to a new lead, following up on a meeting, or sending a proposal, AI can help you craft the perfect message.How It Works
The AI email generator:- Analyzes context - Reviews the contact, company, and related records
- Understands your goal - Takes your prompt or instructions
- Generates a draft - Creates a professional email matching your intent
- Allows customization - Lets you refine tone, length, and content
Using AI Email Generation
From a Contact or Company Record
Enter Your Prompt
Describe what you want to say. Examples:
- “Write a cold outreach email introducing our product”
- “Follow up on last week’s meeting about the Q1 proposal”
- “Ask if they’re available for a call next Tuesday”
Generate and Review
Click Generate. The AI will create a draft based on your prompt and the record’s context.
From Workflows
Automate email generation in workflows:- Create a workflow with an email action
- Enable AI Email Generation
- Provide a prompt template with variables
- The workflow generates and sends emails automatically
Prompt Examples
Cold Outreach
Prompt:Follow-Up
Prompt:Meeting Request
Prompt:Thank You
Prompt:Customizing Tone and Style
Tone Instructions
Adjust the email tone with prompt modifiers:- Formal: “Write a formal email…”
- Friendly: “Write a casual, friendly email…”
- Professional: “Write a professional but warm email…”
- Brief: “Write a short, direct email…”
- Detailed: “Write a comprehensive email…”
Length Control
Specify desired length:- “Keep it under 100 words”
- “Write 2-3 short paragraphs”
- “Make it brief—just a few sentences”
- “Provide detailed information”
Style Preferences
Add style instructions:- “Use bullet points for key features”
- “Include a clear call-to-action”
- “Add a subject line suggestion”
- “Don’t use sales-y language”
- “Make it conversational”
Advanced Features
Context Variables
The AI has access to:- Contact name, title, company
- Recent activities and notes
- Previous email threads
- Custom field data
- Related records
Multi-Step Generation
Refine drafts iteratively:- Generate initial draft
- Click Regenerate with modifications:
- “Make it more formal”
- “Shorten the second paragraph”
- “Add more details about pricing”
- Continue until satisfied
Email Templates with AI
Combine templates with AI:- Create a template structure
- Use AI to fill in dynamic content
- Variables are replaced with context
Best Practices
1. Provide Context
Better prompts = better emails: Vague:2. Review and Edit
Always review AI-generated content:- Check for accuracy
- Verify contact information
- Ensure tone is appropriate
- Add personal touches
- Fix any errors
3. Personalize
Add human elements:- Reference specific conversations
- Include personal anecdotes
- Use the recipient’s own words
- Add a personal sign-off
4. Test Different Prompts
Experiment with variations:- Try different tones
- Adjust length
- Test various structures
- Learn what works best
5. Use in Workflows
Automate repetitive emails:- Welcome sequences
- Follow-up cadences
- Meeting confirmations
- Status updates
Limitations
What AI Email Generation Cannot Do
- Send emails automatically - You must review and send
- Access external data - Only uses data in Twenty
- Make business decisions - You choose the message
- Replace personal touch - Always review and customize
When Not to Use AI
- Highly sensitive communications
- Legal or compliance matters
- Personal condolences or celebrations
- Complex negotiations
- When authenticity is critical
Configuration
For Cloud Users
AI email generation is enabled by default. Configure preferences in: Settings > AI > Email Generation- Default tone
- Default length
- Auto-generation triggers
For Self-Hosted Users
Enable email generation:Troubleshooting
Email Not Generating
If generation fails:- Check AI features are enabled
- Verify sufficient AI credits/quota
- Ensure prompt is clear and specific
- Check internet connectivity
- Review error message for details
Poor Quality Results
If generated emails are low quality:- Provide more context in your prompt
- Be more specific about tone and style
- Include relevant variables
- Try regenerating with modifications
- Use a more advanced model (GPT-4 vs GPT-3.5)
Incorrect Information
If emails contain wrong details:- Verify record data is accurate
- Check variable names in prompt
- Update contact/company information
- Be explicit about what to include
Privacy and Security
- Data handling - Email content is sent to AI provider for generation
- No storage - Prompts and drafts are not saved by AI provider
- Encryption - All data is encrypted in transit
- Compliance - Meets GDPR and SOC 2 requirements
Implementation Details
Email generation uses:- AI agent execution service:
ai-agent-execution/services/agent-async-executor.service.ts - Smart models (GPT-4 or Claude) for quality
- Context from Twenty’s GraphQL API
- Token-based usage billing
Need Help?
Get help with AI email generation on Discord.
