-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Description
Create a simple email drip campaign using SendGrid
The drip campaign should send a series of emails after a series of delays:
- First email sent immediately on an eventTrigger
- Second email sent 24 hours later
- Third email sent 5 days later
- Fourth email sent 30 days later
Use Zod to define the schema:
to: email-address
from: email-address
name: first-name / fall-back-name
Separate for each email:
subject: subject-text
text: email-text
Details:
- Use our SendGrid integration.
- Look at this Resend drip campaign reference, it's a useful reference to copy. Remember that SendGrid does not use React email so that all needs to be removed and replaced.
Requirements:
-
Follow this guide to get the project setup.
-
Create a new file in the
src
folder, named appropriately. -
The Trigger.dev client must be defined at the top of the job, with the 'jobs-showcase' id:
const client = new TriggerClient({ id: "jobs-showcase" });
- You must add the Express specific lines to the bottom of the Job file:
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
- You must add the new Job to the package.json file, in this format:
"scripts": {
//..other scripts
"your-job-name": "nodemon --watch src/your-job-name.ts -r tsconfig-paths/register -r dotenv/config src/events.ts"
}
Important
You must test this Job works before submitting your PR, including a screenshot of a successful run. This may involve you having to setup accounts with services.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers