🔬 Generate & deliver certificates with VerifiEmail & HTMLcsstoImg to Gmail

⚡ 209 views · 🔬 Document Extraction & Analysis

Description

Automated Certificate Generator with Email Validation & Delivery

Automatically generate, validate, and deliver professional course completion certificates with zero manual work — from webhook request to PDF delivery in seconds.


Overview

This workflow transforms certificate generation from a manual design task into a fully automated system. It receives certificate requests via webhook, validates recipient emails using advanced verification, generates beautifully designed HTML certificates, converts them to high-quality PNG images, delivers via professional email templates, and maintains complete audit trails in Google Sheets.

Powered by email validation APIs and HTML-to-image conversion, it ensures every certificate meets professional standards while preventing delivery to invalid or fraudulent email addresses.


What This Workflow Does


Key Features


Use Cases

Educational Institutions

Corporate Training

Online Course Platforms

Event Management

Certification Programs


Prerequisites

Required Services & Accounts

Required Credentials

  1. VerifiEmail API Key
  2. HTMLcsstoImg User ID + API Key
  3. Gmail OAuth2 credentials
  4. Google Sheets OAuth2 credentials

Setup Instructions

1. Import the Workflow

  1. Download the certificate-generator.json file
  2. In n8n, navigate to Workflows → Import from File
  3. Select the JSON file and click Import

2. Configure Credentials

VerifiEmail API

  1. Sign up at https://verifi.email
  2. Navigate to Dashboard → API Keys
  3. Copy your API key
  4. In n8n: Settings → Credentials → Add Credential
  5. Search for “VerifiEmail”
  6. Name: VerifiEmail API
  7. Paste API key and save
  8. Assign to “Verifi Email” node in workflow

HTMLcsstoImg API

  1. Sign up at https://htmlcsstoimg.com
  2. Go to Dashboard → API
  3. Copy User ID and API Key
  4. In n8n: Credentials → Add Credential → “HTMLcsstoImg”
  5. Name: HTMLcsstoImg API
  6. Enter User ID and API Key
  7. Assign to “HTML/CSS to Image” node

Gmail OAuth2

  1. In n8n: Credentials → Add Credential → “Gmail OAuth2”
  2. Click Connect my account
  3. Follow Google OAuth flow
  4. Grant permissions: Send email
  5. Name: Gmail OAuth2
  6. Assign to “Send Certificate Email” node

Google Sheets OAuth2

  1. Create new Google Sheet: “Certificates Log”
  2. Add column headers in Row 1:
    • Certificate ID
    • Recipient Name
    • Course
    • Email
    • Completion Date
    • Generated At
    • Certificate URL
    • Status
    • Instructor
    • Duration
  3. In n8n: Credentials → Gmail OAuth2 (same as above works for Sheets)
  4. Assign to “Log to Google Sheets” node
  5. Select your “Certificates Log” spreadsheet
  6. Select “Sheet1”

3. Activate Workflow

  1. Click the toggle switch in top-right to activate
  2. Copy the Webhook URL from “Certificate Request Webhook” node
  3. Format: https://your-n8n-instance.com/webhook/certificate-generator

4. Configure Your Application

For LMS Integration:

// When course is completed
fetch('https://your-n8n-instance.com/webhook/certificate-generator', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: student.fullName,
    course: course.title,
    date: new Date().toISOString().split('T')[0],
    email: student.email,
    instructor: course.instructor,
    duration: course.duration
  })
});

For Zapier/Make.com:

  1. Trigger: Course completed
  2. Action: Webhooks → POST
  3. URL: Your webhook URL
  4. Body: Map fields to JSON format

5. Test the Workflow

Send test request:

curl -X POST https://your-n8n-instance.com/webhook/certificate-generator \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Test User",
    "course": "Test Course",
    "date": "2025-10-04",
    "email": "test@gmail.com"
  }'

Verify:


How It Works

  1. Webhook Trigger → Receives POST request with certificate data
  2. Email Validation → VerifiEmail checks RFC, MX records, disposable status
  3. Field Validation → Ensures name, course, date present and email valid
  4. Data Combination → Merges webhook data with validation results
  5. HTML Generation → Creates styled certificate with dynamic content
  6. Image Conversion → HTMLcsstoImg renders 1200x850px PNG
  7. Email Delivery → Gmail sends professional template with download link
  8. Database Logging → Google Sheets records all certificate details
  9. Error Handling → Catches failures and stops invalid requests

Processing Time: 5-10 seconds per certificate


API Reference

Endpoint

POST /webhook/certificate-generator
Content-Type: application/json

Required Fields

{
  "name": "string",      // Full name of recipient
  "course": "string",    // Course or program name
  "date": "YYYY-MM-DD",  // Completion date
  "email": "string"      // Recipient email address
}

Optional Fields

{
  "instructor": "string",     // Instructor name (default: "Program Director")
  "duration": "string",       // Course duration (e.g., "40 hours")
  "certificateId": "string"   // Custom ID (auto-generated if not provided)
}

Success Response

{
  "success": true,
  "message": "Certificate generated and sent successfully",
  "certificateId": "CERT-1728000000-ABC123",
  "certificateUrl": "https://hcti.io/v1/image/xyz123"
}

Error Response

{
  "success": false,
  "error": "Missing required fields: name, course, date, or valid email"
}

Customization

Certificate Design

Edit the “Generate HTML Certificate” Code node:

Change Brand Colors:

// Background gradient
background: linear-gradient(135deg, #YOUR_COLOR_1 0%, #YOUR_COLOR_2 100%);

// Border color
border: 3px solid #YOUR_BRAND_COLOR;

Add Company Logo:

<div>
    <img src="https://your-domain.com/logo.png">
</div>

Modify Fonts:

@import url('https://fonts.googleapis.com/css2?family=Your+Font&display=swap');
font-family: 'Your Font', sans-serif;

Email Template

Edit the “Send Certificate Email” node message:

Update Company Info:

<p>© 2025 Your Company Name</p>
<p>Contact: support@yourcompany.com</p>

Change Header Color:

.header { 
    background: linear-gradient(135deg, #YOUR_COLOR_1, #YOUR_COLOR_2);
}

Certificate ID Format

In “Generate HTML Certificate” node:

// Custom format: COURSE-YEAR-NUMBER
const certId = `${data.course.substring(0,3).toUpperCase()}-${new Date().getFullYear()}-${Math.floor(Math.random() * 10000)}`;

Data Flow

Webhook → Email Validation → Field Validation → Combine Data
    ↓
Generate HTML → Convert to PNG → Send Email
    ↓
Log to Sheets → Success Response
    ↓
Error Handling (if failed)

Expected Output

PNG Certificate Includes:

Google Sheets Entry:

Email Notification:


Performance


Troubleshooting

Webhook not receiving data

Email validation fails

Certificate not generating

Image conversion fails

Email not delivered

Google Sheets not updating


Best Practices

  1. Test with small batches before production rollout
  2. Monitor API quotas to avoid unexpected failures
  3. Use real email addresses during testing (avoid disposable)
  4. Archive old certificates periodically from Google Sheets
  5. Set up Slack notifications for error monitoring
  6. Validate webhook payload before sending
  7. Document customizations for team reference
  8. Back up Google Sheets regularly
  9. Review email deliverability weekly
  10. Keep credentials secure and rotate periodically

Security Notes


Future Enhancements


Support Resources


License

This workflow template is provided as-is for free use and modification under the MIT License. Attribution appreciated but not required.

Version: 1.0.0
Last Updated: October 2025
Compatibility: n8n v1.0.0+

đź”— Nodes Used

Google Sheets, Slack, Webhook, Gmail, Stop and Error

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup