Temporal CLI Json Input Error

Hi, when running through the course, in exercise 1, we’re directed to run:

temporal workflow start --type SayHelloWorkflow --task-queue greeting-tasks --workflow-id my-first-workflow --input '"World"'

When I do this, however, I get the following error back
time=2025-04-22T11:11:18.545 level=ERROR msg="input #1 is not valid JSON"

I’ve tried a series of different inputs like '{"World"}' but continue to get the same error.

I’m running on Windows, temporal version 1.3.0 (Server 1.27.1, UI 2.36.0)

Hello,

Sorry about that. You’ll need to escape the strings. We have this section in the course, but it’s not in the code repo. We’ll be adding instructions to the code repos as well, but here’s the instruction.

Using the CLI to Start a Workflow with Windows

The mix of single and double quotes we currently have pertains to UNIX-style shells. However, If you are running the Temporal CLI in Windows (such as Powershell), you will need to use Windows-style quote escaping like this:

temporal workflow start --type GreetSomeone --task-queue greeting-tasks --workflow-id my-first-workflow --input '\"Donna\"'

This is a general Windows approach for handling quotes in parameters, not something specific to Temporal.

thank you! That worked