{
  "version": 0,
  "entry": "transcribe",
  "blocks": {
    "transcribe": {
      "type": "prForAllItemsInBin",
      "inputs": {
        "itemVar": "clip",
        "onlySelected": true,
        "includeSubbins": false,
        "types": [
          "TYPE_FOOTAGE"
        ]
      },
      "body": [
        {
          "type": "prTranscribeClipProjectItem",
          "inputs": {
            "item": {
              "var": "clip"
            },
            "onError": "STOP",
            "storeResultIn": "ok",
            "storeOutcomeIn": "outcome"
          }
        },
        {
          "type": "if",
          "inputs": {
            "branches": [
              {
                "condition": {
                  "var": "ok"
                },
                "body": [
                  {
                    "type": "setVar",
                    "inputs": {
                      "name": "hasTranscript",
                      "value": {
                        "type": "prGetProjectItemProperty",
                        "inputs": {
                          "item": {
                            "var": "clip"
                          },
                          "property": "HAS_TRANSCRIPT"
                        }
                      }
                    }
                  },
                  {
                    "type": "setVar",
                    "inputs": {
                      "name": "transcriptJson",
                      "value": {
                        "type": "prExportTranscriptJson",
                        "inputs": {
                          "item": {
                            "var": "clip"
                          }
                        }
                      }
                    }
                  },
                  {
                    "type": "esConsoleLog",
                    "inputs": {
                      "message": {
                        "type": "textJoin",
                        "inputs": {
                          "items": [
                            "TRANSCRIPT|item=",
                            {
                              "var": "clip"
                            },
                            "|outcome=",
                            {
                              "var": "outcome"
                            },
                            "|hasTranscript=",
                            {
                              "var": "hasTranscript"
                            },
                            "|contentNeedsReview=true"
                          ]
                        }
                      }
                    }
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  }
}
