
ダイジェスト
3つの項目を載せた定期的なサマリー。最後にリンクをひとつ置きます。
いちばんシンプルな形。見出し、詳細の一文、任意の引用、リンクで構成します。

{{headline}}
{{headline}}
{{body}}
{{quoteAuthor}}
{{quoteBody}}
{{actionLabel}} [{{actionUrl}}]
{{footerNote}}サンプルの値で表示しています。HTMLとプレーンテキストのタブでは、プレースホルダーがそのまま残ります。
概要
コメント、メンション、ステータスの変更など、見出しとひとつのアクションがあれば足りるものに使える汎用の通知です。引用ブロックは任意で、ボタンのラベルは自由に設定できます。
値
必須の値は、送信のたびに必ず渡す必要があります。それ以外は、ここに示したデフォルト値が使われます。
| プレースホルダー | 種類 | 必須 | デフォルト |
|---|---|---|---|
{{headline}} | テキスト | 必須 | なし |
{{body}} | テキスト | 必須 | なし |
{{quoteAuthor}} | テキスト | 任意 | なし |
{{quoteBody}} | テキスト | 任意 | なし |
{{actionLabel}} | テキスト | 任意 | Open |
{{actionUrl}} | リンク | 必須 | なし |
{{footerNote}} | テキスト | 任意 | You are receiving this because of your notification settings. |
API
このデザインからテンプレートを一度作成すれば、あとはメッセージごとの値を渡して送信できます。
import { init, openemail } from '@openemail/sdk' init({ apiKey: process.env.OPENEMAIL_API_KEY }) const template = await openemail.templates.create({ name: 'Notification', starter: 'notification', publish: true,}) const sent = await openemail.templates.send(template.slug, { from: 'Northwind <[email protected]>', to: '[email protected]', props: { headline: 'Jonas commented on the launch plan', body: 'He left a note on the pricing section and asked for a second pair of eyes before Friday.', quoteAuthor: 'Jonas Weber', quoteBody: 'Can we test the annual price before we commit to it?', actionUrl: 'https://example.com/docs/launch-plan', },}) console.log(sent.id, sent.status)通知
テンプレートから始める
どのテンプレートも、エディターでは移動、スタイル変更、削除ができるブロックとして開き、APIからは値を埋めて送信できます。
企業、AI、エージェント、個人利用のためのメールインフラ。スケール、プライバシー、コントロールのために設計。メールが最初から備えているべきだったすべて。