{
  "name": "Content summarizer via Webhook (ApyHub)",
  "nodes": [
    {
      "id": "ee098e2b-3cfa-4c0c-9ad7-caf1fd4abe74",
      "name": "Note for Webhook Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        240
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "This node listens for incoming POST requests. It expects a JSON body with a 'content' property (the text to summarize) and a 'summary_length' (optional, e.g., 'short', 'medium', 'long'). Your 'apy-tok"
      }
    },
    {
      "id": "dca324db-c26d-400a-bab9-e3200f78407c",
      "name": "Note for Start Summarization Job",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        240
      ],
      "parameters": {
        "width": 260,
        "height": 340,
        "content": "This node sends a POST request to ApyHub's summarization API. It passes the 'content' from the webhook body and your 'apy-token' from the headers. It initiates the summarization job and returns a 'job"
      }
    },
    {
      "id": "325504c9-8c6e-4b6a-9479-88bd85ca92a9",
      "name": "Note for Get Summarization Result",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        240
      ],
      "parameters": {
        "width": 260,
        "height": 340,
        "content": "This node polls ApyHub's API using the 'job_id' to check the status of the summarization. Once the status is 'finished', it retrieves the summarized content. This ensures you get the result only when "
      }
    },
    {
      "id": "fd5bf412-b7b4-4b36-b1d4-71f2bc2012ce",
      "name": "Note for Webhook Response",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        240
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "This node sends the final summarized text back to the original caller of the webhook. You can insert other nodes before this to store, share, or further process the summarized content."
      }
    },
    {
      "id": "cbf7a742-47c7-4a9e-8803-36a428097750",
      "name": "Start Summarization Job",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        300,
        420
      ]
    },
    {
      "id": "d1fb7874-f72c-4298-a95f-04ea3c75bcc2",
      "name": "Receive Content Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -20,
        420
      ]
    },
    {
      "id": "5d70b7ab-ff27-4a21-a976-718466b5dd17",
      "name": "Respond with Summarized Content",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        900,
        420
      ]
    },
    {
      "id": "2faf0d84-3195-479c-9843-fbdcedf3d419",
      "name": "Get Summarization Result",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        600,
        420
      ]
    }
  ],
  "connections": {
    "Receive Content Webhook": {
      "main": [
        [
          {
            "node": "Start Summarization Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Summarization Job": {
      "main": [
        [
          {
            "node": "Get Summarization Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Summarization Result": {
      "main": [
        [
          {
            "node": "Respond with Summarized Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}