Custom Workflows

workflow run

Execute a custom workflow definition. Accepts JSON from a file or stdin. The command starts the workflow and waits for it to complete. While it waits, it writes the workflow ID and status to stderr as progress (hidden by --quiet); at the end it prints {"success": true, "data": …} with the whole workflow completion in data. If waiting times out, it exits with code 8 and an error that names the workflowId, so you can continue with linkedin workflow status <id> --wait.

Calls POST /workflows – what each option means, the result fields and the errors are described there.

bash
linkedin workflow run [flags]
FlagTypeDescription
-f / --filestringPath to workflow JSON file
bash
# From file
linkedin workflow run --file workflow.json

# From stdin
cat workflow.json | linkedin workflow run

# Inline
echo '{"actionType": "st.openPersonPage", "personUrl": "https://www.linkedin.com/in/person1", "basicInfo": true}' | linkedin workflow run

The definition is the request body of POST /workflows: one action object, or an array of actions that run one after another. See Building Workflows for the schema.

workflow status

Check status of a running workflow or wait for its completion. In-progress responses include status (pending or running) and message.

Reads GET /workflows/{workflowId} – what each option means, the result fields and the errors are described there.

bash
linkedin workflow status <id> [flags]
ArgRequiredDescription
idyesWorkflow ID
FlagTypeDescription
--waitbooleanBlock until the workflow completes
bash
# Check current status
linkedin workflow status abc123

# Wait for completion
linkedin workflow status abc123 --wait --json