Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.script.it/llms.txt

Use this file to discover all available pages before exploring further.

A webhook trigger gives your script a unique URL. When that URL receives an HTTP POST request, Script.it creates a new session and runs the configured action. Any service that can make an HTTP request — Zapier, Make, Stripe, or a custom internal tool — can fire your automation this way. You can also pass data in the request body, which your script can read as a payload.

Creating a webhook trigger

1

Open the Triggers tab

Open the script you want to trigger via webhook. Click the Triggers tab, then click Add Trigger.
2

Name the trigger and choose Webhook

Enter a name for the trigger — something that identifies the source, like “Stripe payment received” or “Deploy finished”. In the Trigger Type dropdown, select Webhook.
3

Choose an action

Under Action, choose what happens when the webhook fires:
  • Send Prompt — sends a message to the AI agent in a new session.
  • Run Script — runs a specific script directly, with optional input values.
4

Create the trigger

Click Create Trigger. Script.it generates a unique webhook URL and displays it immediately after creation. Copy this URL — you’ll need it to configure the sending service.
5

Use the URL in your external service

Paste the webhook URL into the service or code that should fire the trigger. Configure that service to send an HTTP POST request to the URL when the relevant event occurs.

Sending a request to the webhook

The webhook URL accepts HTTP POST requests. Send a POST to the URL to fire the trigger. You can include a JSON body — the payload will be passed to your script. Most services that support webhooks include a Test or Send test event button. Use that option after you paste the webhook URL. Script.it will create a new session when the test event arrives, so you can confirm the trigger is connected correctly.

Passing data to your script

The body of the POST request is the trigger payload. When your script runs, this data is available so the script can act on information from the sender — for example, a Stripe event object, a GitHub push payload, or any custom JSON you choose to send.

What happens when the webhook fires

Each time the webhook URL receives a POST request, Script.it creates a new session and runs the action you configured. Sessions appear in your session history like any other run. If the action is Run Script, the session shows the script execution results. If the action is Send Prompt, the agent responds to the prompt in the new session.
Your webhook URL acts as the authentication credential — anyone who has the URL can trigger your script. Keep it private. Do not share it publicly, commit it to a public repository, or include it in client-side code. If a URL is compromised, delete the trigger and create a new one to get a fresh URL.

Managing webhook triggers

From the Triggers tab on your script:
  • Pause / resume — use the toggle next to a trigger to temporarily disable or re-enable it without losing the URL.
  • Delete — open the trigger’s actions menu and select Delete. Deleting the trigger permanently invalidates the URL. Any future requests to that URL will not fire the script.