財務インサイトの自動化:市值を Bright Data 経由で Telegram に送信

中級

これはCrypto Trading分野の自動化ワークフローで、14個のノードを含みます。主にIf, Code, Wait, Telegram, FormTriggerなどのノードを使用。 Bright Dataを使ってYahoo Financeから時価総額データを取得し、Telegramで可視化する

前提条件
  • Telegram Bot Token
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "k2FvKOkV5UgBEnCu",
  "meta": {
    "instanceId": "bc8ca75c203589705ae2e446cad7181d6f2a7cc1766f958ef9f34810e53b8cb2"
  },
  "name": "Financial Insight Automation: Market Cap to Telegram via Bright Data",
  "tags": [],
  "nodes": [
    {
      "id": "7cebf294-ed28-4cce-935f-8182c953aa5d",
      "name": "🟩 フォームトリガー",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1440,
        16
      ],
      "webhookId": "92772d3e-a1e1-4912-996a-7e799f129fb8",
      "parameters": {
        "options": {},
        "formTitle": "Yahoo",
        "formFields": {
          "values": [
            {
              "fieldLabel": "keyword"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "21b115c8-d3a7-4c6e-b3af-aab2e2c7f7d1",
      "name": "🚀 スクレイピングトリガー1 (HTTP Bright Dataへのリクエスト)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1184,
        16
      ],
      "parameters": {
        "url": "https://api.brightdata.com/datasets/v3/trigger",
        "method": "POST",
        "options": {},
        "jsonBody": "=[\n  {\n    \"keyword\": \"{{ $json.keyword }}\"\n  } \n]",
        "sendBody": true,
        "sendQuery": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "queryParameters": {
          "parameters": [
            {
              "name": "dataset_id",
              "value": "gd_lmrpz3vxmz972ghd7"
            },
            {
              "name": "include_errors",
              "value": "true"
            },
            {
              "name": "type",
              "value": "discover_new"
            },
            {
              "name": "discover_by",
              "value": "keyword"
            },
            {
              "name": "limit_per_input",
              "value": "2"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer BRIGHT_DATA_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "75b8a695-9ad8-4d55-8cee-e6ebfda0defd",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -144
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 368,
        "content": "🟩 Form Trigger (On form submission1)\n➤ User form se keyword deta hai (e.g. \"AI\", \"Crypto\", \"MSFT\")\n\n🚀 Trigger Scraping1 (HTTP Request to Bright Data)\n➤ Bright Data API ko call karta hai:\n➤ discover_by: keyword, type: discover_new\n➤ Dataset ID: gd_lmrpz3vxmz972ghd7"
      },
      "typeVersion": 1
    },
    {
      "id": "db304f8b-91e1-4d33-acc9-0ba8351160da",
      "name": "🕐 1分間待機1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -720,
        16
      ],
      "webhookId": "10b45556-5e91-4387-abd0-f9078b220286",
      "parameters": {
        "unit": "minutes",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "c0a0422f-a712-4be9-b46d-c35e6b5956ce",
      "name": "🟡 Snap ID1の配信ステータス確認",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -960,
        16
      ],
      "parameters": {
        "url": "=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer BRIGHT_DATA_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "a23cf845-6bff-4a40-a87f-5d0bac918acc",
      "name": "🟢 最終ステータス確認",
      "type": "n8n-nodes-base.if",
      "position": [
        -480,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "35ed620d-b5d5-4e97-bcc5-52b283d85616",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "ready"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4d719ca5-ae7f-44b2-8b63-ed8a729ebbbb",
      "name": "🔽 最終データ取得 (スナップショットフェッチ)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        0
      ],
      "parameters": {
        "url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "format",
              "value": "json"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer BRIGHT_DATA_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6efc936b-cfa4-431f-81a0-fd6536bd3072",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -240
      ],
      "parameters": {
        "color": 3,
        "width": 688,
        "height": 464,
        "content": "⏳ Zone 2: Monitor & Fetch Results\n(Sticky Name: ⏱️ Scraping Monitor & Result Pull)\n\nIncludes:\n\nWait Node – 1 minute delay for job completion\n\nStatus Check Node – Check if status == \"ready\"\n\nIF Node – Loop or continue\n\nSnapshot API – Pull final result"
      },
      "typeVersion": 1
    },
    {
      "id": "438a38f6-c401-4b75-94c6-e15992a97e76",
      "name": "📊 フィルタリング出力とシート保存",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "ask": "={{ $json.ask }}",
            "bid": "={{ $json.bid }}",
            "eps": "={{ $json.eps }}",
            "url": "={{ $json.url }}",
            "beta": "={{ $json.pe_ratio }}",
            "name": "={{ $json.name }}",
            "open": "={{ $json.open }}",
            "input": "={{ $json.input }}",
            "volume": "={{ $json.volume }}",
            "similar": "={{ $json.similar }}",
            "summary": "={{ $json.summary }}",
            "currency": "={{ $json.currency }}",
            "exchange": "={{ $json.exchange }}",
            "day_range": "={{ $json.day_range }}",
            "eps_trend": "={{ $json.eps_trend }}",
            "timestamp": "={{ $json.timestamp }}",
            "avg_volume": "={{ $json.avg_volume }}",
            "company_id": "={{ $json.company_id }}",
            "financials": "={{ $json.financials }}",
            "market_cap": "={{ $json.market_cap }}",
            "target_est": "={{ $json.target_est }}",
            "week_range": "={{ $json.week_range }}",
            "entity_type": "={{ $json.entity_type }}",
            "recent_news": "={{ $json.recent_news }}",
            "stock_ticker": "={{ $json.stock_ticker }}",
            "top_analysts": "={{ $json.top_analysts }}",
            "closing_price": "={{ $json.closing_price }}",
            "earnings_date": "={{ $json.earnings_date }}",
            "eps_revisions": "={{ $json.eps_revisions }}",
            "dividend_yield": "={{ $json.dividend_yield }}",
            "previous_close": "={{ $json.previous_close }}",
            "discovery_input": "={{ $json.discovery_input }}",
            "earnings_history": "={{ $json.earnings_history }}",
            "growth_estimates": "={{ $json.growth_estimates }}",
            "revenue_estimate": "={{ $json.revenue_estimate }}",
            "earnings_estimate": "={{ $json.earnings_estimate }}",
            "people_also_watch": "={{ $json.people_also_watch }}",
            "fanacials_currency": "={{ $json.fanacials_currency }}",
            "stock_market_index": "={{ $json.stock_market_index }}",
            "analyst_price_target": "={{ $json.analyst_price_target }}",
            "financials_quarterly": "={{ $json.financials_quarterly }}",
            "company_profile_phone": "={{ $json.company_profile_phone }}",
            "company_profile_sector": "={{ $json.company_profile_sector }}",
            "company_profile_address": "={{ $json.company_profile_address }}",
            "company_profile_website": "={{ $json.company_profile_website }}",
            "upgrades_and_downgrades": "={{ $json.upgrades_and_downgrades }}",
            "company_profile_industry": "={{ $json.company_profile_industry }}",
            "company_profile_employees": "={{ $json.company_profile_key_executives }}",
            "company_profile_description": "={{ $json.company_profile_description }}",
            "company_profile_key_executives": "={{ $json.company_profile_key_executives }}"
          },
          "schema": [
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": []
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "=https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit?gid=0#gid=0"
        }
      },
      "credentials": {},
      "typeVersion": 4.6
    },
    {
      "id": "eb1997f3-3a09-417b-9ea6-86861ec5c1df",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -256
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 480,
        "content": "📊 Zone 3: Filter & Output\n(Sticky Name: 📊 Filtered Output & Save to Sheet)\n\nIncludes:\n\nOptional IF Node – Market Cap > $1B\n\nCode Node – Format complex arrays to human readable\n\nGoogle Sheets Node – Append data to final sheet\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "87619346-06ed-4311-a7e0-bcb82f554aca",
      "name": "🧮 チャートペイロード生成",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        0
      ],
      "parameters": {
        "jsCode": "const itemsOut = [];\n\nconst labels = [];\nconst data = [];\n\nfor (const item of items) {\n  const name = item.json.name;\n  let cap = item.json.market_cap;\n  if (cap === undefined || cap === null) cap = \"0\";\n  cap = String(cap);\n\n  let value = 0;\n  if (cap.includes(\"T\")) value = parseFloat(cap) * 1e12;\n  else if (cap.includes(\"B\")) value = parseFloat(cap) * 1e9;\n  else if (cap.includes(\"M\")) value = parseFloat(cap) * 1e6;\n  else value = parseFloat(cap);\n\n  labels.push(name);\n  data.push(Math.round(value / 1e9));\n}\n\nconst chartPayload = {\n  type: 'bar',\n  data: {\n    labels,\n    datasets: [{\n      label: 'Market Cap (in Billion $)',\n      data,\n      backgroundColor: [\n        'rgba(75, 192, 192, 0.8)',\n        'rgba(153, 102, 255, 0.8)',\n        'rgba(255, 159, 64, 0.8)',\n        'rgba(255, 99, 132, 0.8)',\n        'rgba(54, 162, 235, 0.8)',\n        'rgba(201, 203, 207, 0.8)'\n      ],\n      borderColor: 'rgba(0,0,0,0.1)',\n      borderWidth: 1\n    }]\n  },\n  options: {\n    indexAxis: 'y',\n    responsive: true,\n    plugins: {\n      legend: {\n        display: false\n      },\n      title: {\n        display: true,\n        text: '📊 Company Market Cap Overview',\n        font: {\n          size: 20\n        },\n        padding: {\n          top: 10,\n          bottom: 20\n        }\n      },\n      tooltip: {\n        callbacks: {\n          label: function(context) {\n            return context.dataset.label + ': $' + context.raw + 'B';\n          }\n        }\n      }\n    },\n    scales: {\n      x: {\n        title: {\n          display: true,\n          text: 'Market Cap (in Billions $)'\n        },\n        grid: {\n          display: true\n        }\n      },\n      y: {\n        ticks: {\n          font: {\n            size: 12\n          }\n        }\n      }\n    }\n  }\n};\n\nitemsOut.push({ json: { chart: chartPayload } });\nreturn itemsOut;"
      },
      "typeVersion": 2
    },
    {
      "id": "a4c79ae7-ef35-4509-91f5-71107fcfee20",
      "name": "🌐 チャートからPNG生成",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        448,
        0
      ],
      "parameters": {
        "url": "=https://quickchart.io/chart?c={{ JSON.stringify($json.chart) }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "405f8c35-7747-442b-a14f-898a2b366d0e",
      "name": "📤 チャートをTelegramに送信",
      "type": "n8n-nodes-base.telegram",
      "position": [
        656,
        0
      ],
      "webhookId": "d7190374-fdad-4ccd-ab58-77794a247fb1",
      "parameters": {
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {}
      },
      "credentials": {},
      "typeVersion": 1.2
    },
    {
      "id": "01b96865-6ae1-43d8-962d-2a7141f9254f",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -256
      ],
      "parameters": {
        "width": 624,
        "height": 480,
        "content": "1.🧮 Generate Chart Payload (Code Node)\nPrepare chart data (labels + values) for market cap in billions using QuickChart format.\n\n2.🌐 Generate PNG from Chart (HTTP Request Node)\nPurpose: Use QuickChart.io API to generate PNG image from chart JSON.\n\n3.📤 Send Chart on Telegram (Telegram Node)\nPurpose: Send chart image with caption to client/group."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "514d9f62-1953-40f2-bf5d-9b00b95ded68",
  "connections": {
    "7cebf294-ed28-4cce-935f-8182c953aa5d": {
      "main": [
        [
          {
            "node": "21b115c8-d3a7-4c6e-b3af-aab2e2c7f7d1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "db304f8b-91e1-4d33-acc9-0ba8351160da": {
      "main": [
        [
          {
            "node": "a23cf845-6bff-4a40-a87f-5d0bac918acc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a23cf845-6bff-4a40-a87f-5d0bac918acc": {
      "main": [
        [
          {
            "node": "4d719ca5-ae7f-44b2-8b63-ed8a729ebbbb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c0a0422f-a712-4be9-b46d-c35e6b5956ce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "87619346-06ed-4311-a7e0-bcb82f554aca": {
      "main": [
        [
          {
            "node": "a4c79ae7-ef35-4509-91f5-71107fcfee20",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a4c79ae7-ef35-4509-91f5-71107fcfee20": {
      "main": [
        [
          {
            "node": "405f8c35-7747-442b-a14f-898a2b366d0e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "438a38f6-c401-4b75-94c6-e15992a97e76": {
      "main": [
        [
          {
            "node": "87619346-06ed-4311-a7e0-bcb82f554aca",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4d719ca5-ae7f-44b2-8b63-ed8a729ebbbb": {
      "main": [
        [
          {
            "node": "438a38f6-c401-4b75-94c6-e15992a97e76",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c0a0422f-a712-4be9-b46d-c35e6b5956ce": {
      "main": [
        [
          {
            "node": "db304f8b-91e1-4d33-acc9-0ba8351160da",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "21b115c8-d3a7-4c6e-b3af-aab2e2c7f7d1": {
      "main": [
        [
          {
            "node": "c0a0422f-a712-4be9-b46d-c35e6b5956ce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - 仮想通貨取引

有料ですか?

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

関連ワークフロー

リード generationワークフロー:YelpおよびTrustpilotのクローリングにBrightDataを使用し、OpenAIで分析を実施
Yelp と Trustpilot からスクレイビング + AI 駆動のメールアウトレーチでリードを生成します
If
Code
Wait
+
If
Code
Wait
32 ノードIncrementors
営業
Bright DataとTelegram通知を統合したGoogle Playレビューインテリジェントシステム
Bright DataとTelegram通知を利用したGoogle Playレビューのスマート分析システム
If
Wait
Telegram
+
If
Wait
Telegram
18 ノードIncrementors
人工知能
LinkedInとIndeed求人スクレイパー(Bright Data経由)とGoogleエクスポート
LinkedIn、Indeed、Bright Data、Googleスプレッドシートを使用した求人情報スクレイピング
If
Code
Wait
+
If
Code
Wait
33 ノードIncrementors
人事
Bright Dataを使用してWikipediaのコンテンツを図を含むLinkedIn AIコンテンツ投稿に変換
GPT-4要約とIdeogram画像を使ってWikipediaからLinkedInの投稿を生成
If
Code
Wait
+
If
Code
Wait
19 ノードIncrementors
ソーシャルメディア
Bright Data APIとGoogle Sheets連携のGoogle Mapsビジネス電話番号スクレイパー
Bright Data APIを利用したGoogle Maps電話番号スクレイピングとGoogle Sheetsとの同期
If
Wait
Form Trigger
+
If
Wait
Form Trigger
16 ノードIncrementors
営業
ブログパブリッシャー – 完全AI駆動のコンテンツ調査、作成、最適化、公開の自動化
Gemini、Ideogram AI、WordPress でブログ作成と公開を自動化
If
Set
Code
+
If
Set
Code
35 ノードIncrementors
コンテンツ作成
ワークフロー情報
難易度
中級
ノード数14
カテゴリー1
ノードタイプ8
難易度説明

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

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34