JotForm提出からHubSpot企業とタスクを作成し、Google Sheetsに記録

中級

これは自動化ワークフローで、13個のノードを含みます。主にCode, Wait, Hubspot, HttpRequest, GoogleSheetsなどのノードを使用。 JotFormでの送信からHubSpotの组织とタスクを作成し、Google Sheetsに記録

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

カテゴリー

-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "67dd1445921862780ac74448aef33eb969db12b9a6ce95248c7ae86a887cb653",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "0293a49f-3721-456a-9951-3c0c0fc8ba5d",
      "name": "JotFormトリガー",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        640,
        416
      ],
      "webhookId": "4376713f-865d-4009-abeb-12ebedde63f5",
      "parameters": {
        "form": "252808415357461"
      },
      "credentials": {
        "jotFormApi": {
          "id": "anmQIw1moNILel4d",
          "name": "JotForm account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b85baa2e-77ed-4939-8158-be4da9c49b30",
      "name": "待機",
      "type": "n8n-nodes-base.wait",
      "position": [
        1360,
        416
      ],
      "webhookId": "60d74e72-8895-4f22-a546-34f92db6c0cf",
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "f4ac75b3-4578-4134-a3da-0d5420d3f578",
      "name": "HubSpotタスク作成",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1584,
        416
      ],
      "parameters": {
        "url": "https://api.hubapi.com/crm/v3/objects/tasks",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"properties\": {\n    \"hs_task_subject\": \"{{ $('Format Jotform Data').item.json.hubspot_task_title || 'Jotform Marketing Query' }}\",\n    \"hs_task_body\": \"{{ \n        'Company: ' + ($('Format Jotform Data').item.json.company_name || 'Unknown Company') + '\\\\n' + \n        'Person: ' + ($('Format Jotform Data').item.json.full_name || 'Unknown') + '\\\\n' + \n        'Email: ' + ($('Format Jotform Data').item.json.email || 'N/A') + '\\\\n' + \n        'LinkedIn: ' + ($('Format Jotform Data').item.json.linkedin_profile || 'N/A') + '\\\\n' + \n        'Domain: ' + ($('Format Jotform Data').item.json.domain || 'N/A') + '\\\\n' + \n        'Marketing Budget (USD): ' + ($('Format Jotform Data').item.json.marketing_budget_usd || 'N/A') + '\\\\n' + \n        'Specific Query: ' + ($('Format Jotform Data').item.json.specific_query || 'No query provided.')\n    }}\",\n    \"hs_task_status\": \"NOT_STARTED\",\n    \"hs_task_priority\": \"HIGH\",\n    \"hs_task_type\": \"CALL\",\n    \"hs_timestamp\": \"{{ $('Format Jotform Data').item.json.task_timestamp || (new Date().toISOString()) }}\",\n    \"hubspot_owner_id\": \"{{ $('Format Jotform Data').item.json.assigned_owner_id || '82654288' }}\"\n  },\n  \"associations\": [\n    {\n      \"to\": {\n        \"id\": \"{{ $('Format Jotform Data').item.json.company_id || '' }}\"\n      },\n      \"types\": [\n        {\n          \"associationCategory\": \"HUBSPOT_DEFINED\",\n          \"associationTypeId\": 192\n        }\n      ]\n    }\n  ]\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <your pat token>"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2b7fc36d-c4ca-485a-88ca-cfa47a5da226",
      "name": "企業作成1",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        912,
        416
      ],
      "parameters": {
        "name": "={{ $json.CompanyName }}",
        "resource": "company",
        "additionalFields": {}
      },
      "credentials": {
        "hubspotApi": {
          "id": "0JXgoSMegjZJIEeR",
          "name": "HubSpot dummy"
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "c17f50ae-ee93-4687-bb76-f9448775e7a0",
      "name": "データ整形",
      "type": "n8n-nodes-base.code",
      "position": [
        1184,
        416
      ],
      "parameters": {
        "jsCode": "const inputData = $input.all();\nconst formattedData = [];\n\nconst ownerAssignments = {\n  owner1: \"82654288\",\n  owner2: \"944860204\", // Replace with actual ID\n};\n\n// helper: safely unescape quotes if Jotform encodes them\nconst unescapeQuotes = (v) =>\n  typeof v === 'string'\n    ? v.replace(/\\\\'/g, \"'\").replace(/\\\\\"/g, '\"')\n    : v;\n\nfor (const { json: item } of inputData) {\n  // Extract and sanitize fields\n  const firstName       = unescapeQuotes(item[\"First Name\"] || item.first_name || '');\n  const lastName        = unescapeQuotes(item[\"Last Name\"] || item.last_name || '');\n  const fullName        = `${firstName} ${lastName}`.trim() || 'Unknown';\n  const email           = unescapeQuotes(item.Email || item.email || '');\n  const linkedinProfile = unescapeQuotes(item[\"Linkedin Profile\"] || item.linkedin || '');\n  const companyName     = unescapeQuotes(item[\"Company Name\"] || item.company_name || 'Unknown Company');\n  const marketingBudget = unescapeQuotes(item[\"Marketing Budget ( in USD )\"] || item.marketing_budget || '');\n  const domain          = unescapeQuotes(item.Domain || item.domain || '');\n  const specificQuery   = unescapeQuotes(item[\"Any Specific querry ?\"] || item.query || '');\n\n  // Task title\n  const taskTitle = `(Jotform) Marketing Query from ${fullName} (${companyName})`;\n\n  // Owner assignment (basic hash)\n  const companyHash = (companyName || '').length % 2;\n  const assignedOwnerId = companyHash === 0 ? ownerAssignments.owner1 : ownerAssignments.owner2;\n\n  // Timestamp (24 hrs from now)\n  const futureDate = new Date();\n  futureDate.setHours(futureDate.getHours() + 24);\n  const taskTimestamp = futureDate.toISOString();\n\n  // Final formatted structure\n  const formattedItem = {\n    first_name: firstName,\n    last_name: lastName,\n    full_name: fullName,\n    email: email,\n    linkedin_profile: linkedinProfile,\n    company_name: companyName,\n    marketing_budget_usd: marketingBudget,\n    domain: domain,\n    specific_query: specificQuery,\n    hubspot_task_title: taskTitle,\n    task_timestamp: taskTimestamp,\n    assigned_owner_id: assignedOwnerId,\n  };\n\n  formattedData.push({ json: formattedItem });\n}\n\nreturn formattedData;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "da057d1b-4a6e-4e28-8aee-b3636c16831c",
      "name": "ログ記録",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2240,
        416
      ],
      "parameters": {
        "columns": {
          "value": {
            "Notes": "=This was created at {{ $json.createdAt }} & was updated at {{ $json.updatedAt }}",
            "domain": "={{ $json.properties.domain }}",
            "company": "={{ $json.properties.name }}",
            "HubspotCompanyID": "={{ $json.id }}"
          },
          "schema": [
            {
              "id": "company",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "company",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "No. of Stores",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "No. of Stores",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "HubspotCompanyID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "HubspotCompanyID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "domain"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1117410898,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ETTxIAb6Kj69V7xInvYEdYqvKcV8mjE3BoT1a7ER5tE/edit#gid=1117410898",
          "cachedResultName": "AlreadyExistingHC"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1ETTxIAb6Kj69V7xInvYEdYqvKcV8mjE3BoT1a7ER5tE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ETTxIAb6Kj69V7xInvYEdYqvKcV8mjE3BoT1a7ER5tE/edit?usp=drivesdk",
          "cachedResultName": "Linkedin2Hubspot"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "78jRH4x5Oj2STz8x",
          "name": "Google Sheets dummy"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a479a00e-a33e-4123-9887-ef98144d0ec3",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        16
      ],
      "parameters": {
        "width": 416,
        "height": 624,
        "content": "## 🧾 JOTFORM TRIGGER\n\nThis workflow begins with a JotForm submission trigger.  \nIt captures the following fields submitted through the form:\n\n- **Name**\n- **First Name**\n- **Last Name**\n- **Email**\n- **LinkedIn Profile**\n- **Company Name**\n- **Marketing Budget (in USD)**\n- **Domain**\n- **Any Specific Query**\n\nEach submission is automatically passed to the next step for HubSpot company creation and task generation.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ce5c50c0-18f6-45d8-a74b-13c500fb3777",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        16
      ],
      "parameters": {
        "color": 6,
        "width": 416,
        "height": 624,
        "content": "## 🏢 HUBSPOT COMPANY CREATION & FORMATTER\n\nThis section uses the submitted **Company Name** to create a new company record in HubSpot (if it doesn’t already exist).  \nThe **Formatter** node then processes all JotForm inputs into a structured, standardized format — ready for task creation in HubSpot.\n\nKey functions performed here:\n- Sanitizes all JotForm fields (name, email, domain, etc.)\n- Generates a follow-up task title automatically\n- Assigns a HubSpot owner based on company data\n- Prepares timestamps for scheduling tasks\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3231a6ce-d8f8-434b-af2b-fcb08d4a00ba",
      "name": "企業ドメイン設定",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2016,
        416
      ],
      "parameters": {
        "url": "=https://api.hubapi.com/crm/v3/objects/companies/{{ $('Loop Over Items3').item.json.company_id }}",
        "method": "PATCH",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"properties\": {\n    \"domain\": \"{{ $('Loop Over Items3').item.json.domain}}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer < PAT >"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "968e7fc6-65fa-4385-aba8-2933bac8ed02",
      "name": "待機10",
      "type": "n8n-nodes-base.wait",
      "position": [
        1808,
        416
      ],
      "webhookId": "97ecc78e-a2af-485e-883e-48559fe4477b",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "565fce0c-493d-4171-a095-b16d9993b3a3",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 640,
        "content": "## 🔁 HUBSPOT TASK CREATION\n\nThis section loops through the formatted data and sends HTTP requests to HubSpot to create tasks.  \nEach task includes all relevant submission details, such as company, contact, LinkedIn profile, and marketing query.\n\nCore logic:\n- Wait node prevents rate limit collisions\n- HubSpot API is called using a structured payload\n- Tasks are linked with their associated company records\n- Task priority, status, and owner are assigned automatically\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a332ddf0-e435-4371-b213-8699c3cf066f",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 640,
        "content": "## 🌐 LOOP OVER & DOMAIN SETTING\n\nAfter the tasks are created, this section updates each HubSpot company with its corresponding **Domain** value using the id generating while creating company.  \nIt ensures that all newly created companies in HubSpot have their website field populated correctly.\n\nDetails:\n- Wait node ensures proper sequencing\n- The “Set Company Domain” HTTP request updates the HubSpot company record\n- Prevents duplicate or unlinked company entries\n"
      },
      "typeVersion": 1
    },
    {
      "id": "62fd01c6-f579-4fb3-9807-f414c2312bed",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        0
      ],
      "parameters": {
        "color": 2,
        "width": 256,
        "height": 624,
        "content": "## 📊 STORING LOGS\n\nLogging is critical for transparency and debugging.  \nThis section safely records all processed submissions and API responses in a connected **Google Sheet**.\n\nBenefits:\n- Provides a full audit trail of workflow executions\n- Helps monitor form activity and HubSpot sync status\n- Simplifies debugging in case of failed API calls\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "b85baa2e-77ed-4939-8158-be4da9c49b30": {
      "main": [
        [
          {
            "node": "f4ac75b3-4578-4134-a3da-0d5420d3f578",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "968e7fc6-65fa-4385-aba8-2933bac8ed02": {
      "main": [
        [
          {
            "node": "3231a6ce-d8f8-434b-af2b-fcb08d4a00ba",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c17f50ae-ee93-4687-bb76-f9448775e7a0": {
      "main": [
        [
          {
            "node": "b85baa2e-77ed-4939-8158-be4da9c49b30",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0293a49f-3721-456a-9951-3c0c0fc8ba5d": {
      "main": [
        [
          {
            "node": "2b7fc36d-c4ca-485a-88ca-cfa47a5da226",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2b7fc36d-c4ca-485a-88ca-cfa47a5da226": {
      "main": [
        [
          {
            "node": "c17f50ae-ee93-4687-bb76-f9448775e7a0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3231a6ce-d8f8-434b-af2b-fcb08d4a00ba": {
      "main": [
        [
          {
            "node": "da057d1b-4a6e-4e28-8aee-b3636c16831c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f4ac75b3-4578-4134-a3da-0d5420d3f578": {
      "main": [
        [
          {
            "node": "968e7fc6-65fa-4385-aba8-2933bac8ed02",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級

有料ですか?

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

関連ワークフロー

Apollo.io かつ Google スプレッドシートを使用した LinkedIn のリード豊富化パイプラインの自動化
Apollo.ioとGoogleスプレッドシートを使用した自動LinkedInリード豊富化パイプライン
If
Code
Wait
+
If
Code
Wait
33 ノードRahi Uppal
リード獲得
AI駆動型マルチチャネルリードリーチシステム - JotForm、Gemini AI、HeyReach
JotForm、Gemini AI、HeyReachを基盤としたAI駆動型マルチチャネルリードリーチシステム
If
Wait
Gmail
+
If
Wait
Gmail
19 ノードRahi Uppal
リードナーチャリング
09 - リードプロフィール強化ツール
自動化されたリード情報の豊富さとパーソナライズされたアウトレーシュ:HubSpot、Phantombuster、GPT
If
Set
Code
+
If
Set
Code
30 ノードAvkash Kakdiya
リードナーチャリング
SignSnapHome、HubSpot、Twilioを使った不動産オープンハウスフォローの自動化
SignSnapHome、HubSpot、Twilioを使った不動産オープンハウスフォロー自動化
If
Set
Code
+
If
Set
Code
32 ノードKaden Reese
コンテンツ作成
PostgresとGallaboxを使って、個別メッセージを自動送信するWhatsAppリードのダイジェストマーケティング
PostgresとGallaboxを使った自動化されたWhatsAppリード個別メッセージング
Code
Postgres
Http Request
+
Code
Postgres
Http Request
11 ノードRahi
リードナーチャリング
3D製品ビデオ
2D画像からEC店舗向け3D製品動画を生成
If
Code
Wait
+
If
Code
Wait
21 ノードInfyOm Technologies
デザイン
ワークフロー情報
難易度
中級
ノード数13
カテゴリー-
ノードタイプ7
難易度説明

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

作成者
Rahi Uppal

Rahi Uppal

@rahiuppal

AI and Automation Consultant with over 1000 hours of experience building, deploying, and solving marketing and sales automation problems. I ship AI products faster by combining business acumen with AI & automation expertise and an engineering mindset. Connect with me on LinkedIn to chat.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34