クールドル仕様での取引成立〜クローズワークフロー

中級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、15個のノードを含みます。主にCode, Gmail, Slack, Filter, Hubspotなどのノードを使用。 GmailフィードバックとSlack通知に基づくHubSpotクールリード取引の自動クローズ

前提条件
  • Googleアカウント + Gmail API認証情報
  • Slack Bot Token または Webhook URL
  • HubSpot API Key
  • ターゲットAPIの認証情報が必要な場合あり
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "INSTANCE_ID_PLACEHOLDER",
    "templateCredsSetupCompleted": false
  },
  "name": "Cold Deal Closure Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "99a95283-6245-4d88-ae58-07aaef8ddf14",
      "name": "スケジュールトリガー",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -304,
        -16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "35be2b12-2b12-42ee-aa01-df7c49daf6d4",
      "name": "HubSpot商談を取得",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -80,
        -16
      ],
      "parameters": {
        "filters": {
          "propertiesCollection": {
            "propertiesValues": {
              "properties": [
                "dealname",
                "hs_lastmodifieddate",
                "notes_last_updated",
                "notes_last_contacted"
              ],
              "propertyMode": "valueOnly"
            }
          }
        },
        "resource": "deal",
        "operation": "getAll",
        "returnAll": true,
        "authentication": "appToken"
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "YOUR_HUBSPOT_CREDENTIAL_ID",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ff92028e-afa9-4ed2-b123-aa2619f612dd",
      "name": "商談フィールドを抽出",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        -16
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const props = item.json.properties || {};\n\n  return {\n    json: {\n      dealId: item.json.dealId || '',\n      dealname: props.dealname?.value || '',\n      lastmodifieddate: props.hs_lastmodifieddate?.value || '',\n      notes_last_updated: props.notes_last_updated?.value || '',\n      notes_last_contacted: props.notes_last_contacted?.value || ''\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "5f50f06b-dc6a-45eb-b8b5-17b3f092f7ce",
      "name": "コールドリードをフィルタリング (21日以上)",
      "type": "n8n-nodes-base.filter",
      "position": [
        368,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.lastmodifieddate.toNumber() }}",
              "rightValue": "={{ Date.now() - 21 * 24 * 60 * 60 * 1000 }}"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "f3e64724-432c-4354-a115-61185fb3d23e",
      "name": "商談を「クローズド・ロスト」に更新",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        592,
        -16
      ],
      "parameters": {
        "dealId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.dealId }}"
        },
        "resource": "deal",
        "operation": "update",
        "updateFields": {
          "stage": "closedlost"
        },
        "authentication": "appToken"
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "YOUR_HUBSPOT_CREDENTIAL_ID",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "4d51776d-1c40-435a-989f-660f4546b401",
      "name": "商談アソシエーションを取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        -16
      ],
      "parameters": {
        "url": "=https://api.hubapi.com/crm/v3/objects/deals/{{ $json.dealId }}?associations=contacts",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_HUBSPOT_ACCESS_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2d48cf93-9066-482b-9c7d-0b317ff99406",
      "name": "コンタクトIDを抽出",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        -16
      ],
      "parameters": {
        "jsCode": "// Extract contact IDs from deals data\nconst dealsData = $input.all();\nconst contactIds = [];\n\ndealsData.forEach(item => {\n  const deal = item.json;\n  if (deal.associations && deal.associations.contacts && deal.associations.contacts.results) {\n    deal.associations.contacts.results.forEach(contact => {\n      contactIds.push({\n        contactId: contact.id,\n        dealId: deal.id,\n        dealName: deal.properties.dealname\n      });\n    });\n  }\n});\n\nreturn contactIds;"
      },
      "typeVersion": 2
    },
    {
      "id": "955cad66-4b5e-45b0-9c82-78f27ed78823",
      "name": "コンタクト詳細を取得",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1216,
        -16
      ],
      "parameters": {
        "contactId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.contactId }}"
        },
        "operation": "get",
        "authentication": "appToken",
        "additionalFields": {
          "propertiesCollection": {
            "propertiesValues": {
              "properties": [
                "email",
                "firstname",
                "lastname",
                "hs_full_name_or_email"
              ]
            }
          }
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "YOUR_HUBSPOT_CREDENTIAL_ID",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "0ef1bd2f-8986-42eb-b09f-3e3c09ed3403",
      "name": "コンタクトメールを抽出",
      "type": "n8n-nodes-base.code",
      "position": [
        1424,
        -16
      ],
      "parameters": {
        "jsCode": "// Code Node (JavaScript)\n\nreturn items.map(item => {\n  let email = null;\n\n  // try to safely access the email field\n  if (item.json?.properties?.email?.value) {\n    email = item.json.properties.email.value;\n  }\n\n  return {\n    json: {\n      email\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "ea48344a-33e0-442d-9b15-24708f6376f4",
      "name": "Gmailフィードバックリクエストを送信",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1648,
        -16
      ],
      "webhookId": "WEBHOOK_ID_PLACEHOLDER",
      "parameters": {
        "sendTo": "=your-email@example.com",
        "message": "=Hi {{ $('Get Contact Details').item.json.properties.firstname.value }},<br><br>\n\nI hope you're doing well.<br><br>\n\nThank you once again for considering [Your Company] for your project. While I understand you've decided to move in a different direction, I truly appreciate the time and effort you spent engaging with us.<br><br>\n\nWe'd Love Your Feedback<br>\nIf you're open to it, I'd be grateful for any thoughts you'd like to share about your decision—anything that could help us improve going forward.<br><br>\n\nOpen Door for the Future<br>\nShould your needs evolve in the future, I'd be happy to reconnect and support you in any way we can.<br><br>\n\nWishing you all the best with your project and continued success ahead.<br><br>\n\nWarm regards,<br><br>\n[Your Company]<br>\n",
        "options": {
          "appendAttribution": false
        },
        "subject": "=Thank You — We'd Value Your Feedback"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "YOUR_GMAIL_CREDENTIAL_ID",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "da6063b5-6c22-4312-960a-276b9a8a90dd",
      "name": "Slack通知を送信",
      "type": "n8n-nodes-base.slack",
      "position": [
        1856,
        -16
      ],
      "webhookId": "WEBHOOK_ID_PLACEHOLDER",
      "parameters": {
        "text": "=Deals which are moved to Closed Lost: {{ $('Extract Contact IDs').item.json.dealId }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SLACK_CHANNEL_ID",
          "cachedResultName": "general"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "YOUR_SLACK_CREDENTIAL_ID",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "00280018-e849-44a3-a90a-e4b41e3d3fb4",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -336
      ],
      "parameters": {
        "color": 4,
        "width": 640,
        "height": 624,
        "content": "## Trigger & Deal Fetching\n\n*Schedule Trigger: Starts the workflow on a defined interval (e.g., daily, weekly).\n\nGet HubSpot Deals: Pulls all deals from HubSpot, retrieving key fields like dealname, hs_lastmodifieddate, notes_last_updated, and notes_last_contacted.\n\nExtract Deal Fields: Cleans up and restructures the deal data into a consistent format (dealId, dealname, timestamps).*"
      },
      "typeVersion": 1
    },
    {
      "id": "26416831-06bb-45ef-983a-44c74160ae87",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -336
      ],
      "parameters": {
        "color": 2,
        "width": 432,
        "height": 624,
        "content": "## Lead Qualification (Cold Deals)\n\n*Filter Cold Leads (21+ days): Uses lastmodifieddate and compares it against Date.now() - 21 days.\n\nKeeps only deals untouched for 21+ days.\n\nUpdate Deal → Closed Lost: Automatically updates those stale deals in HubSpot, marking them as Closed Lost.*"
      },
      "typeVersion": 1
    },
    {
      "id": "9bf5bb30-24d1-4f31-a07b-dd781175e066",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -336
      ],
      "parameters": {
        "color": 6,
        "width": 832,
        "height": 624,
        "content": "## Deal → Contact Mapping\n\n*Fetch Deal Associations: Calls HubSpot API to get contacts linked to the filtered deals.\n\nExtract Contact IDs: Parses the association response to pull out contactId, dealId, and dealName.\n\nGet Contact Details: Retrieves enriched details of each contact (e.g., email, firstname, lastname).\n\nExtract Contact Email: Simplifies the response, keeping only the email (and ensuring it's safely extracted).*"
      },
      "typeVersion": 1
    },
    {
      "id": "cedf1213-f134-4ddd-a96c-764d1320193e",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        -336
      ],
      "parameters": {
        "color": 3,
        "width": 384,
        "height": 624,
        "content": "## Follow-up & Notifications\n\n*Send Gmail Feedback Request:\n\nSends a polite follow-up email thanking the lead and asking for feedback.\n\nUses personalized fields like firstname in the message.\n\nSend Slack Notification:\n\nPosts a message to a Slack channel (e.g., #general) to alert the team of deals moved to Closed Lost.*"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "TEMPLATE_VERSION_ID",
  "connections": {
    "99a95283-6245-4d88-ae58-07aaef8ddf14": {
      "main": [
        [
          {
            "node": "35be2b12-2b12-42ee-aa01-df7c49daf6d4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "35be2b12-2b12-42ee-aa01-df7c49daf6d4": {
      "main": [
        [
          {
            "node": "ff92028e-afa9-4ed2-b123-aa2619f612dd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2d48cf93-9066-482b-9c7d-0b317ff99406": {
      "main": [
        [
          {
            "node": "955cad66-4b5e-45b0-9c82-78f27ed78823",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ff92028e-afa9-4ed2-b123-aa2619f612dd": {
      "main": [
        [
          {
            "node": "5f50f06b-dc6a-45eb-b8b5-17b3f092f7ce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "955cad66-4b5e-45b0-9c82-78f27ed78823": {
      "main": [
        [
          {
            "node": "0ef1bd2f-8986-42eb-b09f-3e3c09ed3403",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0ef1bd2f-8986-42eb-b09f-3e3c09ed3403": {
      "main": [
        [
          {
            "node": "ea48344a-33e0-442d-9b15-24708f6376f4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4d51776d-1c40-435a-989f-660f4546b401": {
      "main": [
        [
          {
            "node": "2d48cf93-9066-482b-9c7d-0b317ff99406",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f3e64724-432c-4354-a115-61185fb3d23e": {
      "main": [
        [
          {
            "node": "4d51776d-1c40-435a-989f-660f4546b401",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ea48344a-33e0-442d-9b15-24708f6376f4": {
      "main": [
        [
          {
            "node": "da6063b5-6c22-4312-960a-276b9a8a90dd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f50f06b-dc6a-45eb-b8b5-17b3f092f7ce": {
      "main": [
        [
          {
            "node": "f3e64724-432c-4354-a115-61185fb3d23e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

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

有料ですか?

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

関連ワークフロー

AI 製品画像ジェネレーター - 公開テンプレート
OpenAI・Gemini・Google Workspace を使用した自動製品広告画像の作成
Code
Google Drive
Http Request
+
Code
Google Drive
Http Request
15 ノードAvkash Kakdiya
コンテンツ作成
08 - AIビデオ生成
OpenAI、Veo 3、Gmailを使用して任意のテーマの短い動画を作成
If
Wait
Gmail
+
If
Wait
Gmail
14 ノードAvkash Kakdiya
コンテンツ作成
09 - リードプロフィール強化ツール
自動化されたリード情報の豊富さとパーソナライズされたアウトレーシュ:HubSpot、Phantombuster、GPT
If
Set
Code
+
If
Set
Code
30 ノードAvkash Kakdiya
リードナーチャリング
Groq、Gemini、Slack承認システムを使用してRSSからMediumへの公開を自動化
Groq、Gemini、Slack承認システムを用いたRSSからMediumへの自動公開プロセス
If
Set
Code
+
If
Set
Code
41 ノードObisDev
コンテンツ作成
詐欺防止型リードキャプチャ・育成千リードシステム
AIによるスコアリング、テーブル追跡、マルチチャネルアラートを使って詐欺対策リードをキャプチャーし育成
If
Set
Code
+
If
Set
Code
28 ノードJitesh Dugar
コンテンツ作成
PerplexityとGPTを使用して、キーワードとメディアを含むWordPressのSEO最適化ブログを作成
WordPress向けSEO最適化されたブログの作成(Perplexity、GPTベース、キーワードとメディア付き)
Set
Code
Limit
+
Set
Code
Limit
124 ノードPaul
コンテンツ作成
ワークフロー情報
難易度
中級
ノード数15
カテゴリー2
ノードタイプ8
難易度説明

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

作成者
Avkash Kakdiya

Avkash Kakdiya

@itechnotion

🚀 Founder of iTechNotion — we build custom AI-powered automation workflows for startups, agencies, and founders. 💡 Specializing in agentic AI systems, content automation, sales funnels, and digital workers. 🔧 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. 📬 Let’s automate what slows you down.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34