Segment
Data Access tokenManage Segment sources, destinations, tracking plans, warehouses and workspace permissions from any Windmill script, flow or app.
Set up in 3 steps
Create an access token
In Segment, open Settings then Workspace access, then Tokens, and create a Public API token with the access your scripts need.
Add the resource in Windmill
Open Resources, add a resource of type segment. Set baseUrl to https://api.segmentapis.com for a US workspace, https://eu1.api.segmentapis.com for an EU one.
Run your first script
Fork any script below and read before writing anything. There are hundreds here, so search by the verb you need.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
Update Warehouse
Update User Group
Update Transformation
Update Tracking Plan
Update Source
Update Selective Sync for Warehouse
Update Schema Settings in Source
Update Rules in Tracking Plan
Update Function
Update Filter for Destination
Update Destination
Replace Users in User Group
Replace Rules in Tracking Plan
Replace Permissions for User Group
Replace Permissions for User
Replace Labels in Source
Replace Advanced Sync Schedule for Warehouse
Remove Write Key from Source
Remove Users from User Group
Remove Subscription from Destination
Remove Source from Tracking Plan
Remove Source Connection from Warehouse
Remove Rules from Tracking Plan
Remove Profiles Warehouse from Space
Remove Filter from Destination
Remove Computed Trait from Space
Remove Audience from Space
Preview Destination Filter
List Workspace Regulations
List Warehouses
Resource type
segment — the shape of the credential every script on this page expects.
| Field | Type | Required | What it is |
|---|---|---|---|
| baseUrl | string | Yes | https://api.segmentapis.com for US workspace and https://eu1.api.segmentapis.com for EU workspace. |
| token | string | Yes | Access token generated using the OAuth flow. |
Questions
Which baseUrl do I need?
The one for your workspace's region. An EU workspace only answers on the eu1 host, and a wrong host looks like an authentication failure.
Is this the tracking API?
No. These scripts configure a workspace — sources, destinations, tracking plans. Sending events is a different API with a write key.
Is my token stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.