Skip to content

feat(messaging): add a skill that offers and sets up transactional emails - #125415

Merged
trunk-io[bot] merged 5 commits into
masterfrom
posthog/messaging-transactional-email-skill
Nov 2, 2026
Merged

trunk-io[bot] merged 5 commits into
masterfrom
posthog/messaging-transactional-email-skill

Conversation

@mayteio

@mayteio mayteio commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • When a user tells an agent "our password resets go through Resend" or "we send receipts with Postmark", nothing in PostHog's skills or MCP tools brings up PostHog transactional emails.
  • The only transactional tool, workflows-make-email-template-transactional, fires only when a user already asks for it, and it stops there. Nothing guides the full setup: sender, template, key, code, status.

Changes

  • New skill sending-transactional-emails in products/messaging/skills/. Its description triggers on:

    • transactional email, or password reset, sign-in code, magic link, verification, receipt and invite emails;
    • the providers that send them: Resend, Postmark, SendGrid, Mailgun, Amazon SES, Mandrill, Loops, Brevo, Customer.io transactional, nodemailer or SMTP.

    It fires whether the user sets one up, moves one, debugs one, or only describes their current setup.

  • The skill offers PostHog once, says what changes for the user, states the limits honestly, and drops the topic if the user declines.

  • It checks that the make-transactional tool is available before it promises anything, so projects without the flag or the scope don't get a pitch they can't use.

  • It walks through the setup with existing tools and skills:

    • the verified sender via integrations-list, created in the conversation with integrations-email-create when that tool is available (feat(integrations): add an email sender over MCP #125535), or through building-workflows otherwise;
    • the template via designing-email-templates;
    • the category check, the make-transactional tool, and the project secret API key, which only the user can create;
    • SDK or HTTP code with distinct IDs and idempotency keys;
    • a test send and a status check.
  • references/moving-from-other-providers.md maps each provider's send call to emails.send, and lists what to check before a switch: sender, suppressions, error codes, retries and volume.

  • building-workflows routes a one-off email from code to the new skill.

  • installing-posthog-in-a-codebase mentions transactional emails once after setup, when the manifest has an email sending package.

  • The make-transactional MCP tool now names the steps that are left: the key, emails.send or the send route, and emails.get or the status route.

  • Mechanical: the regenerated MCP tool definition JSON files.

No change to the cdp_functions destination nudge: it is about moving marketing automation to Workflows, and the new skill's trigger covers transactional providers.

How did you test this code?

Test rationale: no new tests. These are prose skills and a tool description, which the skill linter and the build check.

  • hogli lint:skills passes, with no warnings on the changed skills.
  • hogli build:skills builds 171 skills, and the archive contains the new skill and its reference.
  • hogli product:lint messaging passes.
  • hogli build:openapi regenerated the MCP tool definitions. Only the make-transactional tool's description changed.

Not checked: the skill in a live agent session with hogli sync:skill.

Release status

  • This change is behind a feature flag and is not available to users

The make-transactional tool and the transactional email API are behind workflows-transactional-email-api. The skill checks that the tool is available before it offers anything. Merge it around when the flag opens to every project.

Docs update

None. The skill links to the transactional email docs page in PostHog/posthog.com#21564.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: PostHog Desktop (Claude Code), Claude Opus 5.5

  • Skills: /writing-skills, /writing-pr-descriptions.
  • Started from an audit of the MCP tools and skills for transactional email. The audit found one flag-gated tool and no skill that triggers on the topic.
  • Duplicate search: no open PR adds a transactional email skill.
  • Public artifact: no session material is in the diff.

🤖 Generated with Claude Code


Created with PostHog Desktop

…ails

- New sending-transactional-emails skill. It triggers on any mention of transactional email or a provider that sends it, offers PostHog once, and walks through the sender, template, make transactional, API key, SDK code and status checks. A reference maps other providers' send calls to PostHog.
- building-workflows routes one-off emails from code to the new skill.
- installing-posthog-in-a-codebase mentions transactional emails once when the app has an email sending package.
- The make transactional MCP tool names the steps that are left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: e72a2c10-f145-4f7c-8754-a4fcc06a18be
@mayteio mayteio self-assigned this Oct 29, 2026
@trunk-io

trunk-io Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

ℹ️ MCP UI apps size — 35 app(s), 29122.2 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 844.3 KB 211.6 KB
explain-chart 1117.7 KB 211.6 KB
action 767.7 KB 211.6 KB
action-list 835.3 KB 211.6 KB
cohort 766.7 KB 211.6 KB
cohort-list 834.3 KB 211.6 KB
email-template 766.6 KB 211.6 KB
error-details 771.6 KB 211.6 KB
error-issue 768.9 KB 211.6 KB
error-issue-list 836.8 KB 211.6 KB
experiment 832.4 KB 211.6 KB
experiment-list 836.1 KB 211.6 KB
experiment-results 835.0 KB 211.6 KB
feature-flag 834.7 KB 211.6 KB
feature-flag-list 838.4 KB 211.6 KB
feature-flag-testing 770.0 KB 211.6 KB
inline-scan 767.2 KB 211.6 KB
insight-actors 833.8 KB 211.6 KB
llm-costs 831.1 KB 211.6 KB
session-recording 769.0 KB 211.6 KB
survey 768.3 KB 211.6 KB
survey-global-stats 831.1 KB 211.6 KB
survey-list 836.0 KB 211.6 KB
survey-stats 831.1 KB 211.6 KB
trace-span 767.1 KB 211.6 KB
trace-span-list 835.2 KB 211.6 KB
vision-observation-list 834.4 KB 211.6 KB
workflow 767.1 KB 211.6 KB
workflow-list 834.7 KB 211.6 KB
workflow-setup-status 766.7 KB 211.6 KB
query-results 1089.6 KB 211.6 KB
render-ui 1194.2 KB 211.6 KB
visual-review-snapshots 771.6 KB 211.6 KB
workflow-data-suggestions 769.4 KB 211.6 KB
workflow-sending-rules 768.1 KB 211.6 KB
ℹ️ MCP agent API — agent-facing tool changes

What this PR changes for agents, from the tool schema snapshots and tool definitions.

Tools changed (2):

Tool Params Scopes Annotations Schema chars
workflows-make-email-template-transactional-execute description changed
workflows-make-email-template-transactional-prepare description changed

@mayteio
mayteio marked this pull request as ready for review October 29, 2026 12:29
@parameterai

parameterai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Risk: No findings

This change adds prose only: a new sending-transactional-emails skill with a provider-migration reference, small routing edits to two existing skills, and an expanded MCP tool description for workflows-make-email-template-transactional (plus its regenerated JSON). No executable code, endpoints, auth, or data handling changes, and the send/status endpoints the text references are pre-existing and untouched.

Sentinel reviewed 988a582 · Review settings

@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team October 29, 2026 12:30
@pr-assigner-resolver-posthog

Copy link
Copy Markdown

👀 Auto-assigned reviewers

These soft owners were skipped because they only have minor changes here. Nothing blocks merge, so self-assign if you'd like a look:

  • @PostHog/team-growth (products/wizard/product.yaml)

Soft owners come from each directory's owners.yaml and each product's product.yaml (resolved nearest-file-wins). For a skipped owner, the locator is the file that decided it. Generated files and lockfiles are ignored when deciding ownership.

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 988a582: 3 Should fix.

This Standard review started from the posthog-review label. Comment @posthog review --deep for a Deep review, or @posthog help to see all commands.

See this review and its findings in PostHog Review.

@posthog posthog Bot removed the posthog-review label Oct 29, 2026
…ional email skill

- Ask for the user's website or a current email before designing, so the first template matches their brand.
- Reuse the app's client, keep the SDK's error, retry an uncertain outcome with the same key, and handle status read errors and not_found.
- Format the provider table with oxfmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: e72a2c10-f145-4f7c-8754-a4fcc06a18be
@trunk-io

trunk-io Bot commented Oct 29, 2026

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

- Check for the registered prepare and execute tool pair, and describe the confirmation sequence.
- Check engagement capture before promising person events, and offer to turn it on.
- Limit the idempotency guarantee to the 24 hour key window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: e72a2c10-f145-4f7c-8754-a4fcc06a18be
@mayteio mayteio added the stamphog Request AI approval (no full review) label Oct 29, 2026
stamphog[bot]

This comment was marked as outdated.

@hosthog

hosthog Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

HostHog preview — posthog-desktop-web

The previews for this PR have been torn down and no longer serve.

… skill

When `integrations-email-create` is available, the skill creates the sender, shows the DNS records, and verifies the domain without sending the user to the app. Otherwise it falls back to the building-workflows skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: e72a2c10-f145-4f7c-8754-a4fcc06a18be
@stamphog
stamphog Bot dismissed their stale review October 29, 2026 17:05

A new stamphog review started for this PR — the fresh verdict replaces this approval.

stamphog[bot]

This comment was marked as outdated.

…kill

The HTTP line now lists template_id and distinct_id at the top level, matching #126287.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: e72a2c10-f145-4f7c-8754-a4fcc06a18be
@stamphog
stamphog Bot dismissed their stale review October 30, 2026 12:31

A new stamphog review started for this PR — the fresh verdict replaces this approval.

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Contained skill documentation and tool-description changes; existing permissions, confirmation requirements, and API behavior remain unchanged. The older review supplies no specific concerns to verify, and no substantive blocking concerns are present in the supplied context.

  • Author wrote 20% of the modified lines and has 14 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 13L, 3F substantive, 139L/7F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1c-medium (139L, 7F, two-areas, feat)
stamphog 2.6.1 .stamphog/policy.yml @ 6d4fd46 · reviewed head 6d4fd46

mayteio commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

/trunk merge

@trunk-io
trunk-io Bot merged commit 2a69aa7 into master Nov 2, 2026
211 checks passed
@trunk-io
trunk-io Bot deleted the posthog/messaging-transactional-email-skill branch November 2, 2026 12:51
@deployment-status-posthog

deployment-status-posthog Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-11-02 13:17 UTC Run
prod-us ✅ Deployed 2026-11-02 13:43 UTC Run
prod-eu ✅ Deployed 2026-11-02 13:36 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant