Render Tutorials
Stock research that survives a closed browser

Create and test the Workflow

⏱ 7 min

The code is on GitHub. Your web service still needs a Workflow service that runs those tasks, plus env vars so the web API can start the root task.

A Workflow service is separate from a web service. Blueprints do not create Workflows yet, so you create this one manually.

1. Create the Workflow service

Your web service is already in the project. Leave it running. Add a Workflow next to it from + New.

Follow Create a workflow service if any Dashboard labels differ.

  1. New → Workflow In your project, click + NewWorkflow.
Render Dashboard project overview with the + New menu open and Workflow highlighted.
+ New → Workflow (Beta). Keep the existing web service running.
  1. Choose My own workflow On the New Workflow page, select My own workflow (not Example workflow).
New Workflow page with My own workflow selected and a GitHub repository list.
My own workflow → pick your fork from Git Provider.
  1. Connect the same fork Under Git Provider, select your stock-research-agent-starter fork (same repo as the web service).
  2. Fill the form

    Confirm at least:

    FieldValue
    Namee.g. stock-research-workflows (or keep the default)
    Projectyour username-renderatl-workshop project
    LanguageNode
    Branchmain
    Start Commandnpm run workflow:start

    Leave Root Directory empty unless you changed the repo layout.

New Workflow form showing My own workflow, connected GitHub fork, Node language, and main branch.
Same fork as the web service. Language Node. Branch main.
  1. Create Create the service and wait until it is ready (not failed).

After you pushed in the previous step, Auto-Deploy should rebuild the web service too. That deploy can fail or return 500 until the env vars below are set. That is expected.

2. Copy the Workflow slug

On the Workflow service overview, find Workflow Slug and copy it. That value alone is WORKFLOW_SERVICE_SLUG.

Workflow service overview with Workflow Slug highlighted in a red box.
Copy Workflow Slug only. Example: stock-research-agent-starter-1. Not slug/researchStock.

3. Confirm the tasks and run the root once

  1. Open Tasks Open the Workflow service → Tasks.
  2. Confirm six names Confirm six names are listed: researchStock (root) plus loadCompanyFacts, collectSignals, identifyCatalysts, identifyRisks, and writeMemo.
Workflow service overview showing Workflow Slug and six registered tasks: collectSignals, identifyCatalysts, identifyRisks, loadCompanyFacts, researchStock, and writeMemo.
Tasks lists six names after a good deploy. Note the Workflow Slug at the top; start only researchStock.
  1. Start the root task Click the root task researchStockStart Task. (Do not start the step tasks by hand for this tutorial.)
  2. Set the payload

    For the payload, use a JSON array with one string (ticker case does not matter):

    ["NVDA"]
  3. Start task Click Start task.
Start Task modal for researchStock with JSON payload ["nvda"] ready to run.
Tasks → researchStock (root) → Start Task. Payload is a JSON array, for example ["NVDA"].
  1. Wait for success Wait until status is Succeeded / Completed.
  2. Open the run Open the run. You should see memo fields in the output (company, signals, catalysts, risks, summary). Child step runs may also appear under the root; the memo is still the root result.
Succeeded researchStock root run showing child step tasks loadCompanyFacts, identifyCatalysts, collectSignals, identifyRisks, and writeMemo on the timeline, with memo output in Run details.
Succeeded root run: step tasks appear under researchStock; the memo is still the root Output.

If Tasks is empty or you see fewer than six names: open Logs. You should not see the old placeholder line about no tasks registered yet. After a good deploy you should see a log that lists the six registered task names. Redeploy after confirming GitHub has the multi-task(...) file. Confirm Start Command is exactly npm run workflow:start.

4. Point the web service at the Workflow

  1. Create an API key Dashboard → your avatar → Account SettingsAPI Keys → create a key. Copy it once.
Create API Key modal with a name filled in and Create API Key button.
Account Settings → API Keys → create a key. Name it anything memorable, then copy it once.
  1. Open the web service env Open your web service (not the Workflow) → Environment.
  2. Add two variables
    KeyValue
    RENDER_API_KEYthe API key you just created
    WORKFLOW_SERVICE_SLUGthe Workflow Slug you copied above (slug only, not slug/researchStock)
  3. Save Save. Wait for the web service to redeploy.
Web service Environment page with RENDER_API_KEY and WORKFLOW_SERVICE_SLUG set.
On the web service Environment, set RENDER_API_KEY and WORKFLOW_SERVICE_SLUG (slug only).

Revoke the key when you finish the tutorial. Do not commit it to GitHub.

5. Confirm POST returns a task-run ID

Terminal window
curl -s -X POST https://YOUR-WEB-SERVICE.onrender.com/api/research \
-H 'content-type: application/json' \
-d '{"ticker":"NVDA"}'

Expected: JSON with taskRunId (and statusUrl) within a couple of seconds. That ID is for the root researchStock run. Not the full memo.

If you get 500 / auth errors: confirm RENDER_API_KEY and WORKFLOW_SERVICE_SLUG are on the web service, then redeploy.

Troubleshooting

Input format errors. The root task takes one string argument. Send ["NVDA"], not NVDA or {"ticker":"NVDA"}.

Run fails in logs. Confirm data/mock-stocks.json is in the repo and the ticker is NVDA, AAPL, or MSFT.

Wrong repo connected. The Workflow must use the same fork you pushed workflows.ts to.

Still seeing the placeholder. Logs should list several registered tasks (root plus step tasks), not a “no tasks registered” placeholder. Confirm main has the full multi-task workflows.ts.

What you learned

  • Several Workflow tasks registered; you ran the root once
  • Web service env set; POST returns one root taskRunId
  • Next: close the tab mid-run and recover the memo