Pailot

Corporate Email Campaign

Send or preview personalized email batches by employee groups using server-managed mail transport

The Corporate Email Campaign (email_campaign) integration enables workflows and Web Chat deployments to send personalized email batches across employee groups using server-configured mail transport—without exposing API keys or SMTP credentials inside workflow blocks.

Key capabilities include:

  • Server-Managed Transport: Uses server-side RESEND_API_KEY and CAMPAIGN_FROM_EMAIL so workflow authors never handle secrets.
  • Dry-Run Preview Mode: Validates email syntax, recipient allowlist rules, and group variable rendering without sending live emails or consuming daily quota.
  • Recipient Allowlist Protection: Filters every recipient against CAMPAIGN_TEST_RECIPIENT_ALLOWLIST before batch submission so invalid or unauthorized addresses are isolated in rejected without failing valid recipients.
  • Group Template Deduplication: Define subject and HTML/text templates once per employee group via groupTemplates while passing lightweight recipient variables in messages.
  • Ready-Made Web Chat Report: Outputs summaryMarkdown with a per-group table and human-readable CMP-YYYYMMDD-XXXX campaign code ready for Deploy → Chat.

Usage Instructions

Pass a JSON array of up to 100 recipient objects in messages (directly or from a Function / Agent block). Keep dryRun enabled (true) while testing group templates, and wire summaryMarkdown to your Web Chat output.

Tools

email_campaign_send

Send or preview up to 100 personalized emails by employee groups using server-configured mail transport.

Input

ParameterTypeRequiredDescription
campaignNamestringNoOptional human-readable campaign title for logs and chat reports
messagesjsonYesJSON array of recipient items: [{ to, subject?, body?, contentType?, group?, variables? }]
groupTemplatesjsonNoOptional JSON map of templates per group: { "HR": { "subject": "...", "body": "..." } }
defaultSubjectstringNoFallback email subject template (supports {{variable}} placeholders)
defaultBodystringNoFallback email body template (supports {{variable}} placeholders)
contentTypestringNoDefault content format for email body (html or text)
replyTostringNoOptional Reply-To email address
dryRunbooleanNoWhen true, validates recipients and builds group report without sending real emails or spending quota
idempotencyKeystringNoOptional idempotency key to prevent duplicate batch sends on retry

Output

ParameterTypeDescription
successbooleanWhether the campaign batch completed successfully
campaignCodestringShort human-readable campaign identifier (e.g. CMP-20261119-7K4P)
campaignNamestringCampaign title if provided
dryRunbooleanWhether the run executed in preview mode without sending real emails
fromstringServer-configured sender email address
totalRequestednumberTotal recipient records received by the block
acceptedCountnumberNumber of recipient records that passed validation and allowlist checks
sentCountnumberNumber of emails sent (or verified in dry-run mode)
rejectedCountnumberNumber of recipient records rejected by validation or allowlist
groupBreakdownjsonPer-group counters { accepted, sent, rejected }
rejectedarrayRejected recipients with reasons
messageIdsarrayProvider message IDs returned for live sends
summaryMarkdownstringReady-to-render Markdown summary report for Web Chat
On this page

On this page

Get access
Copilot assembles the process. A manager can run it. You can install it in the company contour.
Get access