{
  "name": "Automated image optimizer: convert JPG/PNG to WebP with APYHub and Google Drive",
  "nodes": [
    {
      "id": "09977b8b-e095-4419-b136-bcbadf0f5d84",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -320,
        -20
      ]
    },
    {
      "id": "55c01841-9576-4663-bb24-c9e0082ecab5",
      "name": "Set API KEY",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        -20
      ]
    },
    {
      "id": "2d50e290-a861-4575-abbc-7f311d1934bb",
      "name": "Get images",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        380,
        -20
      ]
    },
    {
      "id": "b3c5d64c-0e2a-472b-83f7-91cabd4d1646",
      "name": "Get extension",
      "type": "n8n-nodes-base.code",
      "position": [
        660,
        -20
      ]
    },
    {
      "id": "e281cd63-79d1-4ca3-88c0-81aaa7e0dbe8",
      "name": "JPG or PNG?",
      "type": "n8n-nodes-base.switch",
      "position": [
        -320,
        460
      ]
    },
    {
      "id": "f3257837-88e0-4f5f-bbd5-5c63c5ba4ed1",
      "name": "From JPG to WEBP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -100,
        320
      ]
    },
    {
      "id": "de1198c3-17a2-4b45-a334-6334b2b935c4",
      "name": "PNG to WEBP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -100,
        580
      ]
    },
    {
      "id": "38b46480-c089-4bca-88ac-7f006c12d3b9",
      "name": "Update Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        440
      ]
    },
    {
      "id": "2dc29c73-efcb-4bef-8d9a-5a1914df62ad",
      "name": "Get file image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        440
      ]
    },
    {
      "id": "acee7120-ceb4-472e-a941-066056da5cd6",
      "name": "Upload image",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        700,
        440
      ]
    },
    {
      "id": "0a491e7b-2482-429e-9901-cb2bf3d34509",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -520
      ],
      "parameters": {
        "width": 800,
        "height": 200,
        "content": "## Convert image from jpg/png to webp\n\nThis workflow automates the process of converting images from **JPG/PNG** format to **WEBP** using the **APYHub API**. It retrieves image URLs from a **Google Sh"
      }
    },
    {
      "id": "78a198c4-449f-4a68-96e4-20ecd044fe1f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -280
      ],
      "parameters": {
        "width": 800,
        "height": 120,
        "content": "## PRELIMINARY STEP\n- Get your FREE API KEY from [APYHub](https://apyhub.com//)\n- Clone [this sheet](https://docs.google.com/spreadsheets/d/1upj3EDLwU1N7NHWWV3DhwMuE6ty39tIK5z5lCVDWWuM/edit?usp=sharin"
      }
    }
  ],
  "connections": {
    "Get images": {
      "main": [
        [
          {
            "node": "Get extension",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JPG or PNG?": {
      "main": [
        [
          {
            "node": "From JPG to WEBP",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "From JPG to WEBP",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PNG to WEBP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PNG to WEBP": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API KEY": {
      "main": [
        [
          {
            "node": "Get images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet": {
      "main": [
        [
          {
            "node": "Get file image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get extension": {
      "main": [
        [
          {
            "node": "JPG or PNG?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get file image": {
      "main": [
        [
          {
            "node": "Upload image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "From JPG to WEBP": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Set API KEY",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}