---
title: "create native trigger"
method: POST
path: "/w/{workspace}/native_triggers/{service_name}/create"
tags: ["native_trigger"]
---

# create native trigger

`POST /w/{workspace}/native_triggers/{service_name}/create`

Creates a new native trigger for the specified service.
Requires write access to the script or flow that the trigger will be associated with.

## Path parameters

- `workspace` string, required
- `service_name` 'nextcloud' | 'google' | 'github', required

## Request body

- NativeTriggerData — Data for creating or updating a native trigger
  - `script_path` string, required — The path to the script or flow that will be triggered
  - `is_flow` boolean, required — Whether the trigger targets a flow (true) or a script (false)
  - `service_config` object, required — Service-specific configuration (e.g., event types, filters)
  - `summary` string, nullable — Short summary to be displayed when listed

## Response `201`

native trigger created

- CreateTriggerResponse — Response returned when a native trigger is created
  - `external_id` string, required — The external ID of the created trigger from the external service

---

[API](https://skmtc.dev/windmill/apis/windmill-api.md) · [All operations](https://skmtc.dev/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/7b281701c340/schema)
