🖼️

Invitation Maker

Bulk generate personalized event invitations by inserting names from a guest list onto an image template.

Image ⭐⭐ Intermediate ⏱️ 5 minutes
📥 Download Tool

😫 The Pain Point

Year End Party is coming. You need to send digital invites to 200 staff. “Dear [Mr. John], You are invited…”. A blank template is easy, but making 200 personalized JPEGs with different fonts and handling long names?

🚀 Agentic Solution

“Mail Merge” for Images: Fill in the blank spots on an image programmatically with smart text handling.

Key Features:

  • Custom Fonts: Supports .ttf calligraphy fonts with automatic fallback.
  • Auto-fit Text: Automatically reduces font size for long names.
  • Unicode Support: Handles Vietnamese, Chinese, and special characters.

⚔️ Phase 1: Commander (Quick Fix)

For a quick batch.

Prompt:

“I have guests.csv (with ‘Name’ column) and template.jpg. Write a Python script using Pillow to:

  1. Font Handling:
    • Try loading custom_font.ttf from the same folder.
    • Fallback to system Arial or DejaVuSans if not found.
    • Use font size 60px.
  2. Text Rendering:
    • Draw each name at position (500, 300) in Red (#FF0000).
    • Auto-fit: If name is longer than 20 characters, reduce font size to fit within 400px width.
    • Support Unicode characters (Vietnamese, Chinese, etc.).
  3. Output: Save as output/Invite_{Name}.jpg (sanitize filename for special characters).

Print progress log (e.g., ‘Generated 1/200: Nguyen Van A’).”

Result: 200 custom invites with proper text handling.

🏗️ Phase 2: Architect (Permanent Tool)

For HR/Event Planners.

Engineering Prompt:

**Role:** Full Stack Developer (Python + HTML)
**Task:** Create a "Bulk Invitation Generator" with Visual Config.

**Requirements:**
1.  **Part 1: Visual Setup (HTML/JS)**
    *   File: `setup_coordinate.html` (single file, no build)
    *   Features:
        *   Upload template image preview.
        *   Drag & Drop "Sample Text" to set X, Y coordinates.
        *   Inputs: Font Size, Text Color (#Hex), Font Family preview.
        *   Export: Download `config.json` with all settings.

2.  **Part 2: Generator Engine (Python)**
    *   File: `generate_invitations.py`
    *   Inputs: config.json, guests.csv, template.jpg
    *   Logic:
        *   Load config and iterate CSV.
        *   Draw text with font fallback (custom.ttf > Arial > DejaVuSans).
        *   **Progress bar** (tqdm or print log).
        *   Save to output/ folder.
        *   Handle errors gracefully (skip bad rows with warning).

3.  **Deliverables:**
    *   `setup_coordinate.html`
    *   `generate_invitations.py`
    *   `requirements.txt` (Pillow, pandas)
    *   `run.bat` and `run.sh`

🧠 Prompt Decoding

  • Visual Config: Coordinates (X=400, Y=300) are abstract. The “Click on image” requirement bridges the gap between code and design, making the tool usable for non-coders.
  • Font Fallback: Essential for cross-platform compatibility. Not all systems have the same fonts installed.

🛠️ Instructions

  1. Copy Prompt → Paste to AI → Run generated script.
  2. Click text position → Load guest list → Generate all.

Related Workflows

Explore other categories

Ready to use this workflow?

📥 Download Tool
📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.