Aller au contenu
Skillpedia
Rédaction et vente41k · #6981

designing-email-templates

Ce qu’il fait

Cette compétence permet à un agent de concevoir des modèles d'e-mails dans la bibliothèque de workflows de PostHog. Elle s'adresse aux responsables marketing et aux équipes produit qui veulent des e-mails soignés affichant des informations personnelles sur chaque destinataire.

Quand l’utiliser

  • ✓Quand vous voulez un nouveau modèle d'e-mail pour une campagne ou un workflow.
  • ✓Quand vous voulez modifier ou réparer un modèle d'e-mail existant dans PostHog.
  • ✓Quand vous voulez que des informations personnelles, comme le prénom, apparaissent dans l'e-mail.

Lien du skill

https://github.com/PostHog/posthog/blob/master/products/workflows/skills/designing-email-templates/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/PostHog/posthog/blob/master/products/workflows/skills/designing-email-templates/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Conçois un modèle d'e-mail de bienvenue pour les nouveaux utilisateurs, avec mon logo en haut et leur prénom dans la salutation.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent écrit la conception du modèle dans un format structuré que PostHog transforme en e-mail modifiable. Il utilise des balises Liquid pour les informations personnelles et partage un lien pour ouvrir le modèle dans PostHog.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Designing email templates

Use this skill when creating or editing email templates for PostHog workflows — broadcast campaigns and function_email workflow actions send the rendered template.

How authoring works

You author the design JSON (content.email.design) and save it with workflows-create-email-template. The server renders the sent email from your design with the same renderer PostHog's visual editor uses, so the template opens as editable blocks for humans and sends exactly what the design describes. Schema, the native blocks and spacing rules every email follows, and a working example in references/unlayer-design-json.md.

When talking to the user, call it the template's design — the design document format is an internal implementation detail. Always share the template's _posthogUrl edit link in your reply after creating or updating, so the user can open it in PostHog directly.

Read references/design-guidelines.md before composing — it covers committing to a design direction, typography, color, and the patterns that make an email look designed rather than generated. For one fragment the block editor can't express, use an html-type content block inside the design.

Personalization with Liquid

Email content uses Liquid templating. Liquid tags pass through the renderer as plain text, so use them anywhere — block text, subject, links:

Hi {{ person.properties.first_name | default: 'there' }},

Marketing emails must include an unsubscribe link — render it with the built-in variables:

<a href="{{ unsubscribe_url }}">Unsubscribe</a>

({{ unsubscribe_url_one_click }} is also available for one-click list-unsubscribe flows.) A template written for Customer.io can keep its {% unsubscribe_url %} tag, which renders the same link as {{ unsubscribe_url }}.

Output is HTML-escaped by default, so a value renders as text even when it contains markup:

  • Don't add | escape. It escapes a second time, and & reaches the inbox as &amp;amp;.
  • For HTML your own backend builds, such as a summary list, add | raw: {{ variables.summary_html | raw }}. Never use raw on text a person typed.
  • Format money with currency: {{ variables.amount | currency: "USD" }} renders $1,234.50. A value that isn't a number renders unchanged.

Click tracking and opt-out

Every link is automatically rewritten through a click-tracking redirect. This breaks mobile universal links / app deeplinks, which only resolve when the href stays on their own domain. To keep a link untracked, mark its anchor (use an html block) with clicktracking="off" or data-ph-no-track:

<a href="https://app.example.com/deeplink" data-ph-no-track>Open in app</a>

The marker must be on the <a> tag itself, not a child element. Opted-out links get no click metrics.

Images

Call media-images-list with purpose="email" first — reuse an existing image (a logo, a header banner) instead of uploading a duplicate.

To add a new image, upload it with the presigned flow rather than embedding bytes in the design:

  1. media-image-upload-start with the file's name and purpose="email" — returns id, upload_url, and form_fields.
  2. From a shell, POST the local file to upload_url: curl -X POST <upload_url> -F key=value... -F file=@/path/to/image.png (the form_fields from the response, file last). Never base64-encode image bytes into a tool call — a flipped token corrupts the image.
  3. media-image-upload-complete with the id — returns the permanent url.

Put that url in the image block's values.src.url (see references/unlayer-design-json.md). The block also takes values.src.width/height; the media tools don't return dimensions, so if you have shell access to the local file, measure it yourself rather than guessing.

Images must be under 4MB and decode as PNG, JPEG, GIF, WebP, AVIF or BMP.

Creating a template

Call workflows-create-email-template with:

{
  "name": "Welcome email",
  "description": "Sent to new signups on day 0",
  "type": "email",
  "content": {
    "templating": "liquid",
    "email": {
      "subject": "Welcome to {{ person.properties.company | default: 'our product' }}",
      "design": {
        "counters": { "u_row": 1 },
        "schemaVersion": 16,
        "body": { "rows": ["…"], "values": { "preheaderText": "Three short
Questions fréquentes

Puis-je modifier le modèle après sa création par l'agent ?

Oui. Le modèle s'ouvre sous forme de blocs modifiables dans PostHog, que chacun peut changer là-bas.

Que sont les balises Liquid ?

Ce sont des marqueurs, comme le prénom, remplacés par les informations de chaque destinataire lors de l'envoi.

L'agent choisit-il un style de conception ?

Oui. Ses consignes lui demandent de choisir une direction graphique claire avant d'écrire la mise en page, pour que l'e-mail paraisse réfléchi.

Détails

Description originale de l’auteur

Author, save, and edit email templates in the PostHog workflows library — compose email design JSON with Liquid personalization and create and round-trip-edit templates over MCP. Use when asked to design, build, update, or fix an email template for workflows, broadcasts, or campaigns.

repo: PostHog/posthog

Popularité

Étoiles GitHub
41k
Position au classement
#6981
Licence
—
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires