{
  "name": "Canva Integration",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "process-canva",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        100,
        300
      ]
    },
    {
      "parameters": {
        "url": "={{ $json.body.url }}",
        "options": {
          "allowUnauthorizedCerts": true
        }
      },
      "id": "fetch-page",
      "name": "Fetch Canva Page",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        300,
        300
      ]
    },
    {
      "parameters": {
        "dataPropertyName": "data",
        "extractionValues": {
          "values": [
            {
              "key": "ogImage",
              "cssSelector": "meta[property=\"og:image\"]",
              "returnValue": "attribute",
              "attribute": "content"
            }
          ]
        },
        "options": {}
      },
      "id": "extract-image",
      "name": "Extract Image URL",
      "type": "n8n-nodes-base.htmlExtract",
      "typeVersion": 1,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "boolean": [
            {
              "name": "success",
              "value": true
            }
          ],
          "string": [
            {
              "name": "imageUrl",
              "value": "={{ $json.ogImage }}"
            }
          ]
        },
        "options": {}
      },
      "id": "format-response",
      "name": "Format Response",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        700,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Fetch Canva Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Canva Page": {
      "main": [
        [
          {
            "node": "Extract Image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Image URL": {
      "main": [
        [
          {
            "node": "Format Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}