Skip to content

Map: Workflows AI drafts emails as editor blocks with readable spacing #268

Open
2 of 3 issues completed

Description

@Silthus

Destination

In the AI-first new-workflow flow (/workflows/new?mode=ai, flag workflows-ai-first-new), the prompt "Send a welcome email sequence to new signups over their first week" drafts emails that, without a follow-up prompt:

  • open in the visual email editor as separate native blocks (at least a heading or text block, and a button), with the button URL editable in the button's own properties;
  • show clear paragraph spacing in the editor and in a rendered test email;
  • change through block operations when PostHog AI is later asked to change the button link.

Reached as one draft PR on PostHog/posthog, with before and after screenshots, that qa-swarm handed off as ready for review.

Notes

  • Parked (2026-11-14). Off the focus of the Workflows sprint of 16 to 27 Nov (Sprint - November 16 to November 27 PostHog/posthog#133091). Dispatch no new ticket; running lanes finish and settle. Tripwire: the sprint's focus items done, or 2026-11-25.
    Origin. T3 thread 3179278e-4f79-45a8-833a-ba3a9a534ec0 on devbox-michaelr-2 split the feedback on the AI-first flow into three threads. This map owns the email content format only. Sibling threads own the model choice (devbox-michaelr-1) and the links, next step, and audience count (devbox-michaelr-2). Stay out of their scope.

Execution. Execution stays inside this map. Conductor: /orchestration-wayfinder in T3 thread "Workflows AI: emails as editor blocks with real spacing" on devbox-michaelr-3. Branches push to the Silthus fork and start from upstream/master. Draft PRs open on PostHog/posthog against master. Shipped means a draft PR that qa-swarm handed off as ready for review. No merge authority. Every PR is linked to the T3 thread that opened it.

Route (Michael, during charting). Prompt-only. The draft-first instruction (DRAFT_FIRST_CONTEXT_ITEM in products/workflows/frontend/Workflows/workflowAgentContext.ts) and the designing-email-templates skill make the agent create each placeholder email as a small native-block design. The agent then fills content with workflows-patch-action-email block operations, which already render the html on the server. No backend change. YAGNI: the smallest change that fixes the experience.

Spacing. The spacing has to be part of the design, not inline CSS added afterwards. The pattern comes from research, not from guessing.

Verification. The live run uses a local stack with UNLAYER_API_KEY set. Without it, the server cannot render a design to html and workflows-patch-action-email refuses design edits.

Neighbours. Map #253 "Workflows first run": its #261 reads the designing-email-templates skill. Tell that map before changing the skill. PostHog#111479 (branded email starter), PostHog#111060 (Email brand detection), and PostHog#111731 (email previews in the editor) build email designs and previews. Build on them and do not change them.

Casting. Implementation, research, and reviews run on GPT-6.1 Sol. Communication runs on Claude Opus 5.5. No provider bridges: use runtime-native workers.

Skills. /research for research tickets. /implement + /tdd, then /qa-swarm, for implementation.

Public repo. This fork is public. Issues, comments, branches, and PRs never carry usage or revenue numbers, customer names, internal metrics, or secrets.

Decisions so far

Not yet specified

  • An eval for email format (native blocks, spacing). No workflow eval exists, and the sibling thread on devbox-michaelr-1 is building one for email prose. Revisit after the implementation PR.

Out of scope

  • Server-side html rendering for designs written through workflows-create or workflows-patch-graph. Not needed for the prompt-only route.
  • Model choice, links, next step, and audience count. Sibling threads own these.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions