Last build step. Create the Render Workflow that runs tasks/ from your fork, set WORKFLOW_SERVICE_SLUG on the web service, then verify end-to-end.
Up to this point, we called this the “second service.” In Render’s product UI and docs, it is named a Workflow service.
You should already have:
searchOneintask()andtasks/src/index.ts(Workflow entrypoint).research.tsusingstartTask+getTaskRun(dispatch from web).- Web service redeployed with workflow dispatch code.
Push latest code
Push your workshop-demo fork to GitHub. The Workflow builds from the tasks/ directory in that repo.
$git push origin mainEverything up-to-date
Open New Workflow
In the Render Dashboard:
- Click New (top right) → Workflow.
- You land on New Workflow (Beta). Use Read docs if you want the platform overview first.
Connect Source Code to your fork of workshop-demo (the same repo as your web service). If the wrong repo is selected, click Edit and reconnect.
Fill the form (top to bottom)
Work through the page in order. Render blocks Deploy Workflow until required fields pass validation (you may see There are errors above. Please fix them to continue.).
| Section / field | What to set |
|---|---|
| Name | A unique name, e.g. ticker-research-workflows. Render derives the workflow slug from this. |
| Description | Optional. Skip for now. |
| Project | Optional. Skip, or Create a project if you want the web service and Workflow grouped together. |
| Language | Node |
| Branch | main (or your default branch) |
| Auto-Deploy | On Commit (default). With Root Directory set to tasks, only commits that touch tasks/ trigger a Workflow redeploy. |
| Region | Same region as your web service (e.g. Oregon (US West)). Services in the same region can use Render’s private network. |
| Root Directory | tasks. Use the folder name directly. Render runs build/start from this folder. Workflow auto-deploy triggers when files under tasks/ change. |
| Build Command | npm install; npm run build |
| Start Command | npm run start (required). An empty start command keeps Deploy Workflow disabled with Start command is required. |
Environment Variables (same page)
Scroll to Environment Variables before you deploy:
- Click Add Environment Variable.
- Key:
EXA_API_KEY. Value: your key from the Exa dashboard. - You can also use Add from .env if you have a local
.envintasks/.
searchOne runs Exa inside the Workflow process. After this deploy works, remove EXA_API_KEY from the web service if it is still set from the baseline.
Retries, timeout, and instance plan for searchOne come from your task() config in code (step Register searchOne with retries).
Advanced
Under Advanced, leave Guaranteed Warm Start Disabled unless you want a always-on instance (+$25/month). The tutorial does not need it.
Deploy Workflow
- Confirm Start Command is filled in and Root Directory is
tasks. - Click Deploy Workflow.
- First build takes a couple of minutes. Open Logs or Events on the new service until status is Live.
If deploy fails, check Logs for a bad root directory, a failed npm run build, or a missing import in tasks/src/index.ts.
Confirm tasks registered
After the deploy is Live:
- Open the Workflow service in the Dashboard.
- Go to the Tasks tab.
- Confirm
searchOneappears in the list. - Click
searchOne. At the top you should see the task identifier asyour-workflow-slug/searchOne. That slug prefix is whatstartTaskexpects.
Copy the workflow slug
- Open the Workflow service Settings tab.
- Copy the workflow slug (derived from Name, e.g.
ticker-research-workflowsorticker-research-workflows-aBc1XyZif Render added a suffix).
This must match WORKFLOW_SERVICE_SLUG on the web service exactly.
Wire the web service
On your web service:
- Open Environment Web service → Environment tab.
- Set WORKFLOW_SERVICE_SLUG Paste the slug from the Workflow Settings tab. No trailing slash.
- Confirm RENDER_API_KEY and ANTHROPIC_API_KEY Both must be set. The web service uses the API key to start runs and Anthropic for memo synthesis.
- Save and redeploy Save, rebuild, and deploy, or Manual Deploy → deploy latest commit.
| Variable | Service | Purpose |
|---|---|---|
WORKFLOW_SERVICE_SLUG | Web | Prefix for startTask (slug/searchOne) |
RENDER_API_KEY | Web | Authorize Workflow API calls |
ANTHROPIC_API_KEY | Web | Stream the memo after searches finish |
EXA_API_KEY | Workflow | Exa calls inside searchOne |
Verify end-to-end
- Open your web URL.
- Query
TSLA. - All four search cards reach Done.
- On the Workflow service, open Runs → filter or click
searchOne. You should see four runs per query, with retries whenmaybeFailfires. - The memo streams and completes.
Dashboard stuck but Runs show completed: the web service is still polling. That usually means WORKFLOW_SERVICE_SLUG does not match the slug in Settings, or the web service was not redeployed after you set it.
Optional debug before the full UI: on the Workflow service, use Run manually for searchOne with JSON args:
["TSLA", { "query": "TSLA stock news", "label": "News" }, 0]Adjust the middle object to match a real SearchSpec from your code. A succeeded run here means the Workflow service is healthy; if the UI still fails, debug the web service env vars and dispatch code.
Redeploy after Workflow code changes
When you change files under tasks/:
- Push to your fork (auto-deploy runs if Auto-Deploy is On Commit).
- Or on the Workflow service: Manual Deploy → deploy latest commit.
- After the deploy finishes, check Tasks again if you added or renamed a task.
Reuse the same Workflow for routine code changes. Keep the same slug and WORKFLOW_SERVICE_SLUG.
What you learned
- New Workflow form: connect your fork, set Root Directory to tasks, fill Start Command, add EXA_API_KEY before Deploy Workflow
- Match Region to your web service; Auto-Deploy On Commit only redeploys when tasks/ changes
- Copy the workflow slug from Settings and set WORKFLOW_SERVICE_SLUG on the web service
- Tasks tab confirms searchOne; Runs tab shows retries