{
  "name": "Blumify — transcribe privately with an API token",
  "nodes": [
    {
      "parameters": {},
      "id": "6c2f0d1e-2a1b-4c3d-8e9f-0a1b2c3d4e01",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://blumify.io/api/media/v1/me/transcripts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"url\": \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"}",
        "options": { "timeout": 60000 }
      },
      "id": "6c2f0d1e-2a1b-4c3d-8e9f-0a1b2c3d4e02",
      "name": "Blumify: start transcript",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [240, 0],
      "notes": "Credential: Header Auth, Name = Authorization, Value = Bearer blm_… (create the token in blumify.io → Workspace → Connected apps, with “Read + spend credits”). Put your link in the JSON body."
    },
    {
      "parameters": {
        "conditions": {
          "string": [{ "value1": "={{ $json.jobId }}", "operation": "isNotEmpty" }]
        }
      },
      "id": "6c2f0d1e-2a1b-4c3d-8e9f-0a1b2c3d4e03",
      "name": "Started a job?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [480, 0]
    },
    {
      "parameters": {
        "url": "=https://blumify.io/api/media/v1/me/jobs/{{ $('Blumify: start transcript').item.json.jobId }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": { "parameters": [{ "name": "wait", "value": "50" }] },
        "options": { "timeout": 70000 }
      },
      "id": "6c2f0d1e-2a1b-4c3d-8e9f-0a1b2c3d4e04",
      "name": "Blumify: wait for the job",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [720, -120]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            { "value1": "={{ $json.state }}", "operation": "regex", "value2": "^(succeeded|failed|cancelled|expired)$" }
          ]
        }
      },
      "id": "6c2f0d1e-2a1b-4c3d-8e9f-0a1b2c3d4e05",
      "name": "Done?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [960, -120]
    },
    {
      "parameters": {
        "url": "=https://blumify.io/api/media/v1/me/transcripts/{{ $('Blumify: start transcript').item.json.key }}/export",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": { "parameters": [{ "name": "format", "value": "md" }] },
        "options": { "response": { "response": { "responseFormat": "text", "outputPropertyName": "markdown" } } }
      },
      "id": "6c2f0d1e-2a1b-4c3d-8e9f-0a1b2c3d4e06",
      "name": "Blumify: export Markdown",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1200, 0],
      "notes": "The notes, chapters and the full transcript as Markdown in `markdown`. Other formats: txt, srt, vtt, json."
    }
  ],
  "connections": {
    "When clicking ‘Execute workflow’": {
      "main": [[{ "node": "Blumify: start transcript", "type": "main", "index": 0 }]]
    },
    "Blumify: start transcript": {
      "main": [[{ "node": "Started a job?", "type": "main", "index": 0 }]]
    },
    "Started a job?": {
      "main": [
        [{ "node": "Blumify: wait for the job", "type": "main", "index": 0 }],
        [{ "node": "Blumify: export Markdown", "type": "main", "index": 0 }]
      ]
    },
    "Blumify: wait for the job": {
      "main": [[{ "node": "Done?", "type": "main", "index": 0 }]]
    },
    "Done?": {
      "main": [
        [{ "node": "Blumify: export Markdown", "type": "main", "index": 0 }],
        [{ "node": "Blumify: wait for the job", "type": "main", "index": 0 }]
      ]
    }
  },
  "settings": { "executionOrder": "v1" },
  "meta": { "templateCredsSetupCompleted": false }
}
