Use this file to discover all available pages before exploring further.
Triggers define the event that starts your workflow. Each trigger is tied to an integration and fires when a specific event occurs. Your onTrigger handler receives a typed event object with the payload.In TypeScript, terse generate writes a single Triggers object in src/terse.generated.ts. Import Triggers and call the nested helpers (for example Triggers.github.onPROpened(...), Triggers.slack.onMessage(...)). System triggers use Triggers.schedule, Triggers.webhook, and Triggers.webMonitor instead of separate Schedule / Webhook / WebMonitor exports.
Connect Attio under Integrations, configure which Attio events start each workflow in the Terse app, then run terse generate. When Attio input triggers are enabled for your workspace, Triggers.attio appears in src/terse.generated.ts.Each helper maps to an AttioEventType value (also exported from terse-sdk). Use Triggers.attio.trigger({ eventTypes: [...], object?: … }) when you need several event types or you pick the type at runtime. For record webhooks, pass object: AttioObject.YourObject to scope deliveries to one CRM object; omit object on onRecordCreated, onRecordUpdated, onRecordMerged, and onRecordDeleted when you want the union of every generated object’s attribute shape.
Event types: Prefer the helper that matches your handler (for example AttioRecordCreatedTrigger), or AttioTrigger for the union when you use trigger().
import { Triggers } from "./terse.generated"triggers: [Triggers.attio.onRecordCreated({ object: AttioObject.People })]
Show Event payload
Record triggers include a record object with Attio ids/slugs plus values (and related fields) shaped from your workspace’s Attio object metadata—flattened for use in onTrigger and filter. Other Attio triggers carry event-specific payloads (lists, notes, tasks, and so on). Every event still exposes formatForAgentRunner() and debugLog() from terse-sdk.
HeyReach fires when LinkedIn outreach events occur (messages, connection requests, campaign milestones, and more). Connect HeyReach under Integrations in the Terse app, then run terse generate so Triggers.heyReach and typed HeyReachCampaign constants appear in src/terse.generated.ts.Each helper maps to one HeyReachEventType value (also exported from terse-sdk). Use Triggers.heyReach.trigger({ eventType: HeyReachEventType.MESSAGE_REPLY_RECEIVED }) when you want to pick the event type dynamically.
Trigger
Event type
Triggers.heyReach.onConnectionRequestSent()
HeyReachConnectionRequestSentTrigger
Triggers.heyReach.onConnectionRequestAccepted()
HeyReachConnectionRequestAcceptedTrigger
Triggers.heyReach.onMessageSent()
HeyReachMessageSentTrigger
Triggers.heyReach.onMessageReplyReceived()
HeyReachMessageReplyReceivedTrigger
Triggers.heyReach.onInmailSent()
HeyReachInmailSentTrigger
Triggers.heyReach.onInmailReplyReceived()
HeyReachInmailReplyReceivedTrigger
Triggers.heyReach.onFollowSent()
HeyReachFollowSentTrigger
Triggers.heyReach.onLikedPost()
HeyReachLikedPostTrigger
Triggers.heyReach.onViewedProfile()
HeyReachViewedProfileTrigger
Triggers.heyReach.onCampaignCompleted()
HeyReachCampaignCompletedTrigger
Triggers.heyReach.onLeadTagUpdated()
HeyReachLeadTagUpdatedTrigger
Config: Pass campaigns with generated HeyReachCampaign instances to handle only those campaigns; omit it to receive events from all campaigns.
import { Triggers } from "./terse.generated"triggers: [Triggers.heyReach.onMessageReplyReceived()]
Show Event payload
Shared fields on HeyReach triggers:
eventId, createdAt — event metadata
lead — optional lead profile (profile_url, names, company, tags, and related fields)
Config: Filtered by event types (user.created, organization.created, organization_membership.created, invitation.created, etc.). Prefer the typed helpers on Triggers.workOS (for example onUserCreated()) when they match your use case.
import { WorkOSEventType } from "terse-sdk"triggers: [Triggers.workOS.trigger({ eventTypes: [WorkOSEventType.USER_CREATED] })]
Show Event payload
eventId, createdAt - event metadata
user - present on user events: { id, email, firstName, lastName }
membership - present on membership events: { id, userId, organizationId, role, status }
invitation - present on invitation events: { id, email, organizationId, state }
organization - present on organization events: { id, name }
Track web changes continuously and get notified when there are updates.You can add multiple Triggers.webMonitor.onEvent(...) triggers to the same workflow. Terse runs each monitor independently and calls the same onTrigger handler for every matching event.
Trigger
Event type
Description
Triggers.webMonitor.onEvent()
WebMonitorTrigger
Fires when scheduled web monitoring detects relevant changes
import { createJob, TerseAgent } from "terse-sdk"import * as z from "zod"import { Skills, SlackChannel, Triggers } from "./terse.generated"const outputSchema = z.object({ summary: z.string(), sentiment: z.enum(["positive", "negative", "neutral"])})createJob({ name: "Web monitor trigger", triggers: [ Triggers.webMonitor.onEvent({ query: "What are a16z's latest investments?", frequency: { number: 1, unit: "day" }, outputSchema }) ], onTrigger: async event => { const summary = event.payload.summary const sentiment = event.payload.sentiment const sources = event.sourceUrls.join(", ") const agent = TerseAgent.create({ prompt: "You are alerted when the web monitor finds new material. Read the event (query, payload, and structured fields), decide what matters, and post a concise summary to Slack.", skills: [Skills.slack({ channel: SlackChannel.AllTerseInc })] }) await agent.runAndWait( `${event.formatForAgentRunner()}\n\nSummary: ${summary}\nSentiment: ${sentiment}\nSources: ${sources}` ) }})
If you need to annotate monitor events manually, import WebMonitorTriggerFor from terse-sdk and bind it to your Zod schema:
import type { WebMonitorTriggerFor } from "terse-sdk";import * as z from "zod";const outputSchema = z.object({ summary: z.string(), sentiment: z.enum(["positive", "negative", "neutral"]),});type MonitorEvent = WebMonitorTriggerFor<typeof outputSchema>
triggers: [Triggers.schedule.cron({ expression: "0 9 * * 1" })] // Every Monday at 9am
Show Event payload
data.isManualTrigger - whether the run was triggered manually from the dashboard - data.manualContext - optional context string provided on manual triggers
Fires when an HTTP request hits the generated webhook URL
Webhook URLs are auto-generated on deploy and remain stable across redeploys. After terse deploy, the CLI prints that URL for each affected workflow so you can copy it straight into your caller or load test.Pass a type argument to Triggers.webhook.onRequest<YourPayload>() so onTrigger and filter see your JSON body shape on event.body (defaults to unknown when omitted).
triggers: [Triggers.webhook.onRequest()]
Show Event payload
body - parsed JSON request body (typed when you use Triggers.webhook.onRequest<...>())