triggerdotdev / api-reference Goto Github PK
View Code? Open in Web Editor NEWThis repository provides job code samples that use either SDKs or the fetch method to interact with external APIs and Trigger.dev.
Home Page: https://trigger.dev
This repository provides job code samples that use either SDKs or the fetch method to interact with external APIs and Trigger.dev.
Home Page: https://trigger.dev
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the AWS API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Google Maps API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Loops API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Discord API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Snyk.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Square.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Discord.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the YouTube API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Salesforce.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Anthropic API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possible
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from HubSpot.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the DeepL API and SDK. This will replace the GitHub example we currently have in the app.
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Rippling API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Twilio API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Mailgun API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the ZBD API and SDK. This will replace the GitHub example we currently have in the app.
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Square API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Stability AI API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the DigitalOcean API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Twilio.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Gmail API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
zod
to define the payloadssrc
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Instagram API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Google Sheets API and SDK.
This job must connect to the Google Sheets API, using the SDK, and return an example payload from the API.
The job should use an eventTrigger
The job should use zod
to define the payloads
Use the structure of our GitHub API reference file
src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Segment API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Novu API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the PagerDuty API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Salesforce API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Coinbase API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Hugging Face API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Snyk API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Notion API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Cal.com API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Svix API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Zapier API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Todoist API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Shopify API and SDK. This will replace the GitHub example we currently have in the app:
This job must connect to the Shopify, using the SDK, and return an example payload from the API.
The job should use an eventTrigger
The job should use zod
to define the payloads
Use the structure of our GitHub API reference file
src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the HubSpot API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Google Drive API and SDK. This will replace the GitHub example we currently have in the app:
This job must connect to the Google Drive API, using the SDK, and return an example payload from the API.
The job should use an eventTrigger
The job should use zod
to define the payloads
Use the structure of our GitHub API reference file
src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the X (Twitter) API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Brex API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Reddit API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Google Calendar API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.src
folder, named to match the API (e.g. GitHub would be called github.ts
).const client = new TriggerClient({ id: "api-reference" });
// These lines can be removed if you don't want to use express
import { createExpressServer } from "@trigger.dev/express";
createExpressServer(client);
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
@D-K-P I would like yo work on this issue kindly assign it to me
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job using the Asana API and SDK. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the WhatsApp API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Shopify.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
HTTP endpoints allow you to subscribe to changes from an API. You can use defineHttpEndpoint
to receive webhooks, verify them, and create an HTTP Trigger.
The task is to create a job example which is triggered by an HTTP Trigger when a change is received from Instagram.
Reference material:
respondWith
) because WhatsApp sends a verification GET request to confirm before the webhooks can be created. Most APIs don't required this.const body = await request.json() as WebhookPayload
io.runTask()
callback - initialise clients and auth in global scope if possibleFollow this guide to get the project setup.
Create a new file in the src folder, named to match the API, with '-http-endpoint' at the end (e.g. GitHub would be called github-http-endpoint.ts
).
The Trigger.dev client must be defined at the top of the job, with the 'api-reference' id:
const client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.ts"
}
Important
You must test this Job works before submitting your PR, including a video or screenshot of a successful run. This may involve you having to setup accounts with services.
While we build our official integrations, we want to create examples of how to create jobs which use other APIs with Trigger.dev. This reference will be used in the app on any service we don’t have an integration for yet.
In this example, you will build a simple job which uses the Lemon Squeezy API. This will replace the GitHub example we currently have in the app:
eventTrigger
.zod
to define the payloads.io.backgroundFetch()
where absolutely necessaryio.runTask()
callback - initialise clients and auth in global scope if possibleconst client = new TriggerClient({ id: "api-reference" });
4. 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);
5. You must add the new script to the package.json file, in this format:
"scripts": {
//..other scripts
"<api-name>": "nodemon --watch src/<api name>.ts -r tsconfig-paths/register -r dotenv/config src/<api name>.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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.