Google Drive に AI 画像を生成してアップロードする

中級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、8個のノードを含みます。主にFormTrigger, GoogleDrive, HttpRequestなどのノードを使用。 APImageを使用してAI画像を生成し、Googleドライブにアップロードします

前提条件
  • Google Drive API認証情報
  • ターゲットAPIの認証情報が必要な場合あり
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "cba9e349b601c19a1409b9fd06680aff0a77829be13c8aad9a858d4cea7ff290",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e67847ce-f519-45a3-bba6-380af6cdd648",
      "name": "画像ダウンロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        96,
        64
      ],
      "parameters": {
        "url": "={{ $json.images[0] }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "generated_image"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e380ad74-2cc6-4d1e-ae30-d1fca03cb39e",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -208
      ],
      "parameters": {
        "width": 976,
        "height": 252,
        "content": "## ✨ How To Get Started\n\n1. Double-click the **APImage API** node to open it.  \n2. Replace `YOUR_API_KEY` with your actual API Key (keep the `\"Bearer\"` prefix).  \n3. Use the **Generate Image** node to submit a request.\n\n> ℹ️ You can find your API Key inside the Dashboard of your APImage account.\n\n🔗 [Open the Dashboard 🡥](https://apimage.org/dashboard)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9ea17920-9c28-4d21-9f48-e64193fec34e",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        256
      ],
      "parameters": {
        "width": 480,
        "height": 304,
        "content": "### 📤 Choose Your Destination\n\nYou can replace the **\"Upload to Google Drive\"** node with any other service where you'd like to upload the AI-generated image — such as **Dropbox**, **WordPress**, **Shopify**, or **Notion**.\n\nJust make sure to use the correct **file name**, as defined in the **\"Download Image\"** node (Put Output in Field).\n\n\n\n\n\n\n\n\n[How to set up Google Drive credentials 🡥](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.googleDrive)"
      },
      "typeVersion": 1
    },
    {
      "id": "82a45985-c85e-404e-b202-6344d34c933c",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        256
      ],
      "parameters": {
        "width": 480,
        "height": 304,
        "content": "### 🧩 Choose Your Input\n\nYou can replace the **\"Generate Image\"** node with any other node that sends data to the **\"APImage API\"** node.  \nJust make sure the following parameters are set:\n\n- **`prompt`** – any text, up to **1000 characters**\n- **`dimensions`** – choose one of:  \n  `Square`, `Landscape`, `Portrait`\n- **`model`** – choose one of:  \n  `Basic`, `Premium` *(available for APImage Pro and business customers)*\n\n[View API Documentation 🡥](https://apimage.org/docs)"
      },
      "typeVersion": 1
    },
    {
      "id": "b48797c6-7c96-4e9a-827b-d05c435dbe13",
      "name": "APImage API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -128,
        64
      ],
      "parameters": {
        "url": "https://apimage.org/api/ai-image-generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"prompt\": \"{{ $json['Describe the image you want'] }}\",\n  \"dimensions\": \"{{ $json['Dimensions'] }}\",\n  \"model\": \"{{ $json['AI Model'] }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3d77e24e-cf80-4ace-9a58-faa4dd3a4f09",
      "name": "画像生成",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -352,
        64
      ],
      "webhookId": "b7487db2-4581-4fd6-b4e0-afac3d8466fb",
      "parameters": {
        "options": {},
        "formTitle": "APImage AI Image Generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Describe the image you want",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Dimensions",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Square"
                  },
                  {
                    "option": "Landscape"
                  },
                  {
                    "option": "Portrait"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "AI Model",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Basic"
                  },
                  {
                    "option": "Premium"
                  }
                ]
              },
              "requiredField": true
            }
          ]
        },
        "formDescription": "Generate images in seconds"
      },
      "typeVersion": 2.2
    },
    {
      "id": "1a9c4e5a-b223-4c71-98b6-d88306cc974a",
      "name": "ファイルアップロード",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        320,
        64
      ],
      "parameters": {
        "name": "generated_image",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "inputDataFieldName": "generated_image"
      },
      "typeVersion": 3
    },
    {
      "id": "358d7fe8-6e82-4e77-a7e4-788e94b79e40",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        640
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 352,
        "content": "### 🐞 Debug Support\n\n**504 Gateway Timeout Error**  \nThis error typically occurs when n8n reaches its maximum wait time for a job to complete. To resolve it, increase the value of the **Timeout** setting (in milliseconds). For example, setting it to `180000` allows up to 3 minutes.\n\nThis issue is most common on the cloud-hosted version of n8n, where stricter limits apply. On self-hosted instances, the error rarely occurs, as you have full control over execution settings.\n\nBut no worries, even if this error occurs, APImage is still able to generate the image, you will find every image inside your APImage Dashboard → Usage Data → Image Generations\n\nIf you experience any issues regarding the APImage API itself, contact: \n\n✉ [ask@support@apimage.org](mailto:ask@support@apimage.org)"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "b48797c6-7c96-4e9a-827b-d05c435dbe13": {
      "main": [
        [
          {
            "node": "e67847ce-f519-45a3-bba6-380af6cdd648",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e67847ce-f519-45a3-bba6-380af6cdd648": {
      "main": [
        [
          {
            "node": "1a9c4e5a-b223-4c71-98b6-d88306cc974a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3d77e24e-cf80-4ace-9a58-faa4dd3a4f09": {
      "main": [
        [
          {
            "node": "b48797c6-7c96-4e9a-827b-d05c435dbe13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - コンテンツ作成, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

APImage を使用して画像の背景を自動で置き換え・再調整
APImage を使用して画像の背景を自動のに置き換えて再照明する
Form Trigger
Google Drive
Http Request
+
Form Trigger
Google Drive
Http Request
10 ノードGegenfeld
その他
WordPressブログの自動化プロフェッショナル版(先端研究)v2.1マーケットプラグイン
GPT-4o、Perplexity AI、そして多言語対応を使ったSEO最適化ブログ作成の自動化
If
Set
Xml
+
If
Set
Xml
125 ノードDaniel Ng
コンテンツ作成
OpenAI、ElevenLabs、Fal.ai を使用した動画・パ odcast・ASM R向けのウイルス性コンテンツ自動作成
OpenAI、ElevenLabs、そして Fal.ai を使って動画、ポッドキャスト、ASMR に向けたウイルスのコンテンツ作成を自動化
Set
Code
Wait
+
Set
Code
Wait
97 ノードAdam Crafts
コンテンツ作成
IMDBビデオ自動ダウンローダー(Google Driveアップロード&メール通知付き)
IMDB動画自動ダウンロードツール(Google Driveアップロード+メールアラート付き)
If
Wait
Email Send
+
If
Wait
Email Send
19 ノードSk developer
コンテンツ作成
Google Drive および Nano Banana API を使用したバッチ証明写真変換機・アップグレード機
Google Drive と Nano Banana API を使ったバッチ証明写真変換機とアップグレード機
If
Set
Code
+
If
Set
Code
16 ノードpanyanyany
コンテンツ作成
Dumpling AI を使用してフォームから映画級の動物ビデオと音声を自動生成する
GPT-4、Dumpling AI、ElementalLabs オーディオを使用して、フォーム入力を映画のようなビデオに変換します
Set
Code
Wait
+
Set
Code
Wait
23 ノードYang
コンテンツ作成
ワークフロー情報
難易度
中級
ノード数8
カテゴリー2
ノードタイプ4
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Gegenfeld

Gegenfeld

@gegenfeld

We at Gegenfeld are an EdTech platform dedicated to delivering high-quality on-demand courses and interactive training sessions for professional development at all skill levels. With our commitment to "Accelerate your future," we empower professionals to enhance their expertise through engaging, industry-focused learning experiences. On n8n, we share some of the workflows used in our interactive training to provide deeper insights and practical applications.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34