# Notify customers of expiring gift cards

Runs daily, finds all enabled gift cards expiring within a set number of days, and sends each customer a reminder email via SendGrid.

Canonical URL: https://templates.jsworkflows.com/templates/notify-expiring-gift-cards/

## When to use this template

This template is built for Shopify stores using the JsWorkflows app.

Use this template when you want a ready-made workflow for this use case: Runs daily, finds all enabled gift cards expiring within a set number of days, and sends each customer a reminder email via SendGrid.

It is designed for Shopify customer operations and gives you a production-ready starting point instead of building the automation from scratch. It can work with SendGrid as part of the workflow.

This workflow uses the scheduled trigger model and starts from the "Daily schedule" trigger. It includes setup fields for merchant-facing values, so you can configure the workflow before installing it.

## Metadata

- Category: Customers
- Trigger: Daily schedule
- Workflow type: Scheduled
- Complexity: medium
- Usage class: starter-friendly

## Connected services

- sendgrid

## Additional Shopify scopes

- read_gift_cards

## Setup fields

- Days before expiry (`DAYS_BEFORE_EXPIRY`)
  - Type: number
  - Storage: config
  - Required: yes
  - Description: How many days before the expiry date the reminder email should be sent.
- From name (`SENDGRID_FROM_NAME`)
  - Type: text
  - Storage: env
  - Required: yes
  - Description: Sender display name shown in the reminder email.
- From email (`SENDGRID_FROM_EMAIL`)
  - Type: text
  - Storage: env
  - Required: yes
  - Description: Verified SendGrid sender email address used in the reminder email.
- SendGrid API key (`SENDGRID_API_KEY`)
  - Type: textarea
  - Storage: env
  - Required: yes
  - Description: SendGrid API key used to send the gift card reminder emails.

## Setup guide

## Before you start

This template runs daily and sends gift card expiry reminders through SendGrid.

## How it works

- It calculates one exact reminder date based on the configured number of days before expiry
- It finds enabled gift cards expiring on that date
- It schedules one reminder email per gift card customer
- Gift cards without a customer or customer email are skipped

## Configure in setup

- `Days before expiry`: how many days ahead of the expiry date the reminder should be sent
- `SendGrid API key`: API key used to send the emails
- `From email`: verified SendGrid sender email address
- `From name`: sender display name shown in the message

## Notes

- This template is best scheduled to run once per day
- The reminder is based on the workflow run date and the gift card expiry date returned by Shopify

