Skip to content

Commit 1eab239

Browse files
Update trigger scripts docs to mention Data tables for complex objects
- Added references to Data tables as an alternative to States for more complex relational data - Added Data tables DocCard to trigger scripts documentation - Updated both main triggers documentation and flow trigger documentation Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
1 parent 77348f8 commit 1eab239

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/flows/10_flow_trigger.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import DocCard from '@site/src/components/DocCard';
88

99
Trigger scripts are designed to pull data from an external source and return all of the new items since the last run, without resorting to external webhooks. A trigger script is intended to be used as scheduled poll with [schedules](../core_concepts/1_scheduling/index.mdx) and [states](../core_concepts/3_resources_and_types/index.mdx#states) (rich objects in JSON, persistent from one run to another) in order to compare the execution to the previous one and process each new item in a [for loop](../flows/12_flow_loops.md). If there are no new items, the flow will be skipped.
1010

11+
For more complex objects or when you need structured relational data instead of simple state tracking, consider using [Data tables](../core_concepts/11_persistent_storage/data_tables.mdx) which provide a workspace-scoped SQL database for storing and querying data.
12+
1113
By default, adding a trigger will set the schedule to 15 minutes.
1214

1315
:::info
@@ -23,6 +25,12 @@ Check our pages dedicated to [Scheduling](../core_concepts/1_scheduling/index.md
2325
href="/docs/core_concepts/resources_and_types#states"
2426
color="teal"
2527
/>
28+
<DocCard
29+
title="Data tables"
30+
description="Store and query relational data with near-zero setup using databases managed by Windmill."
31+
href="/docs/core_concepts/persistent_storage/data_tables"
32+
color="teal"
33+
/>
2634
<DocCard
2735
title="Schedules"
2836
description="Scheduling allows you to define schedules for Scripts and Flows, automatically running them at set frequencies."

docs/getting_started/8_triggers/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,8 @@ A particular use case for schedules are [Trigger scripts](../../flows/10_flow_tr
405405

406406
Trigger scripts are used in [Flows](../../flows/1_flow_editor.mdx) and are designed to pull data from an external source and return all of the new items since the last run, without resorting to external webhooks. A trigger script is intended to be used as scheduled poll with [schedules](../../core_concepts/1_scheduling/index.mdx) and [states](../../core_concepts/3_resources_and_types/index.mdx#states) (rich objects in JSON, persistent from one run to another) in order to compare the execution to the previous one and process each new item in a [for loop](../../flows/12_flow_loops.md). If there are no new items, the flow will be skipped.
407407

408+
For more complex objects or when you need structured relational data instead of simple state tracking, consider using [Data tables](../../core_concepts/11_persistent_storage/data_tables.mdx) which provide a workspace-scoped SQL database for storing and querying data.
409+
408410
You could set your script in a flow after a Trigger script to have it run only when new data is available.
409411

410412
<div className="grid grid-cols-2 gap-6 mb-4">

0 commit comments

Comments
 (0)