AI Skill Report Card
Generating Proposal Emails
Quick Start
Pythonfrom docxtpl import DocxTemplate # For ARCED template doc = DocxTemplate("../../proposal_template.docx") context = { "Date": "15 December 2024", "RECIPIENT_ORGANIZATION": "Ministry of Health", "REFERENCE_LINE": "Reference: MOH/2024/001", "PROJECT_TITLE": "Healthcare Infrastructure Assessment" } doc.render(context) doc.save("../../proposal_final.docx")
Workflow
Step 1: Check Email Preference Ask: "Do you have a pre-written email template you'd like to use? (yes/no)"
Step 2A: If User Has Custom Email Collect the following information:
- Date (format: dd month year)
- Recipient Organization
- Reference Line
- Opening Paragraph
- Body Paragraph
- Closing Paragraph
- Project Title
Step 2B: If Using ARCED Template Collect only:
- Date (format: dd month year)
- Recipient Organization
- Reference Line
- Project Title
Step 3: Generate email_skill.py
Progress:
- Determine email type (custom vs ARCED)
- Collect required fields
- Generate Python code
- Save to email_skill.py
Examples
Example 1: ARCED Template Input:
- Date: "20 January 2025"
- Recipient: "World Health Organization"
- Reference: "WHO/BD/2025/003"
- Project: "Malaria Prevention Study"
Output:
Pythonfrom docxtpl import DocxTemplate doc = DocxTemplate("../../proposal_template.docx") context = { "Date": "20 January 2025", "RECIPIENT_ORGANIZATION": "World Health Organization", "REFERENCE_LINE": "WHO/BD/2025/003", "OPENING_PARAGRAPH": "We, Aureolin Research, Consultancy and Expertise Development (ARCED) Foundation, would like to take the privilege and pleasure of placing our proposal (Technical part) herewith for", "BODY_PARAGRAPH": "The document that follows presents our credentials, team composition, implementation strategies, offerings, and related information for the assignment. We welcome the opportunity to discuss the contents for further clarification. Should you have any queries, please do not hesitate to contact us through email, phone, or any other contact means provided below.", "CLOSING_PARAGRAPH": "Thank you for reviewing the proposal. It would be an absolute pleasure to hear back from you.", "PROJECT_TITLE": "Malaria Prevention Study" } doc.render(context) doc.save("../../proposal_final.docx")
Example 2: Custom Email Input:
- Date: "5 March 2025"
- Recipient: "Tech Solutions Inc"
- Reference: "TSI/2025/TECH"
- Opening: "We are pleased to submit our technical proposal for your consideration."
- Body: "Our team has extensive experience in similar projects and we believe our approach aligns perfectly with your requirements."
- Closing: "We look forward to the opportunity to discuss this proposal further."
- Project: "Digital Transformation Initiative"
Output:
Pythonfrom docxtpl import DocxTemplate doc = DocxTemplate("../../proposal_template.docx") context = { "Date": "5 March 2025", "RECIPIENT_ORGANIZATION": "Tech Solutions Inc", "REFERENCE_LINE": "TSI/2025/TECH", "OPENING_PARAGRAPH": "We are pleased to submit our technical proposal for your consideration.", "BODY_PARAGRAPH": "Our team has extensive experience in similar projects and we believe our approach aligns perfectly with your requirements.", "CLOSING_PARAGRAPH": "We look forward to the opportunity to discuss this proposal further.", "PROJECT_TITLE": "Digital Transformation Initiative" } doc.render(context) doc.save("../../proposal_final.docx")
Best Practices
- Always ask about email preference first to determine template type
- Use consistent date formatting (dd month year)
- Keep reference lines concise and meaningful
- For ARCED template, maintain professional ARCED Foundation branding
- Save generated files with descriptive names including date/recipient
- Validate all required fields are collected before generating code
Common Pitfalls
- Don't mix custom content with ARCED template fields
- Don't forget to include PROJECT_TITLE in context dictionary
- Don't use inconsistent date formats
- Don't skip the email preference question - it determines the entire workflow
- Don't hardcode file paths - use relative paths as shown