Prefect
App · 15 actions
Run your Prefect pipelines: run deployments with parameters, follow and wait for flow runs, cancel, retry and resume them, read their logs, pause deployments, set Variables, and start a workflow when a flow run fails, completes or starts late.
Actions
| Action | What it does |
|---|---|
| Cancel flow run | Cancel a flow run, as Prefect's Cancel button does: one waiting to start is cancelled at once, and the worker stops one that's running. |
| Delete Variable | Delete a Prefect Variable. |
| Get flow run | Get a flow run's state, parameters and times, with the message its state carries, such as the error it failed on. |
| Get flow run logs | Get a flow run's log, its last lines oldest first, with the last error it logged. |
| Get Variable | Get a Prefect Variable's value. |
| List deployments | List deployments by name, with whether each is paused, its schedules, its default parameters and its work pool. |
| List flow runs | List recent flow runs, the latest first, of every deployment or one, by state, tag and since when. |
| List work pools | List work pools, with whether a worker is polling each (Ready) and whether it's paused. |
| Pause deployment | Pause a deployment, so its schedules make no runs until it's resumed. |
| Resume deployment | Resume a paused deployment, so its schedules make runs again. |
| Resume flow run | Resume a flow run that paused to wait for someone, such as for an approval. |
| Retry flow run | Run a finished flow run of a deployment again with the same parameters, as Prefect's Retry button does, such as after fixing what made it fail. |
| Run deployment | Start a run of a deployment with the parameters you give, now or at a set time, as Prefect's Run button does. |
| Set Variable | Set a Prefect Variable that flows read, such as a date to load from or a list of recipients, making it if there's none. |
| Wait for flow run | Wait until a flow run finishes (completes, fails, crashes or is cancelled) or pauses for someone, up to 15 minutes, then get it. |
Cancel flow run
Cancel a flow run, as Prefect's Cancel button does: one waiting to start is cancelled at once, and the worker stops one that's running. A run that has finished is left as it is.
Inputs
- Flow run
flow_run_idtextRequired - The flow run's ID: pick a recent run, or use the id of an earlier step, such as Run deployment's.
Outputs
changedtrue/false- Whether it changed; false if there was nothing to do
createdtext- When it was created (ISO 8601)
deployment_idtext- The ID of the deployment it was started from; empty if none
deployment_nametext- The deployment, as flow/deployment; empty if none
duration_secondsnumber- How long it has run, in seconds
end_timetext- When it finished (ISO 8601); empty until it does
expected_start_timetext- When it was due to start (ISO 8601)
finishedtrue/false- Whether it has completed, failed, crashed or been cancelled
flow_nametext- The flow it runs
idtext- The flow run's ID
linktext- A link to the run in Prefect
nametext- The run's name, such as venerable-beluga
parametersobject- The parameters it runs with
run_countnumber- How many times it has run, retries included
start_timetext- When it started (ISO 8601); empty until it does
statetext- Its state as Prefect shows it, such as Scheduled, Late, Running, Completed, Failed, Crashed or Cancelled
state_messagetext- What Prefect says about the state, such as the error
state_typetext- Its kind of state: SCHEDULED, PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CRASHED, CANCELLING or CANCELLED (a Late run is SCHEDULED)
tagslist- Its tags
work_pooltext- The work pool it runs in
Example output
{
"changed": true,
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 133.518,
"end_time": "",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": false,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "2026-01-31T06:00:04.112Z",
"state": "Cancelling",
"state_message": "Cancelled from Lodol",
"state_type": "CANCELLING",
"tags": [
"finance"
],
"work_pool": "default-pool"
}Delete Variable
Delete a Prefect Variable. One that isn't there is left as it is.
Inputs
- Variable
nametextRequired - The Variable's name, as Prefect lists it under Variables: lowercase letters, numbers, dashes and underscores.
Outputs
deletedtrue/false- Whether it was deleted; false if there was none
nametext- The Variable's name
Example output
{
"deleted": true,
"name": "last_loaded_date"
}Get flow run
Get a flow run's state, parameters and times, with the message its state carries, such as the error it failed on.
Inputs
- Flow run
flow_run_idtextRequired - The flow run's ID: pick a recent run, or use the id of an earlier step, such as Run deployment's.
Outputs
createdtext- When it was created (ISO 8601)
deployment_idtext- The ID of the deployment it was started from; empty if none
deployment_nametext- The deployment, as flow/deployment; empty if none
duration_secondsnumber- How long it has run, in seconds
end_timetext- When it finished (ISO 8601); empty until it does
expected_start_timetext- When it was due to start (ISO 8601)
finishedtrue/false- Whether it has completed, failed, crashed or been cancelled
flow_nametext- The flow it runs
idtext- The flow run's ID
linktext- A link to the run in Prefect
nametext- The run's name, such as venerable-beluga
parametersobject- The parameters it runs with
run_countnumber- How many times it has run, retries included
start_timetext- When it started (ISO 8601); empty until it does
statetext- Its state as Prefect shows it, such as Scheduled, Late, Running, Completed, Failed, Crashed or Cancelled
state_messagetext- What Prefect says about the state, such as the error
state_typetext- Its kind of state: SCHEDULED, PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CRASHED, CANCELLING or CANCELLED (a Late run is SCHEDULED)
tagslist- Its tags
work_pooltext- The work pool it runs in
Example output
{
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 133.518,
"end_time": "2026-01-31T06:02:17.630Z",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": true,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "2026-01-31T06:00:04.112Z",
"state": "Completed",
"state_message": "",
"state_type": "COMPLETED",
"tags": [
"finance"
],
"work_pool": "default-pool"
}Get flow run logs
Get a flow run's log, its last lines oldest first, with the last error it logged.
Inputs
- Flow run
flow_run_idtextRequired - The flow run's ID: pick a recent run, or use the id of an earlier step, such as Run deployment's.
- Lowest level
min_leveltext - Leave out lines below this level. Defaults to every line.One of:
debug,info,warning,error,critical. Default:debug. - How many lines
limitnumber - The most lines to get, the last ones, 1 to 1000. Defaults to 200.From 1 to 1000.
Outputs
countnumber- How many lines there are
errortext- The last line of the last error logged; empty if none
flow_run_idtext- The flow run's ID
lineslist- The log lines, oldest first
linktext- A link to the run in Prefect
logtext- The lines as text, one a line
truncatedtrue/false- Whether there may be earlier lines that were left out
Example output
{
"count": 2,
"error": "KeyError: 'date'",
"flow_run_id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"lines": [
{
"level": "INFO",
"logger": "prefect.flow_runs",
"message": "Beginning flow run 'venerable-beluga' for flow 'etl'",
"task_run_id": "",
"timestamp": "2026-01-31T06:00:04.200Z"
},
{
"level": "ERROR",
"logger": "prefect.flow_runs",
"message": "Finished in state Failed\nKeyError: 'date'",
"task_run_id": "",
"timestamp": "2026-01-31T06:02:17.600Z"
}
],
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"log": "2026-01-31T06:00:04.200Z INFO prefect.flow_runs: Beginning flow run 'venerable-beluga' for flow 'etl'\n2026-01-31T06:02:17.600Z ERROR prefect.flow_runs: Finished in state Failed\nKeyError: 'date'",
"truncated": false
}Get Variable
Get a Prefect Variable's value.
Inputs
- Variable
nametextRequired - The Variable's name, as Prefect lists it under Variables: lowercase letters, numbers, dashes and underscores.
Outputs
nametext- The Variable's name
tagslist- Its tags
updatedtext- When it was last changed (ISO 8601)
valueobject- Its value: text, a number, a switch, a list or an object
value_texttext- Its value as text: text as it is, anything else as JSON
Example output
{
"name": "last_loaded_date",
"tags": [],
"updated": "2026-01-31T06:02:17Z",
"value": "2026-01-30",
"value_text": "2026-01-30"
}List deployments
List deployments by name, with whether each is paused, its schedules, its default parameters and its work pool.
Inputs
- Name contains
searchtext - Only deployments whose name, or whose flow's name, has these letters, such as daily.
- Tags
tagslist - Only ones with all of these tags.
- Paused
pausedtext - Every deployment, only active ones or only paused ones.One of:
any,active,paused. Default:any. - Work pool
work_pooltext - Only deployments whose runs go to this work pool.
- How many
limitnumber - The most deployments to list, 1 to 200. Defaults to 25.From 1 to 200.
Outputs
countnumber- How many are listed
deploymentslist- The deployments, by name
Example output
{
"count": 1,
"deployments": [
{
"description": "Loads yesterday's orders",
"flow_name": "etl",
"full_name": "etl/daily",
"id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/deployments/deployment/14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"name": "daily",
"parameters": {
"date": null,
"full_refresh": false
},
"paused": false,
"schedules": [
"cron 0 6 * * * (UTC)"
],
"status": "READY",
"tags": [
"finance"
],
"updated": "2026-01-30T17:21:09Z",
"work_pool": "default-pool",
"work_queue": "default"
}
]
}List flow runs
List recent flow runs, the latest first, of every deployment or one, by state, tag and since when. Runs scheduled for later are listed only when you pick the Scheduled state.
Inputs
- Deployment
deploymenttext - Only runs of this deployment. Leave blank for every run.
- States
stateslist - Only runs in one of these states. Leave empty for all. A late run is Scheduled.One or more of:
SCHEDULED,PENDING,RUNNING,PAUSED,COMPLETED,FAILED,CRASHED,CANCELLING,CANCELLED. - Tags
tagslist - Only ones with all of these tags.
- Since
sincedate and time - Only runs due to start at or after this time.
- How many
limitnumber - The most runs to list, 1 to 200. Defaults to 25.From 1 to 200.
Outputs
countnumber- How many are listed
flow_runslist- The flow runs, the latest first
Example output
{
"count": 2,
"flow_runs": [
{
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 133.518,
"end_time": "2026-01-31T06:02:17.630Z",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": true,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "2026-01-31T06:00:04.112Z",
"state": "Completed",
"state_message": "",
"state_type": "COMPLETED",
"tags": [
"finance"
],
"work_pool": "default-pool"
},
{
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 133.518,
"end_time": "2026-01-31T06:02:17.630Z",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": true,
"flow_name": "etl",
"id": "3a2ec596-9d2c-4ee6-9ca3-316f0a38f6a6",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/3a2ec596-9d2c-4ee6-9ca3-316f0a38f6a6",
"name": "loutish-starling",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "2026-01-31T06:00:04.112Z",
"state": "Failed",
"state_message": "Flow run encountered an exception: KeyError: 'date'",
"state_type": "FAILED",
"tags": [
"finance"
],
"work_pool": "default-pool"
}
]
}List work pools
List work pools, with whether a worker is polling each (Ready) and whether it's paused.
Inputs
- How many
limitnumber - The most work pools to list, 1 to 200. Defaults to 25.From 1 to 200.
Outputs
countnumber- How many are listed
work_poolslist- The work pools, by name
Example output
{
"count": 1,
"work_pools": [
{
"concurrency_limit": "Unlimited",
"description": "",
"id": "e5748bdd-06da-43d2-8eed-a75313a58ca5",
"is_paused": false,
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/work-pools/work-pool/default-pool",
"name": "default-pool",
"status": "READY",
"type": "process"
}
]
}Pause deployment
Pause a deployment, so its schedules make no runs until it's resumed. Runs going now carry on, and it can still be run by hand.
Inputs
- Deployment
deploymenttextRequired - The deployment: pick one, or type its name as flow/deployment (such as etl/daily) or its ID.
Outputs
changedtrue/false- Whether it changed; false if it was already so
descriptiontext- Its description; empty if none
flow_nametext- The flow it runs
full_nametext- Its full name, flow/deployment, such as etl/daily
idtext- The deployment's ID
linktext- A link to the deployment in Prefect
nametext- The deployment's name
parametersobject- Its parameters, with what each is by default
pausedtrue/false- Whether it's paused, so its schedules make no runs
scheduleslist- Its schedules, such as cron 0 6 * * * (UTC)
statustext- READY when a worker is polling for its runs, else NOT_READY
tagslist- Its tags
updatedtext- When it was last changed (ISO 8601)
work_pooltext- The work pool its runs go to
work_queuetext- The work queue its runs go to
Example output
{
"changed": true,
"description": "Loads yesterday's orders",
"flow_name": "etl",
"full_name": "etl/daily",
"id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/deployments/deployment/14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"name": "daily",
"parameters": {
"date": null,
"full_refresh": false
},
"paused": true,
"schedules": [
"cron 0 6 * * * (UTC)"
],
"status": "READY",
"tags": [
"finance"
],
"updated": "2026-01-30T17:21:09Z",
"work_pool": "default-pool",
"work_queue": "default"
}Resume deployment
Resume a paused deployment, so its schedules make runs again.
Inputs
- Deployment
deploymenttextRequired - The deployment: pick one, or type its name as flow/deployment (such as etl/daily) or its ID.
Outputs
changedtrue/false- Whether it changed; false if it was already so
descriptiontext- Its description; empty if none
flow_nametext- The flow it runs
full_nametext- Its full name, flow/deployment, such as etl/daily
idtext- The deployment's ID
linktext- A link to the deployment in Prefect
nametext- The deployment's name
parametersobject- Its parameters, with what each is by default
pausedtrue/false- Whether it's paused, so its schedules make no runs
scheduleslist- Its schedules, such as cron 0 6 * * * (UTC)
statustext- READY when a worker is polling for its runs, else NOT_READY
tagslist- Its tags
updatedtext- When it was last changed (ISO 8601)
work_pooltext- The work pool its runs go to
work_queuetext- The work queue its runs go to
Example output
{
"changed": true,
"description": "Loads yesterday's orders",
"flow_name": "etl",
"full_name": "etl/daily",
"id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/deployments/deployment/14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"name": "daily",
"parameters": {
"date": null,
"full_refresh": false
},
"paused": false,
"schedules": [
"cron 0 6 * * * (UTC)"
],
"status": "READY",
"tags": [
"finance"
],
"updated": "2026-01-30T17:21:09Z",
"work_pool": "default-pool",
"work_queue": "default"
}Resume flow run
Resume a flow run that paused to wait for someone, such as for an approval. A run that isn't paused is left as it is.
Inputs
- Flow run
flow_run_idtextRequired - The flow run's ID: pick a recent run, or use the id of an earlier step, such as Run deployment's.
- Input
run_inputobject - What the run asks for when it pauses for input, such as {"approved": true}. Leave blank for a run that only waits to be resumed.
Outputs
changedtrue/false- Whether it changed; false if there was nothing to do
createdtext- When it was created (ISO 8601)
deployment_idtext- The ID of the deployment it was started from; empty if none
deployment_nametext- The deployment, as flow/deployment; empty if none
duration_secondsnumber- How long it has run, in seconds
end_timetext- When it finished (ISO 8601); empty until it does
expected_start_timetext- When it was due to start (ISO 8601)
finishedtrue/false- Whether it has completed, failed, crashed or been cancelled
flow_nametext- The flow it runs
idtext- The flow run's ID
linktext- A link to the run in Prefect
nametext- The run's name, such as venerable-beluga
parametersobject- The parameters it runs with
run_countnumber- How many times it has run, retries included
start_timetext- When it started (ISO 8601); empty until it does
statetext- Its state as Prefect shows it, such as Scheduled, Late, Running, Completed, Failed, Crashed or Cancelled
state_messagetext- What Prefect says about the state, such as the error
state_typetext- Its kind of state: SCHEDULED, PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CRASHED, CANCELLING or CANCELLED (a Late run is SCHEDULED)
tagslist- Its tags
work_pooltext- The work pool it runs in
Example output
{
"changed": true,
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 133.518,
"end_time": "",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": false,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "2026-01-31T06:00:04.112Z",
"state": "Running",
"state_message": "",
"state_type": "RUNNING",
"tags": [
"finance"
],
"work_pool": "default-pool"
}Retry flow run
Run a finished flow run of a deployment again with the same parameters, as Prefect's Retry button does, such as after fixing what made it fail.
Inputs
- Flow run
flow_run_idtextRequired - The flow run's ID: pick a recent run, or use the id of an earlier step, such as Run deployment's.
Outputs
createdtext- When it was created (ISO 8601)
deployment_idtext- The ID of the deployment it was started from; empty if none
deployment_nametext- The deployment, as flow/deployment; empty if none
duration_secondsnumber- How long it has run, in seconds
end_timetext- When it finished (ISO 8601); empty until it does
expected_start_timetext- When it was due to start (ISO 8601)
finishedtrue/false- Whether it has completed, failed, crashed or been cancelled
flow_nametext- The flow it runs
idtext- The flow run's ID
linktext- A link to the run in Prefect
nametext- The run's name, such as venerable-beluga
parametersobject- The parameters it runs with
run_countnumber- How many times it has run, retries included
start_timetext- When it started (ISO 8601); empty until it does
statetext- Its state as Prefect shows it, such as Scheduled, Late, Running, Completed, Failed, Crashed or Cancelled
state_messagetext- What Prefect says about the state, such as the error
state_typetext- Its kind of state: SCHEDULED, PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CRASHED, CANCELLING or CANCELLED (a Late run is SCHEDULED)
tagslist- Its tags
work_pooltext- The work pool it runs in
Example output
{
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 0.0,
"end_time": "",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": false,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "",
"state": "AwaitingRetry",
"state_message": "Retried from Lodol",
"state_type": "SCHEDULED",
"tags": [
"finance"
],
"work_pool": "default-pool"
}Run deployment
Start a run of a deployment with the parameters you give, now or at a set time, as Prefect's Run button does. It doesn't wait for the run: follow it with Wait for flow run or Get flow run.
Inputs
- Deployment
deploymenttextRequired - The deployment: pick one, or type its name as flow/deployment (such as etl/daily) or its ID.
- Parameters
parametersobject - What the run gets as its parameters, such as {"date": "2026-01-31"}. Leave blank for the deployment's defaults; the ones you give replace those.
- Run name
run_nametext - A name for the run. Leave blank for one Prefect makes up, such as venerable-beluga.
- Tags
tagslist - Tags to add to the run, besides the deployment's own.
- Start at
start_atdate and time - When to start it. Leave blank to start it now.
Outputs
createdtext- When it was created (ISO 8601)
deployment_idtext- The ID of the deployment it was started from; empty if none
deployment_nametext- The deployment, as flow/deployment; empty if none
duration_secondsnumber- How long it has run, in seconds
end_timetext- When it finished (ISO 8601); empty until it does
expected_start_timetext- When it was due to start (ISO 8601)
finishedtrue/false- Whether it has completed, failed, crashed or been cancelled
flow_nametext- The flow it runs
idtext- The flow run's ID
linktext- A link to the run in Prefect
nametext- The run's name, such as venerable-beluga
parametersobject- The parameters it runs with
run_countnumber- How many times it has run, retries included
start_timetext- When it started (ISO 8601); empty until it does
statetext- Its state as Prefect shows it, such as Scheduled, Late, Running, Completed, Failed, Crashed or Cancelled
state_messagetext- What Prefect says about the state, such as the error
state_typetext- Its kind of state: SCHEDULED, PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CRASHED, CANCELLING or CANCELLED (a Late run is SCHEDULED)
tagslist- Its tags
work_pooltext- The work pool it runs in
Example output
{
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 0.0,
"end_time": "",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": false,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 0,
"start_time": "",
"state": "Scheduled",
"state_message": "",
"state_type": "SCHEDULED",
"tags": [
"finance"
],
"work_pool": "default-pool"
}Set Variable
Set a Prefect Variable that flows read, such as a date to load from or a list of recipients, making it if there's none.
Inputs
- Variable
nametextRequired - The Variable's name, as Prefect lists it under Variables: lowercase letters, numbers, dashes and underscores.
- Value
valuetextRequired - What to set it to. A JSON object or list, such as ["a", "b"], is saved as one; anything else as text.
- Tags
tagslist - Tags for it. Leave empty to keep the ones it has.
Outputs
createdtrue/false- Whether it was made, there being none with that name
nametext- The Variable's name
tagslist- Its tags
updatedtext- When it was last changed (ISO 8601)
valueobject- Its value: text, a number, a switch, a list or an object
value_texttext- Its value as text: text as it is, anything else as JSON
Example output
{
"created": false,
"name": "last_loaded_date",
"tags": [],
"updated": "2026-01-31T06:02:17Z",
"value": "2026-01-30",
"value_text": "2026-01-30"
}Wait for flow run
Wait until a flow run finishes (completes, fails, crashes or is cancelled) or pauses for someone, up to 15 minutes, then get it. A run still going when the wait is up carries on in Prefect.
Inputs
- Flow run
flow_run_idtextRequired - The flow run's ID: pick a recent run, or use the id of an earlier step, such as Run deployment's.
- Wait up to (minutes)
max_wait_minutesnumber - How long to wait, 1 to 15 minutes. Defaults to 5.From 1 to 15.
Outputs
createdtext- When it was created (ISO 8601)
deployment_idtext- The ID of the deployment it was started from; empty if none
deployment_nametext- The deployment, as flow/deployment; empty if none
duration_secondsnumber- How long it has run, in seconds
end_timetext- When it finished (ISO 8601); empty until it does
expected_start_timetext- When it was due to start (ISO 8601)
finishedtrue/false- Whether it has completed, failed, crashed or been cancelled
flow_nametext- The flow it runs
idtext- The flow run's ID
linktext- A link to the run in Prefect
nametext- The run's name, such as venerable-beluga
parametersobject- The parameters it runs with
run_countnumber- How many times it has run, retries included
start_timetext- When it started (ISO 8601); empty until it does
statetext- Its state as Prefect shows it, such as Scheduled, Late, Running, Completed, Failed, Crashed or Cancelled
state_messagetext- What Prefect says about the state, such as the error
state_typetext- Its kind of state: SCHEDULED, PENDING, RUNNING, PAUSED, COMPLETED, FAILED, CRASHED, CANCELLING or CANCELLED (a Late run is SCHEDULED)
tagslist- Its tags
timed_outtrue/false- Whether the wait ran out before the run finished or paused
waited_secondsnumber- How long the step waited, in seconds
work_pooltext- The work pool it runs in
Example output
{
"created": "2026-01-31T05:59:58.004Z",
"deployment_id": "14dee1f4-2cdf-4402-aa03-14cf5f4470d1",
"deployment_name": "etl/daily",
"duration_seconds": 133.518,
"end_time": "2026-01-31T06:02:17.630Z",
"expected_start_time": "2026-01-31T06:00:00Z",
"finished": true,
"flow_name": "etl",
"id": "8a1fb3da-6472-4344-be1a-f348ac2122b5",
"link": "https://app.prefect.cloud/account/9b4c7f4e-2f6b-4a52-9d7d-1f3a2c4b5d6e/workspace/0f1e2d3c-4b5a-6978-8a9b-0c1d2e3f4a5b/runs/flow-run/8a1fb3da-6472-4344-be1a-f348ac2122b5",
"name": "venerable-beluga",
"parameters": {
"date": "2026-01-30",
"full_refresh": false
},
"run_count": 1,
"start_time": "2026-01-31T06:00:04.112Z",
"state": "Completed",
"state_message": "",
"state_type": "COMPLETED",
"tags": [
"finance"
],
"timed_out": false,
"waited_seconds": 135,
"work_pool": "default-pool"
}