{
  "name": "Generate graphic wallpaper with Midjourney, GPT-4o-mini and Canvas APIs",
  "nodes": [
    {
      "id": "11cef766-dd10-46ea-98cf-11eb8d95e157",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        80
      ],
      "parameters": {
        "width": 520,
        "height": 200,
        "content": "## Generate Graphic Wallpaper with Midjourney, GPT-4o-mini and Canvas APIs\nWe design this workflow with PiAPI APIs and Canvas API with the purpose to  produce a visually compelling image with resonant"
      }
    },
    {
      "id": "ba7143d7-442d-4153-9cfd-bb36448d4c91",
      "name": "Midjourney Generator",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1200,
        320
      ]
    },
    {
      "id": "117b5929-e98c-456a-9bfd-fe1deee77abc",
      "name": "When clicking Test workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        300,
        320
      ]
    },
    {
      "id": "dfcf5c57-536c-4fb4-967b-24fd375db57c",
      "name": "Get Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        320
      ]
    },
    {
      "id": "1c641437-de26-4e55-9b34-0cb13d8d1cd3",
      "name": "Get Midjourney Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1140,
        580
      ]
    },
    {
      "id": "38fda20c-fef6-484c-ac75-c8f2fbaaca15",
      "name": "Wait for Midjourney Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        940,
        580
      ]
    },
    {
      "id": "1d5eaf9a-caf8-4b08-a35c-281b400c9198",
      "name": "Determine Whether the Image URL was Fetched",
      "type": "n8n-nodes-base.if",
      "position": [
        1340,
        580
      ]
    },
    {
      "id": "983acf91-c5ba-4335-b43e-d7a8a1a6b918",
      "name": "Check Image  Generation Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1520,
        320
      ]
    },
    {
      "id": "50455a13-5914-4f96-b977-d1c6461807bc",
      "name": "Design in Canvas",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1920,
        320
      ]
    },
    {
      "id": "0fd5d40c-aebc-4ec3-b9b5-027126b39452",
      "name": "Get Image Url",
      "type": "n8n-nodes-base.set",
      "position": [
        1720,
        320
      ]
    },
    {
      "id": "e36d4bd6-2d34-447c-984e-515c48f3632e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        500
      ],
      "parameters": {
        "width": 580,
        "height": 280,
        "content": "## Basic Params\nIn **Basic Params** node, you need to fill in your PiAPI key which you could check in [My Account](https://piapi.ai/workspace/my-account) on [PiAPI](https://piapi.ai). Other informatio"
      }
    },
    {
      "id": "1e04fe5d-a1f4-4fe9-a3d2-9c6aeaf05d96",
      "name": "Gpt-4o-mini API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        320
      ]
    },
    {
      "id": "4eaf0f57-9458-42cb-b736-c737f134320b",
      "name": "Basic Params",
      "type": "n8n-nodes-base.set",
      "position": [
        540,
        320
      ]
    },
    {
      "id": "6750b606-4222-4cda-bcaa-5d4f2b4f9ec8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        560
      ],
      "parameters": {
        "width": 380,
        "height": 200,
        "content": "## Design in Canvas API Node\nWe make a final design with Canvas API. \nYou could check the node code to make a template design more efficiently in Canvas.\nAlso you could make various artworks with temp"
      }
    }
  ],
  "connections": {
    "Get Prompt": {
      "main": [
        [
          {
            "node": "Midjourney Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic Params": {
      "main": [
        [
          {
            "node": "Gpt-4o-mini API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image Url": {
      "main": [
        [
          {
            "node": "Design in Canvas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gpt-4o-mini API": {
      "main": [
        [
          {
            "node": "Get Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Midjourney Task": {
      "main": [
        [
          {
            "node": "Determine Whether the Image URL was Fetched",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Midjourney Generator": {
      "main": [
        [
          {
            "node": "Wait for Midjourney Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking Test workflow": {
      "main": [
        [
          {
            "node": "Basic Params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Image  Generation Status": {
      "main": [
        [
          {
            "node": "Get Image Url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Midjourney Generation": {
      "main": [
        [
          {
            "node": "Get Midjourney Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Determine Whether the Image URL was Fetched": {
      "main": [
        [
          {
            "node": "Check Image  Generation Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Midjourney Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}