フォーム、Bright Data、GPT-4o-mini を使ったカスタム取引推奨メール

中級

これはSales, AI分野の自動化ワークフローで、8個のノードを含みます。主にForm, Html, SplitOut, EmailSend, FormTriggerなどのノードを使用、AI技術を活用したスマート自動化を実現。 フォーム、Bright Data、GPT-4o-mini を使用して、カスタマイズされた取引レコメンドメールを送信

前提条件
  • OpenAI API Key

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "b1f85eae352fde76d801a1a612661df6824cc2e68bfd6741e31305160a737e6e",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "a85eff80-4330-4bd8-acd9-9bf6e0b67c59",
      "name": "MediaMarktオファーWebサイトを取得",
      "type": "n8n-nodes-brightdata.brightData",
      "position": [
        40,
        -160
      ],
      "parameters": {
        "url": "https://www.mediamarkt.es/es/campaign/campanas-y-ofertas",
        "zone": {
          "__rl": true,
          "mode": "list",
          "value": "web_unlocker1",
          "cachedResultName": "web_unlocker1"
        },
        "format": "json",
        "country": {
          "__rl": true,
          "mode": "list",
          "value": "es",
          "cachedResultName": "es"
        },
        "requestOptions": {}
      },
      "credentials": {
        "brightdataApi": {
          "id": "jk945kIuAFAo9bcg",
          "name": "BrightData account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d27b03e0-b0f1-4c76-b68e-d716391c71da",
      "name": "メール用HTMLを作成",
      "type": "n8n-nodes-document-generator.documentGenerator",
      "position": [
        60,
        100
      ],
      "parameters": {
        "template": "<br>\nThese are our recommended deals today:<br>\n<ul>\n{{#each items}}\n<li>{{category}}: <a href=\"https://www.bestbuy.com{{link}}\">{{name}}</a> for {{price}}€</li>\n{{/each}}\n</ul>\n<br>",
        "oneTemplate": true
      },
      "typeVersion": 1
    },
    {
      "id": "d47ee04f-c1c5-4aac-a615-aa68f5a2d6cd",
      "name": "結果からアイテムを抽出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -140,
        100
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "message.content.results"
      },
      "typeVersion": 1
    },
    {
      "id": "34df63de-9b0d-4245-8f87-3654cab0c17e",
      "name": "エンドユーザーにメールで通知",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        280,
        100
      ],
      "webhookId": "626001db-5451-4225-bf98-cd74c3952754",
      "parameters": {
        "html": "=Hi!\n<br>\n{{ $json.text }}\n\nBest,\n<br>\nThe n8nhackers team!",
        "options": {},
        "subject": "Your last deals!",
        "toEmail": "={{ $('When User Completes Form').first().json.Email}}",
        "fromEmail": "deals@n8nhackers.com"
      },
      "credentials": {
        "smtp": {
          "id": "z3kiLWNZTH4wQaGy",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "fbbd7e95-d972-401a-9aca-8015a1acf553",
      "name": "フォーム結果ページを表示",
      "type": "n8n-nodes-base.form",
      "position": [
        480,
        100
      ],
      "webhookId": "a67843b4-3ab9-427b-8e52-dfc42831065d",
      "parameters": {
        "options": {},
        "operation": "completion",
        "completionTitle": "Our recommended deals!",
        "completionMessage": "=We have sent {{ $('Extract items from results').all().length }} recommended deals to your email!"
      },
      "typeVersion": 1
    },
    {
      "id": "e03ebc2b-db42-4a8d-8758-b3d988c4b943",
      "name": "Webサイトから本文とタイトルを抽出",
      "type": "n8n-nodes-base.html",
      "position": [
        240,
        -160
      ],
      "parameters": {
        "options": {
          "trimValues": true
        },
        "operation": "extractHtmlContent",
        "dataPropertyName": "body",
        "extractionValues": {
          "values": [
            {
              "key": "title",
              "cssSelector": "title"
            },
            {
              "key": "body",
              "cssSelector": "body"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "74b0dcd7-d833-452c-82fe-98a21bd39d12",
      "name": "カテゴリ別取引リストを生成",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -520,
        100
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "Generate a list of recommended deals in json list. Classify items by category. Generate the next properties: name, description, price, link and category. All properties will be in a property called: results. Translate texts to english if required."
            },
            {
              "content": "=The input text is:\n{{ $json.body }}"
            },
            {
              "content": "=Categories to filter: {{ $('When User Completes Form').item.json.Category.join(',') }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "oKzfvOwieOm4upQ2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a1095cea-6adc-4cf9-93fe-3a67dc061276",
      "name": "ユーザーがフォームを完了時",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -180,
        -160
      ],
      "webhookId": "33e8f7c3-82fb-4339-9c91-4b19aa6c14ba",
      "parameters": {
        "options": {
          "path": "get-top-deals",
          "ignoreBots": true,
          "buttonLabel": "Get Deals"
        },
        "formTitle": "Top deals",
        "formFields": {
          "values": [
            {
              "fieldType": "dropdown",
              "fieldLabel": "Category",
              "multiselect": true,
              "fieldOptions": {
                "values": [
                  {
                    "option": "Appliances"
                  },
                  {
                    "option": "Cameras, CamCorders & Drones"
                  },
                  {
                    "option": "Car Electronics "
                  },
                  {
                    "option": "Cell Phones"
                  },
                  {
                    "option": "Computers & Tablets"
                  },
                  {
                    "option": "TV & Home Theater"
                  },
                  {
                    "option": "Video Games"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email",
              "placeholder": "Complete your email",
              "requiredField": true
            }
          ]
        },
        "responseMode": "lastNode",
        "formDescription": "This form returns top deals by your preferences in the same page.\n\nYou can schedule your future deals once per day at the end of this test."
      },
      "typeVersion": 2.2
    }
  ],
  "pinData": {},
  "connections": {
    "d27b03e0-b0f1-4c76-b68e-d716391c71da": {
      "main": [
        [
          {
            "node": "34df63de-9b0d-4245-8f87-3654cab0c17e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "34df63de-9b0d-4245-8f87-3654cab0c17e": {
      "main": [
        [
          {
            "node": "fbbd7e95-d972-401a-9aca-8015a1acf553",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a1095cea-6adc-4cf9-93fe-3a67dc061276": {
      "main": [
        [
          {
            "node": "a85eff80-4330-4bd8-acd9-9bf6e0b67c59",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d47ee04f-c1c5-4aac-a615-aa68f5a2d6cd": {
      "main": [
        [
          {
            "node": "d27b03e0-b0f1-4c76-b68e-d716391c71da",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a85eff80-4330-4bd8-acd9-9bf6e0b67c59": {
      "main": [
        [
          {
            "node": "e03ebc2b-db42-4a8d-8758-b3d988c4b943",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "74b0dcd7-d833-452c-82fe-98a21bd39d12": {
      "main": [
        [
          {
            "node": "d47ee04f-c1c5-4aac-a615-aa68f5a2d6cd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e03ebc2b-db42-4a8d-8758-b3d988c4b943": {
      "main": [
        [
          {
            "node": "74b0dcd7-d833-452c-82fe-98a21bd39d12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - 営業, 人工知能

有料ですか?

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

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

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

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34