--- sidebar_label: "Send Notification" tags: - notification - how to - server --- import { TypeList } from "docs-ui" export const metadata = { title: `Send Notification with the Notification Module`, } # {metadata.title} In this guide, you'll learn how to send a notification using the Notification Module. ## Use the Create Method In your resource, such as a subscriber, resolve the Notification Module's main service and use its `create` method: export const highlights = [ ["12", "notificationModuleService", "Resolve the Notification Module."], ["15", "create", "Create the notification to be sent."], [ "17", '"email"', "Use the module provider defined for the `email` channel to send an email.", ], [ "18", '"product-created"', "The ID of the template defined in the third-party service, such as SendGrid.", ], [ "19", "data", "The data to pass to the template defined in the third-party service.", ], ] ```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-7" expandButtonLabel="Show Imports" import type { SubscriberArgs, SubscriberConfig, } from "@medusajs/framework" import { Modules } from "@medusajs/framework/utils" import { INotificationModuleService } from "@medusajs/framework/types" export default async function productCreateHandler({ event: { data }, container, }: SubscriberArgs<{ id: string }>) { const notificationModuleService: INotificationModuleService = container.resolve(Modules.NOTIFICATION) await notificationModuleService.createNotifications({ to: "shahednasser@gmail.com", channel: "email", template: "product-created", data, }) } export const config: SubscriberConfig = { event: "product.created", } ``` The `create` method accepts an object or an array of objects having the following properties: `", description: "The data to pass along to the template, if necessary.", }, ]} sectionTitle="Use the Create Method" /> For a full list of properties accepted, refer to [this guide](/references/notification-provider-module#create).