1.5.0 • Published 2 months ago

@noscai/medusa-plugin-sendgrid v1.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

SendGrid

Handle sending emails to customers related to orders, restock notifications, users, or custom events.

SendGrid Plugin Documentation | Medusa Website | Medusa Repository

Features

  • Send emails when an event related to orders, restock notifications, or users is triggered.
  • Use dynamic templates in SendGrid to build the emails to be sent.
  • Send emails with SendGrid for custom events.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-sendgrid

2. Set the following environment variable in .env:

SENDGRID_API_KEY=<API_KEY>
SENDGRID_FROM=<SEND_FROM_EMAIL>
# IDs for different email templates
SENDGRID_ORDER_PLACED_ID=<ORDER_PLACED_TEMPLATE_ID> # example

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
  // ...,
  {
    resolve: `medusa-plugin-sendgrid`,
    options: {
      api_key: process.env.SENDGRID_API_KEY,
      from: process.env.SENDGRID_FROM,
      order_placed_template: 
        process.env.SENDGRID_ORDER_PLACED_ID,
      localization: {
        "de-DE": { // locale key
          order_placed_template:
            process.env.SENDGRID_ORDER_PLACED_ID_LOCALIZED,
        },
      },
    },
  },
]

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:

yarn start

2. Place an order using a storefront or the Store APIs. You should receive a confirmation email.


Additional Resources

1.5.0

2 months ago

1.4.0

2 months ago

1.3.47

3 months ago

1.3.48

2 months ago

1.3.46

3 months ago

1.3.45

3 months ago

1.3.44

4 months ago

1.3.43

5 months ago

1.3.42

5 months ago

1.3.40

5 months ago

1.3.41

5 months ago

1.3.39

5 months ago

1.3.38

5 months ago

1.3.37

5 months ago

1.3.36

6 months ago

1.3.35

6 months ago

1.3.34

6 months ago

1.3.33

6 months ago

1.3.32

6 months ago

1.3.31

6 months ago

1.3.30

6 months ago

1.3.29

6 months ago

1.3.28

6 months ago

1.3.27

6 months ago

1.3.26

6 months ago

1.3.25

6 months ago

1.3.24

6 months ago

1.3.23

6 months ago

1.3.22

6 months ago

1.3.21

6 months ago

1.3.20

6 months ago

1.3.16

6 months ago

1.3.15

7 months ago

1.3.14

7 months ago

1.3.13

9 months ago

1.3.12

9 months ago

1.3.11

10 months ago