Merge pull request #63 from triggerdotdev/dev
Added a Todo comment to each of the samples to make it clear the id needs to be unique
This commit is contained in:
@@ -3,6 +3,7 @@ export function customEvent(apiKey: string) {
|
||||
import { z } from "zod";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "user-created-notify-slack",
|
||||
name: "User Created - Notify Slack",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -4,8 +4,9 @@ import * as github from "@trigger.dev/github";
|
||||
import * as slack from "@trigger.dev/slack";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "github-issues-to-slack",
|
||||
name: "Posts to Slack when GitHub Issue created or modified",
|
||||
name: "Posts to Slack when a GitHub Issue created or modified",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
// Our env variable is called TRIGGER_API_KEY
|
||||
apiKey: "${apiKey}",
|
||||
|
||||
@@ -4,6 +4,7 @@ import * as github from "@trigger.dev/github";
|
||||
import * as slack from "@trigger.dev/slack";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "new-github-star-to-slack",
|
||||
name: "New GitHub Star: triggerdotdev/trigger.dev",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -4,6 +4,7 @@ import { postMessage } from "@trigger.dev/slack";
|
||||
import { z } from "zod";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "new-user",
|
||||
name: "New user slack message",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Text } from "@react-email/text";
|
||||
import { z } from "zod";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "welcome-email-campaign",
|
||||
name: "Welcome email drip campaign",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -2,6 +2,7 @@ export function scheduledCron(apiKey: string) {
|
||||
return `import { Trigger, scheduleEvent } from "@trigger.dev/sdk";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "cron-scheduled-workflow",
|
||||
name: "Cron Scheduled Workflow",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -2,6 +2,7 @@ export function scheduled(apiKey: string) {
|
||||
return `import { Trigger, scheduleEvent } from "@trigger.dev/sdk";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "scheduled-workflow",
|
||||
name: "Scheduled Workflow",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -4,6 +4,7 @@ import { z } from "zod";
|
||||
import * as shopify from "@trigger.dev/shopify";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "shopify-products",
|
||||
name: "Shopify products",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -3,6 +3,7 @@ export function webhook(apiKey: string) {
|
||||
import { z } from "zod";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "caldotcom-to-slack",
|
||||
name: "Cal.com To Slack",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
@@ -3,6 +3,7 @@ export function whatsappListenForMessageAndReply(apiKey: string) {
|
||||
import { events, sendReaction, sendText } from "@trigger.dev/whatsapp";
|
||||
|
||||
new Trigger({
|
||||
//todo: ensure this id is only used for this workflow
|
||||
id: "whatsapp-webhook",
|
||||
name: "Listen for WhatsApp messages and reply",
|
||||
// For security, we recommend moving this api key to your .env / secrets file.
|
||||
|
||||
Reference in New Issue
Block a user