$ cat node-template.py

Workspace Picker

// Selects a workspace to reference. Outputs the workspace ID for use with Workspace Break nodes.

Input
Utility
template.py
1import json2import sys345def main():6    """Pass through workspace ID from input to output."""7    try:8        raw = json.loads(sys.stdin.read())9        inputs = raw.get("inputs", {})10        workspace_id = inputs.get("workspaceId")1112        if not workspace_id:13            print(json.dumps({"error": "No workspace selected"}), file=sys.stderr)14            sys.exit(1)1516        print(json.dumps({"workspace": workspace_id}))1718    except Exception as e:19        print(json.dumps({20            "error": str(e),21            "errorType": type(e).__name__,22        }), file=sys.stderr)23        sys.exit(1)242526if __name__ == "__main__":27    main()