テスト - Bannerbear 画像ジェネレーター 同期/非同期

中級

これは自動化ワークフローで、15個のノードを含みます。主にIf, Set, Webhook, Bannerbear, HttpRequestなどのノードを使用。 Bannerbearを使ってブランド向けソーシャル・メディア画像を作成(同期/非同期モード)

前提条件
  • HTTP Webhookエンドポイント(n8nが自動生成)
  • ターゲットAPIの認証情報が必要な場合あり

カテゴリー

-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "F3mTq6rX9I4XydnO",
  "meta": {
    "instanceId": "313b93d489cbc0ae87ad93f25c395bbdc59c46c632d00f395c3586a8fbbb7a34",
    "templateCredsSetupCompleted": true
  },
  "name": "TEST - Bannerbear image generator Sync/Async",
  "tags": [
    {
      "id": "WaI3hC9FrokRTdiV",
      "name": "Bannerbear",
      "createdAt": "2025-10-12T16:01:05.619Z",
      "updatedAt": "2025-10-12T16:01:05.619Z"
    }
  ],
  "nodes": [
    {
      "id": "c8bd9d3d-8b8b-4a34-a6bb-c864ca4b5b15",
      "name": "ワークフロー実行時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -496,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1a16d617-daa4-4798-bc3e-3f1ebbe983c4",
      "name": "パラメータ設定",
      "type": "n8n-nodes-base.set",
      "position": [
        -208,
        0
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "{\n  \"bannerbear_api_key\": \"your_bannerbear_api_key\",\n  \"banner_bear_template_id\": \"your_banner_bear_template_id\",\n  \"title\": \"This image is AI generated\",\n  \"subtitle\": \"Made in n8n with BannerBear\",\n  \"call_mode\": \"sync\"\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "e275b1cc-0dd7-44ec-b7e7-bebd09780090",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        -368
      ],
      "parameters": {
        "width": 496,
        "height": 864,
        "content": "## How to set up this workflow\n\n1. **Get Bannerbear credentials:**\n   - Sign up at bannerbear.com\n   - Create a project and design a template\n   - Copy your API key from Settings > API Key\n   - Copy your template ID from the API Console\n\n2. **Configure the workflow:**\n   - Open the \"SetParameters\" node\n   - Replace the API key and template ID with yours\n   - Customize the title and subtitle text\n   - Set `call_mode` to \"sync\" or \"async\"\n\n3. **For async mode (recommended):**\n   - Activate the \"Webhook_OnImageCreated\" node\n   - Copy the production webhook URL\n   - Add it to Bannerbear via Settings > Webhooks > Create a Webhook\n   - Set event type to \"image_created\"\n\n\n**If this doesn't work, you can alternately use a tool like POSTMAN to create the webhook in BannerBear:**\n\n\nPOST https://api.bannerbear.com/v2/webhooks\n\nHeaders:\nContent-Type: application/json\nAuthorization: Bearer [you_api_key]\n\nBody:\n{\n  \"url\" : \"the url of you n8n webhook\",\n  \"event\": \"image_created\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "b7ed9313-8ac6-4f12-a39c-3907234d5a7c",
      "name": "画像を同期的に作成",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        480,
        -112
      ],
      "parameters": {
        "url": "https://sync.api.bannerbear.com/v2/images",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"template\": \"{{ $('SetParameters').item.json.banner_bear_template_id }}\",\n  \"modifications\": [\n    {\n      \"name\": \"title\",\n      \"text\": \"{{ $('SetParameters').item.json.title }}\",\n      \"color\": null,\n      \"background\": null\n    },\n    {\n      \"name\": \"pretitle\",\n      \"text\": \"{{ $('SetParameters').item.json.subtitle }}\",\n      \"background\": null\n    }\n  ],\n  \"webhook_url\": null,\n  \"transparent\": false,\n  \"metadata\": null\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('SetParameters').item.json.bannerbear_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 5000
    },
    {
      "id": "3d8a40d5-79a8-4371-88dd-a276f8a4246d",
      "name": "画像URLとサイズを取得",
      "type": "n8n-nodes-base.set",
      "position": [
        704,
        -112
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"uid\": \"{{ $json.uid }}\",\n  \"status\": \"{{ $json.status }}\",\n  \"image_url_png\": \"{{ $json.image_url_png }}\",\n  \"image_url_jpg\": \"{{ $json.image_url_jpg }}\",\n  \"width\": {{ $json.width }},\n  \"height\": {{ $json.height }}\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "b776d8f5-ce48-4d52-ba5b-809b229953eb",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        -240
      ],
      "parameters": {
        "color": 6,
        "width": 608,
        "height": 352,
        "content": "## Synchronous call (specific API URL)"
      },
      "typeVersion": 1
    },
    {
      "id": "2e0c9929-728c-4f91-abcd-afc78074cdbf",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        144
      ],
      "parameters": {
        "color": 5,
        "width": 608,
        "height": 352,
        "content": "## Asynchronous call\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b5b54ead-b4d0-4786-a741-5f86e8c92767",
      "name": "Webhook_画像作成時",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -512,
        560
      ],
      "webhookId": "ac6a6723-1876-4f43-af4c-411a0f1f4ad3",
      "parameters": {
        "path": "ac6a6723-1876-4f43-af4c-411a0f1f4ad3",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "e312e19a-22eb-4dec-ae58-5f71894513b3",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        512
      ],
      "parameters": {
        "color": 5,
        "width": 496,
        "height": 192,
        "content": "## Webhook Async mode\n\nIn order to declare thje webhook in BannerBear:\n- the webhook not must be of type POST\n- you must use the production URL\n- workflow must be active"
      },
      "typeVersion": 1
    },
    {
      "id": "867be1aa-e4a1-4a39-9662-a89a0248b2e5",
      "name": "UIDとステータスを取得",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        272
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"uid\": \"{{ $json.uid }}\",\n  \"status\": \"{{ $json.status }}\"\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "faf15aff-2df8-40b4-b11f-da9284c7ef5f",
      "name": "完成画像情報を取得",
      "type": "n8n-nodes-base.set",
      "position": [
        -304,
        560
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={\n  \"uid\": \"{{ $json.uid }}\",\n  \"status\": \"{{ $json.status }}\",\n  \"image_url_png\": \"{{ $json.image_url_png }}\",\n  \"image_url_jpg\": \"{{ $json.image_url_jpg }}\",\n  \"width\": {{ $json.width }},\n  \"height\": {{ $json.height }}\n}\n"
      },
      "typeVersion": 3.4
    },
    {
      "id": "a17932d9-0e0d-4733-80f2-fa4a92225637",
      "name": "付箋12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 352,
        "content": "## Choose between synchronous and asynchronous call\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f7c801d4-29a0-451a-8669-6aa3b89ea2d9",
      "name": "同期呼び出し判定",
      "type": "n8n-nodes-base.if",
      "position": [
        80,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3be86245-4fbc-4b3c-b5e8-cdf55830a364",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.call_mode }}",
              "rightValue": "=sync"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "21604f70-04fd-4d3e-a63c-71d40b63370b",
      "name": "画像を非同期的に作成",
      "type": "n8n-nodes-base.bannerbear",
      "position": [
        480,
        272
      ],
      "parameters": {
        "templateId": "={{ $json.banner_bear_template_id }}",
        "modificationsUi": {
          "modificationsValues": [
            {
              "name": "title",
              "text": "={{ $json.title }}"
            },
            {
              "name": "pretitle",
              "text": "={{ $json.subtitle }}"
            }
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "bannerbearApi": {
          "id": "3TRGZU5Fz9n1UAvW",
          "name": "Bannerbear account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6cb031e3-e3fd-469c-ba22-e64818811b68",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 352,
        "content": "## Set BannerBear parameters & data\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "SynchronouslyCreateImage": [
      {
        "json": {
          "uid": "5nDZ3xmVezbm8BNJYy2qpdWj9",
          "self": "https://api.bannerbear.com/v2/images/5nDZ3xmVezbm8BNJYy2qpdWj9",
          "width": 1000,
          "height": 1000,
          "status": "completed",
          "pdf_url": null,
          "metadata": null,
          "template": "Kp21rAZj1BVab6eLnd",
          "image_url": "https://images.bannerbear.com/direct/lPOmJb1Yvv8Xz60g4G/requests/000/109/151/708/5nDZ3xmVezbm8BNJYy2qpdWj9/114db5f59243f056dca6207c7c8940c5fa6708d5.png",
          "created_at": "2025-10-12T16:22:59.013Z",
          "render_pdf": false,
          "transparent": false,
          "webhook_url": null,
          "image_url_jpg": "https://images.bannerbear.com/direct/lPOmJb1Yvv8Xz60g4G/requests/000/109/151/708/5nDZ3xmVezbm8BNJYy2qpdWj9/114db5f59243f056dca6207c7c8940c5fa6708d5.jpg",
          "image_url_png": "https://images.bannerbear.com/direct/lPOmJb1Yvv8Xz60g4G/requests/000/109/151/708/5nDZ3xmVezbm8BNJYy2qpdWj9/114db5f59243f056dca6207c7c8940c5fa6708d5.png",
          "modifications": [
            {
              "name": "title",
              "text": "This image is AI generated",
              "color": null,
              "background": null
            },
            {
              "name": "pretitle",
              "text": "Sorry not sorry",
              "background": null
            }
          ],
          "template_name": "LinkedId Post",
          "template_version": null,
          "pdf_url_compressed": null,
          "webhook_response_code": null
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b1fbbe44-ab95-4159-8c46-46084790d26c",
  "connections": {
    "1a16d617-daa4-4798-bc3e-3f1ebbe983c4": {
      "main": [
        [
          {
            "node": "f7c801d4-29a0-451a-8669-6aa3b89ea2d9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f7c801d4-29a0-451a-8669-6aa3b89ea2d9": {
      "main": [
        [
          {
            "node": "b7ed9313-8ac6-4f12-a39c-3907234d5a7c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "21604f70-04fd-4d3e-a63c-71d40b63370b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b5b54ead-b4d0-4786-a741-5f86e8c92767": {
      "main": [
        [
          {
            "node": "faf15aff-2df8-40b4-b11f-da9284c7ef5f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b7ed9313-8ac6-4f12-a39c-3907234d5a7c": {
      "main": [
        [
          {
            "node": "3d8a40d5-79a8-4371-88dd-a276f8a4246d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "21604f70-04fd-4d3e-a63c-71d40b63370b": {
      "main": [
        [
          {
            "node": "867be1aa-e4a1-4a39-9662-a89a0248b2e5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c8bd9d3d-8b8b-4a34-a6bb-c864ca4b5b15": {
      "main": [
        [
          {
            "node": "1a16d617-daa4-4798-bc3e-3f1ebbe983c4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級

有料ですか?

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

ワークフロー情報
難易度
中級
ノード数15
カテゴリー-
ノードタイプ7
難易度説明

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

作成者
Elodie Tasia

Elodie Tasia

@ladypixl

Web designer & AI automation creator. I build clean, conversion-ready sites and n8n workflows that take your content from idea to publish, on autopilot, in your voice. Grab my templates or message me for a custom build.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34