{
  "name": "Transcript to Blog Post",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "transcript-to-blog",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "ttb0001-0001-4000-8000-000000000001",
      "name": "Receive Transcript Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [240, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "transcript",
              "value": "={{ $json.body.transcript }}",
              "type": "string"
            },
            {
              "name": "title",
              "value": "={{ $json.body.title || 'Untitled' }}",
              "type": "string"
            },
            {
              "name": "tone",
              "value": "={{ $json.body.tone || 'professional' }}",
              "type": "string"
            }
          ]
        }
      },
      "id": "ttb0001-0002-4000-8000-000000000002",
      "name": "Prepare Input",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [460, 300]
    },
    {
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list"
        },
        "messages": {
          "values": [
            {
              "content": "You are a professional content writer. Convert the following transcript into a well-structured blog post with a compelling introduction, 3-4 main sections with headers, and a conclusion. Use a {{ $json.tone }} tone.\n\nTitle: {{ $json.title }}\n\nTranscript:\n{{ $json.transcript }}\n\nFormat the output in Markdown."
            }
          ]
        },
        "options": {
          "temperature": 0.7,
          "maxTokens": 2000
        }
      },
      "id": "ttb0001-0003-4000-8000-000000000003",
      "name": "Generate Blog Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [680, 300]
    },
    {
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list"
        },
        "messages": {
          "values": [
            {
              "content": "Generate 5 SEO-friendly tags for this blog post. Return only a comma-separated list of tags.\n\n{{ $json.message.content }}"
            }
          ]
        },
        "options": {
          "temperature": 0.3
        }
      },
      "id": "ttb0001-0004-4000-8000-000000000004",
      "name": "Generate SEO Tags",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [900, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "blogPost",
              "value": "={{ $('Generate Blog Post').item.json.message.content }}",
              "type": "string"
            },
            {
              "name": "seoTags",
              "value": "={{ $json.message.content }}",
              "type": "string"
            },
            {
              "name": "title",
              "value": "={{ $('Prepare Input').item.json.title }}",
              "type": "string"
            }
          ]
        }
      },
      "id": "ttb0001-0005-4000-8000-000000000005",
      "name": "Assemble Output",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [1120, 300]
    }
  ],
  "connections": {
    "Receive Transcript Webhook": {
      "main": [[{ "node": "Prepare Input", "type": "main", "index": 0 }]]
    },
    "Prepare Input": {
      "main": [[{ "node": "Generate Blog Post", "type": "main", "index": 0 }]]
    },
    "Generate Blog Post": {
      "main": [[{ "node": "Generate SEO Tags", "type": "main", "index": 0 }]]
    },
    "Generate SEO Tags": {
      "main": [[{ "node": "Assemble Output", "type": "main", "index": 0 }]]
    }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "meta": {},
  "pinData": {}
}
