Skip to main content
Triggers let your scripts run automatically — no need to open the app and start them by hand. You attach a trigger to a script, tell it what to watch for, and Script.it runs the script every time that thing happens.

What a trigger can watch for

There’s one kind of trigger, with a menu of things it can watch for:
  • A schedule — every weekday at 8 AM, every six hours, the first of the month. See Schedule triggers.
  • An app event — a new Notion database item, a GitHub pull request, a Slack message, a Calendly booking, a new row in a Google Sheet, a new LinkedIn message. Nearly 100 events across more than 40 apps. See App events.
  • A webhook — your own URL that any service can send a request to, or that a form on your own website can post to. See Webhook triggers.
  • Anything else — if nothing in the menu fits, the agent can build a custom trigger for you. See Custom triggers.
They all behave the same way once they exist: they watch for something, and when they see it, they run your script.

Creating a trigger

The easiest way is to ask the agent in chat:
Run this every weekday morning at 8 AM.
Trigger this whenever someone opens a pull request on our repo.
The agent picks the right trigger, fills in the settings, and switches it on. You can also create one yourself:
  1. In the sidebar, click the arrow next to New session (More create options) and choose New Trigger.
  2. Give it a Name.
  3. Under Trigger, choose Schedule, Webhook, or On Event. On Event opens a searchable list of every app event.
  4. Under Action, choose Run Script, pick the script, and fill in any inputs it needs.
  5. Click Create Trigger.
Either way, the trigger starts working as soon as it’s created.

What a trigger does

A trigger runs a script. You choose which script, and optionally the input values it should run with — the same inputs you’d fill in when running it by hand. When the trigger fires, the details of what happened are handed to your script, so it can act on them — the contents of the Slack message, the fields on the new Notion item, the body of the webhook request. Each run opens a session, and runs show up in your session history alongside sessions you started yourself.

Advanced options

Every trigger has an Advanced section in its settings. You rarely need it, but it controls how runs share sessions and how long the trigger lives.
Only use session grouping when events really belong to one conversation, like a Slack thread or an email thread. Grouping unrelated events into one session makes each run slower and harder to follow.

Triggers are part of the script

A trigger isn’t a separate thing hanging off your script — it lives inside it, like a block does:
  • It appears in the script as a card, with its settings, a Trigger on/off switch, and its Recent runs.
  • It’s saved with the script’s files.
  • So it travels with the script. Export the script, import it into another workspace, or share it with a teammate, and its triggers come along.
There’s no separate place to keep in sync: change the trigger and the script updates with it.

Triggers in a shared workspace

Scripts are shared with your workspace, but triggers run for a person. So when a teammate opens a shared script, its triggers appear switched off. Turning one on with its Trigger switch creates their own copy. It runs with their connected accounts and their credits, and it has its own settings and run history. Readers (Can view) can turn on their own copy too. It doesn’t change the script or affect anyone else’s copy.
This is deliberate. A Gmail trigger your teammate enables watches their inbox, never yours — and nobody is signed up for someone else’s automation just by opening a shared script.
A guest from outside the organization runs their copy from their own Personal account, and pays for it from there.

Who can create and turn on triggers

In an organization, creating, changing, and turning on triggers needs the Create and edit triggers permission. Every role has it by default. An admin can turn it off for a member or a role. That pauses the member’s triggers in that organization, including their agent channels (WhatsApp, Telegram, Teams, Slack, and email). When the permission is turned back on, their triggers resume on their own. See Roles and permissions.
Deleting a trigger is a shared change for anyone who can edit the script: it removes the trigger from the script and removes every member’s copy of it. Turning a trigger off only affects your own. See Managing triggers.

Next steps

Schedule triggers

Run a script on a recurring cadence.

App events

React to activity in Slack, GitHub, Notion, and more.

Webhook triggers

Give your script a URL any service — or a form on your website — can call.

Managing triggers

Run history, failures, safeguards, and limits.