• Модуль интеграций
  • Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаСтартерыЗапускайте проекты быстрее с готовыми решениями
ЭкспертыПодберите специалиста для разработки и развития вашего проекта на MedusaКейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Представляем готовый к продакшену Medusa DTC Starter от Gorgo

26 августа 2026 г. · Продукт

Gorgo снижает затраты на адаптацию Medusa к локальным рынкам.

Мы разрабатываем плагины интеграции, осуществляем поддержку и развиваем сообщество разработчиков на Medusa в Telegram.

  • Ресурсы Medusa
  • Плагины и интеграции
  • Модуль интеграций
  • Стартеры
  • Эксперты
  • Кейсы
  • Medusa Чат в Telegram
  • Medusa Новости в Telegram
  • Документация Gorgo
  • Связаться с нами
  • TelegramGitHub
Плагины
N

Notification postal

Провайдер уведомлений Postal для Medusa

npm install @uhlhosting/medusa-notification-postal
Категория
Другое
Создано
Uhlhosting
Версия
0.3.4
Последнее обновление
1 месяц назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
1
npmNPMGitHubGithub

@uhlhosting/medusa-notification-postal

A production-ready Postal notification provider for Medusa. Designed for reliable transactional email delivery through Postal's HTTP API, strong configuration validation, template-based workflows, and seamless integration with Medusa’s notification system.

Release

  • Current package version:
  • License:
  • Changelog:

Options

  • - Postal API mode
  • - default sender e-mail address

Postal API settings

  • - Postal base URL, for example
  • - Postal server API key used in

only accepts (the Postal HTTP API); any other value is rejected at startup.

Environment variables

The provider options above are typically wired from environment variables. The plugin also reads the following at runtime:

VariableSecretPurpose
noAuth mode; only is supported (default ).
noDefault sender address ( option).
noPostal base URL ( option). Must be /.
yesPostal server API key ( option).
yesShared secret in the tokenized webhook path; generated if unset.
noOutbound Postal HTTP timeout in ms (default ).
noDefault recipient for admin test sends.
noJSON overriding the built-in template registry.
noComma-separated template display order.
noOverrides the tag prefix used to correlate webhook callbacks.
noOverrides the webhook events table name.
noOverrides the notification provider id.
noOverrides the plugin module registration name.

Keep the secret variables out of logs and client-visible surfaces; the admin settings endpoint never returns them.

Settings persistence

Non-secret settings edited in the admin (, , ) persist in the table via the plugin module — run after installing. Secrets (, ) are sourced from the environment/provider options only, are read-only in the admin UI, and are never written to disk. Changes that affect the constructed provider take effect after a backend restart.

Usage

Register the plugin package so its module, migrations, routes, and Admin extension are loaded. Then register the explicit Postal provider subpath under the Notification Module:

Workflow tracking

Use Medusa notification workflows and pass workflow metadata in :

The provider logs and for traceability in Medusa runtime logs.

Postal Webhooks

The plugin now exposes a public ingestion endpoint for Postal delivery lifecycle webhooks:

POST /postal/webhooks/<postal-webhook-token>

The exact tokenized URL is shown in the Postal admin activity page after you save settings. The settings screen intentionally only shows the callback path so the secret stays out of the configuration surface.

It accepts the Postal message status events documented by Postal:

Incoming webhook payloads are stored as raw JSON with normalized status metadata, so you can inspect delivery state changes in the admin Postal page after Postal calls back into Medusa.

The admin page also shows a webhook event log and the endpoint to configure inside Postal.

Postal's HTTP payload docs are separate from webhook delivery callbacks and are mainly useful if you are also handling inbound mail by HTTP. Postal's auto-responder, bounce, wildcard, and address-tag docs are relevant when you want to route inbound mail or reason about delivery replies, but they do not change the webhook callback contract itself.

Template registry and metadata passthrough

The plugin includes a built-in template registry for common notification flows:

TemplatePurposeTypical Medusa eventNotes
Generic fallback previewAny custom template nameUsed when no registry match exists and content is incomplete.
Provider transport validationUsed for operator sends and transport checks.
Admin settings validationUsed by the admin test-send form.
Customer order confirmationShared transactional order mail.
Native Medusa Admin invitation, Use application-rendered content so the environment-specific invite URL is delivered without logging the token.
Account password resetShared auth email template.
Account email verificationShared auth email template.
Customer onboardingShared onboarding and first-contact template.
Cart recoveryShared recovery reminder template.
Back-in-stock alertShared inventory alert template.

If a template key is not in the registry, Postal still uses the provided template string and falls back to the passed content. You can also pass extra tracing data through and :

are normalized into safe email headers for transport-level traceability. stays available in Medusa-side notification data and logs.

The admin Postal settings page uses the same registry for test-send template selection, so the built-in examples stay aligned across the backend and admin UI. The selected template also shows a preview of its subject, text, and HTML in the admin test-send panel. That panel also includes a full example payload with recipient, sender identity, workflow metadata, and sample custom args for the selected template. The same panel now lets you load the example values into the test form with one click, edit the message subject/text/HTML/custom args/metadata, or copy the example JSON directly. It also exposes , , and custom so test sends match the provider contract more closely.

You can also set sender identity fields when you need branded mail or a separate reply path:

formats the sender as . is forwarded to Postal and preserved in provider data.

Programmatic Workflows

You can trigger a direct email notification through the Postal provider programmatically using the . This ensures the mail goes through the provider's standard channel and logs full delivery metadata.

Еще в этой категории

Посмотреть все
Другое
Gati logo

Gati

От Devx Commerce

Синхронизируйте Medusa с Gati ERP

Загрузка данных
npm
Другое
Product Reviews logo

Product Reviews

От Lambda Curry

Добавляйте рейтинги, отзывы и модерацию товаров

Загрузка данных
GitHubnpm
Другое
Variant Images logo

Variant Images

От Betanoir

Организуйте и загружайте варианты изображений в Medusa

Загрузка данных
GitHubnpm
1module.exports = defineConfig({
2 plugins: [
3 {
4 resolve: "@uhlhosting/medusa-notification-postal",
5 options: {},
6 },
7 ],
8 modules: [
9 {
10 resolve: "@medusajs/medusa/notification",
11 options: {
12 providers: [
13 {
14 resolve:
15 "@uhlhosting/medusa-notification-postal/providers/postal",
16 id: "postal",
17 options: {
18 channels: ["email"],
19 auth_type: "smtp-api",
20 from: process.env.POSTAL_FROM,
21 base_url: process.env.POSTAL_BASE_URL,
22 api_key: process.env.POSTAL_API_KEY,
23 },
24 },
25 ],
26 },
27 },
28 ],
29})
1await notificationModuleService.createNotifications({
2 channel: "email",
3 to: "cosmin@example.com",
4 template: "order-placed",
5 content: {
6 subject: "Order confirmation",
7 html: "<p>Thanks for your order</p>",
8 text: "Thanks for your order",
9 },
10 provider_data: {
11 workflow_event: "order.placed",
12 workflow_run_id: "wf_run_123",
13 },
14})
1provider_data: {
2 subject: "Order confirmation",
3 html: "<p>Thanks for your order</p>",
4 text: "Thanks for your order",
5 workflow_event: "order.placed",
6 workflow_run_id: "wf_run_123",
7 metadata: {
8 store: "main",
9 environment: "production",
10 },
11 custom_args: {
12 order_id: "ord_123",
13 customer_group: "vip",
14 },
15}
1provider_data: {
2 from: "no-reply@example.com",
3 from_name: "Postal Admin",
4 reply_to: "support@example.com",
5 cc: "billing@example.com",
6 bcc: ["archive@example.com"],
7 headers: {
8 "X-Trace-Id": "trace_123",
9 },
10}
1import { sendPostalEmailWorkflow } from "@uhlhosting/medusa-notification-postal"
2
3const { result } = await sendPostalEmailWorkflow(req.scope).run({
4 input: {
5 to: "cosmin@example.com",
6 from: "custom-sender@example.com", // Optional, defaults to POSTAL_FROM
7 template: "custom-template-id", // Optional
8 provider_data: {
9 subject: "Test Programmatic Email",
10 html: "<p>Hello, this is a test email sent programmatically.</p>",
11 text: "Hello, this is a test email sent programmatically.",
12 cc: "billing@example.com",
13 workflow_event: "admin.test_send",
14 workflow_run_id: "wf_run_manual_123"
15 }
16 }
17})
18
19// Result returns the delivery info:
20// { success: true, delivery: { message_id: "123", ... } }