Your First Workflow
Register and run your first task.
Render Workflows are in limited early access.
During the early access period, the Workflows API and SDK might introduce breaking changes.
Welcome to Render Workflows! After early access is enabled for your workspace, follow these steps to register your first task and run it.
1. Clone the Python template
Workflows currently only support Python for defining tasks.
SDKs for other languages are coming soon.
As part of creating a workflow, you'll link a GitHub/GitLab/Bitbucket repo that contains your task definitions.
To get started quickly, copy our basic Python template on GitHub. On the template page, click Use this template > Create a new repository to create your own repo with the template's contents.
The anatomy of a workflow
Let's look at an excerpt from the template's main.py
file:
This excerpt shows the bare minimum syntax for defining a workflow:
- You define a task by applying the
@task
decorator to any function. - You call the
start
function on startup to initiate task registration and execution.
Both @task
and start
are imported from the Workflows SDK for Python, which is the template's only dependency.
2. Create a workflow service
-
In the Render Dashboard, click New > Workflow:
The workflow creation form appears.
Don't see the Workflow service type?
Make sure you're in a workspace that has received early access to Render Workflows. Request early access at render.com/workflows.
-
Link the GitHub/GitLab/Bitbucket repo with your workflow's task definitions.
-
Complete the remainder of the creation form. See guidance for important fields:
Field Description Language
Currently, this is always Python 3. Support for other languages is coming soon.
Region
Your workflow's tasks will run on instances in the specified region.
This determines which of your other Render services they can reach over your private network.
Build Command
If you're using the Python example template, this is the following:
Otherwise, provide the command that Render should use to build your workflow.
Start Command
If you're using the Python example template, this is the following:
Otherwise, provide the command that Render should use to start your workflow.
-
Click Deploy Workflow. Render kicks off your workflow's first build, which includes registering your tasks.
That's it! After the build completes, your tasks are officially registered. You can view them from your workflow's Tasks page in the Render Dashboard:
3. Execute a task
Now that we have a registered task, let's run it! The quickest way to trigger our first run is from the Render Dashboard:
-
From your workflow's Tasks page, click a task to open its Runs page.
-
Click Run Task in the top-right corner of the page:
A dialog appears for providing the task's input arguments:
-
Provide the task's input arguments as a JSON array (e.g.,
[5]
for a task that takes a single integer argument, or[]
for a task that takes zero arguments). -
Click Start task.
Your new task run appears at the top of the Runs table.
Next steps
Congratulations! You've registered and run your first workflow task. Now it's time to start designing your own tasks and running them from application code:
- Define advanced tasks with retries, subtasks, and more.
- Run your registered tasks from application code.
- Test task runs locally for faster development.