Skip to content

Content-type: email-template (for automation emails) #53

@derrickmehaffy

Description

@derrickmehaffy

Tracking issue for the email-template content-type that n8n automations (#12, #13, #14, #15, #33) will read from. Not blocking sign-off — posting so we have a single URL to reference.

Why a content-type

  • Non-engineers can edit email copy without touching n8n workflows.
  • Strapi is the source of truth for editable content; n8n stays focused on orchestration.
  • Style wrapper (header/footer/branding — Automation: Email template #33 concern) lives once in an n8n sub-workflow, not per-template.

Proposed shape

Collection type email-template:

Field Type Notes
key UID, required, unique Stable slug n8n looks up: plugin-submission-received, plugin-approved, plugin-declined, plugin-changes-requested
subject string, required Supports {{ variable }} placeholders
body richtext (blocks) or markdown Supports {{ variable }} placeholders
description text, admin-only Docs: when this template fires, which variables are available
from_name string, optional Per-template override
reply_to email, optional Per-template override

Seed entries (one per automation email)

  1. plugin-submission-receivedAutomation: Email to developer: Plugin submission received #12
  2. plugin-changes-requestedAutomation: Email to developer: Changes requested for your plugin #13 — needs {{ reviewer_feedback }}
  3. plugin-approvedAutomation: Email to developer: Plugin approved #14
  4. plugin-declinedAutomation: Email to developer: Plugin declined #15 — needs {{ decline_reason }}

n8n consumption pattern

Strapi lifecycle webhook
  → HTTP GET /api/email-templates?filters[key][$eq]=<slug>
  → Render subject + body with payload variables
  → Shared 'render-email' sub-workflow wraps in branded shell (#33)
  → Send via SMTP/provider

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions