CSVからHubSpotアップローダー(動のフィールドマッピングとGoogle Sheets連携)

上級

これはAI, Marketing, IT Ops分野の自動化ワークフローで、36個のノードを含みます。主にIf, Set, Code, Form, Mergeなどのノードを使用、AI技術を活用したスマート自動化を実現。 CSVをHubSpotにアップロードするツール(動のフィールドマッピングとGoogle Sheets連携)

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "nodes": [
    {
      "id": "18813eed-27a8-4338-8e71-abb270d43082",
      "name": "オブジェクトで分割",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -260,
        540
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "object"
      },
      "typeVersion": 1
    },
    {
      "id": "ee610ddd-5bd7-4d97-82a9-b688c71616d8",
      "name": "Hubspotからプロパティを取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -40,
        540
      ],
      "parameters": {
        "url": "=https://api.hubapi.com/crm/v3/properties/{{ $json.object }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "hubspotOAuth2Api"
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "JxzF93M0SJ00jDD9",
          "name": "HubSpot account"
        },
        "hubspotDeveloperApi": {
          "id": "EN6KsMdrxSVNfhyz",
          "name": "HubSpot Developer account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "22662720-97ae-4e59-a70e-3b858e8e632d",
      "name": "crm_typeを定義",
      "type": "n8n-nodes-base.code",
      "position": [
        180,
        540
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\n\nfor (let result of $json.results) {\n  result.crm_type = $('Split by object').item.json.object;\n  delete result.options\n}\nreturn {results: $json.results};\n\n"
      },
      "typeVersion": 2
    },
    {
      "id": "abfdd971-1112-4dd4-9513-13f12f3e92f2",
      "name": "結果を分割",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        400,
        540
      ],
      "parameters": {
        "include": "allOtherFields",
        "options": {},
        "fieldToSplitOut": "results"
      },
      "typeVersion": 1
    },
    {
      "id": "94c2b864-e88d-4da8-9ca3-a34d1ca8b15b",
      "name": "結果を変換",
      "type": "n8n-nodes-base.code",
      "position": [
        840,
        540
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet test = []\nlet entry = $input.item.json.results\nreturn {json: entry}\n"
      },
      "typeVersion": 2
    },
    {
      "id": "ddebf521-ed07-446b-ac2a-e21be46ee2c5",
      "name": "Googleシートに追加",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1060,
        540
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "updatedAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "updatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "createdAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "createdAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "label",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "label",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "fieldType",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "fieldType",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "description",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "groupName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "groupName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "displayOrder",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "displayOrder",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "calculated",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "calculated",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "externalOptions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "externalOptions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hasUniqueValue",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "hasUniqueValue",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hidden",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "hidden",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hubspotDefined",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "hubspotDefined",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "formField",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "formField",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "dataSensitivity",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "dataSensitivity",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "crm_type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "crm_type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "showCurrencySymbol",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "showCurrencySymbol",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "calculationFormula",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "calculationFormula",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "referencedObjectType",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "referencedObjectType",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "createdUserId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "createdUserId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "updatedUserId",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "updatedUserId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "archived",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "archived",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "dateDisplayHint",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "dateDisplayHint",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "options",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "options",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "modificationMetadata",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "modificationMetadata",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "useAppend": false
        },
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w/edit?usp=drivesdk",
          "cachedResultName": "Properties for Hubspot"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gdLmm513ROUyH6oU",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "dfd3d16b-b7d6-49ba-a38b-076960a8a184",
      "name": "Googleシートを消去",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -700,
        540
      ],
      "parameters": {
        "operation": "clear",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w/edit?usp=drivesdk",
          "cachedResultName": "Properties for Hubspot"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gdLmm513ROUyH6oU",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "d39acf68-f809-4a4b-bb5e-5f80a7fddfbc",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        460
      ],
      "parameters": {
        "color": 7,
        "width": 2280,
        "height": 460,
        "content": "## Update the properties by object Workflow\n"
      },
      "typeVersion": 1
    },
    {
      "id": "99ce38cb-937c-44f4-8e21-cceb8c5fa000",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -300
      ],
      "parameters": {
        "color": 7,
        "width": 3200,
        "height": 700,
        "content": "## Import workflow\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3b231f69-ca9b-40a4-b894-24cece123855",
      "name": "オブジェクトの配列を定義",
      "type": "n8n-nodes-base.set",
      "position": [
        -480,
        540
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d6c05100-fc13-4969-90e5-bcc398a79006",
              "name": "object",
              "type": "array",
              "value": "[\"companies\",\"contacts\", \"deals\", \"leads\", \"tickets\"]"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d3eff9e3-1fae-4228-bcd9-525854f3f440",
      "name": "フィールドリストを更新するにはここから開始",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -920,
        540
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b1a4d238-9d55-4bff-a1b4-3942dbe37fdb",
      "name": "ファイルアップロードフォーム",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -920,
        20
      ],
      "webhookId": "fc3523af-1d0f-4dfb-8869-b29cfdde1a06",
      "parameters": {
        "options": {},
        "formTitle": "title",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "data",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".csv"
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Type of import",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Companies"
                  },
                  {
                    "option": "Contacts"
                  },
                  {
                    "option": "Leads"
                  },
                  {
                    "option": "Deals"
                  },
                  {
                    "option": "Tickets"
                  }
                ]
              }
            }
          ]
        },
        "formDescription": "provide me a file"
      },
      "typeVersion": 2.2
    },
    {
      "id": "44f4ffe7-ff9f-4716-82ef-fc3c44dc48ca",
      "name": "ファイルの最初のlineを取得",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -700,
        120
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "351604db-d9e9-4994-8c1c-f543c13aead9",
      "name": "実際のフィールドを設定",
      "type": "n8n-nodes-base.set",
      "position": [
        -480,
        120
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "69a042d8-9543-4a81-bbf8-07e9d7ae2c0d",
              "name": "real_fields",
              "type": "array",
              "value": "={{ $json.data.split(\"\\n\")[0].split(\";\") }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a61d6de1-005e-41ad-a71e-3eafde83afc7",
      "name": "シートからフィールドを取得",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -40,
        20
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $('File upload form').first().json['Type of import'].toLowerCase() }}",
              "lookupColumn": "crm_type"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NdvtXADHaSBleSkvVxf6Y6yo3VmHmilLEBuWbrik32w/edit?usp=drivesdk",
          "cachedResultName": "Properties for Hubspot"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "gdLmm513ROUyH6oU",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "617d572a-53a9-4fe8-9f73-06689c706006",
      "name": "フィールドとデータを結合",
      "type": "n8n-nodes-base.merge",
      "position": [
        -260,
        20
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "f2be6bfb-ac32-43d0-924c-d8f20a401b2f",
      "name": "入力の全フィールドが定義されているか確認",
      "type": "n8n-nodes-base.code",
      "position": [
        180,
        20
      ],
      "parameters": {
        "jsCode": "// \nlet type = $('File upload form').first().json['Type of import']\n// Get first line of json\nlet first_line = $('Set the real fields').first().json.real_fields\nlet keys = Object.values(first_line)\nlet props = []\n\nfor (let realField of $input.all()) {\n  props.push(realField.json.name)\n}\nlet response = true\nfor (let key of keys) {\n if(!props.includes(key.trim())) {\n    console.log(props, key)\n    response = false\n }\n}\n\nreturn {response, keys, props}"
      },
      "typeVersion": 2
    },
    {
      "id": "8a2e23a3-c044-48ac-b66c-7205e34ad3bd",
      "name": "全フィールドが定義されている場合",
      "type": "n8n-nodes-base.if",
      "position": [
        400,
        20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3bb457eb-aef5-43f6-b268-1baaad0698e3",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.response }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "123f6190-600a-410a-b943-a6e67d4f0a86",
      "name": "対応表を作成",
      "type": "n8n-nodes-base.code",
      "position": [
        620,
        120
      ],
      "parameters": {
        "jsCode": "\nlet ret = []\nlet fields = {}\nfor (let key of $input.first().json.keys) {\n  if (!$input.first().json.props.includes(key)) {\n    let fieldName = `Set the correct field for '${key}'`\n    fields[fieldName] = key\n    // console.log(key)\n    ret.push(\n      {\n      \"fieldLabel\":key,\n     \"fieldType\": \"dropdown\",\n     \"fieldOptions\": {\n      \"values\": $input.first().json.props.map(x => {return {\"option\": x}})\n\t\t},\n      \"requiredField\":false\n   }\n    )\n  }\n}\n\nreturn {ret, fields}"
      },
      "typeVersion": 2
    },
    {
      "id": "c7348c9a-e4c3-4af2-9224-5338799ed7aa",
      "name": "各入力フィールドに対応するフィールドを設定するフォーム",
      "type": "n8n-nodes-base.form",
      "position": [
        840,
        120
      ],
      "webhookId": "8bdb6e07-1112-4923-a1a3-a0fbb83c806e",
      "parameters": {
        "options": {
          "formTitle": "=Correspondance for fields",
          "formDescription": "=Set the correct equivalent for each field.\nYou don't have to do it for all fields."
        },
        "defineForm": "json",
        "jsonOutput": "={{$json.ret}}"
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "2ba6be51-2508-4d34-b447-2f326fb692b5",
      "name": "ファイルの内容を取得",
      "type": "n8n-nodes-base.extractFromFile",
      "onError": "continueRegularOutput",
      "position": [
        -480,
        -80
      ],
      "parameters": {
        "options": {
          "encoding": "utf-8",
          "delimiter": ";",
          "headerRow": true
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3bae9532-81d5-4694-b2cd-40c2b8207b22",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 840,
        "height": 500,
        "content": "## Form uploader\n- Choose  file to import. The CSV file has \",\" as delimiters, is encoded in UTF8 and has the name of the fields as header. You can change all that in \"Get content of the file\"\n- Set the type of object you want to import"
      },
      "typeVersion": 1
    },
    {
      "id": "2836df7d-4307-485c-857e-30b0bb4cf59b",
      "name": "インポートする全レコードを分割",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1280,
        20
      ],
      "parameters": {
        "include": "allOtherFields",
        "options": {},
        "fieldToSplitOut": "out"
      },
      "typeVersion": 1
    },
    {
      "id": "5d4481f4-0157-42d4-8223-1259f45a1846",
      "name": "プロパティを定義",
      "type": "n8n-nodes-base.set",
      "position": [
        1500,
        20
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bc1ad698-c75a-49e5-843c-03c1c64a21b1",
              "name": "def.properties",
              "type": "object",
              "value": "={{ $json.out }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b765d44e-6b13-4031-b188-e827578b9bee",
      "name": "Hubspotにアップロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1720,
        20
      ],
      "parameters": {
        "url": "https://api.hubapi.com/crm/v3/objects/companies",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json.def }}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "hubspotOAuth2Api"
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "id": "JxzF93M0SJ00jDD9",
          "name": "HubSpot account"
        },
        "hubspotDeveloperApi": {
          "id": "EN6KsMdrxSVNfhyz",
          "name": "HubSpot Developer account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f95862b2-555b-44a7-b318-cb3316d33594",
      "name": "フォーム応答",
      "type": "n8n-nodes-base.form",
      "position": [
        1940,
        20
      ],
      "webhookId": "980c195f-9ea2-4f38-a869-6ac946b9552d",
      "parameters": {
        "options": {
          "formTitle": ""
        },
        "operation": "completion",
        "completionTitle": "Your Data has been imported successfully"
      },
      "typeVersion": 1
    },
    {
      "id": "75275b15-24e3-4fee-9d71-b4e7a2479c11",
      "name": "非表示フィールドとhs_で始まるプロパティフィールドを除外",
      "type": "n8n-nodes-base.filter",
      "position": [
        620,
        540
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "14ed0cde-e546-4b13-9405-16834831a7b4",
              "operator": {
                "type": "string",
                "operation": "notStartsWith"
              },
              "leftValue": "={{ $json.results.name }}",
              "rightValue": "hs_"
            },
            {
              "id": "60337002-8aba-404c-b6e0-99fcd60e1d84",
              "operator": {
                "type": "boolean",
                "operation": "false",
                "singleValue": true
              },
              "leftValue": "={{ $json.results.hidden }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3b131ff9-ff8c-4b4c-8f48-7603e2f4e29c",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 660,
        "height": 500,
        "content": "## Properties procesor\n- Get the list of properties defined by \"Update the properties by object\" for the choosen object in \"Form uploader\"\n- Check if all fields fro the file have their name in this list\n- If not, go to the correspondance form\n- if yes goes on to processing"
      },
      "typeVersion": 1
    },
    {
      "id": "75d465db-f0df-489b-a596-ed9e5a6b97ea",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 640,
        "height": 500,
        "content": "## Set the values for each property\n"
      },
      "typeVersion": 1
    },
    {
      "id": "16869a28-c6c1-4f88-ae7a-6ca74ad97a31",
      "name": "各フィールドの値を設定",
      "type": "n8n-nodes-base.code",
      "position": [
        1060,
        -80
      ],
      "parameters": {
        "jsCode": "\nfunction findKeyByValue(obj, value) {\n  return Object.keys(obj).find(key => obj[key] === value);\n}\n\nlet out = []\nconst data = $('Get the content of file').all().map(x => x.json)\nconsole.log(data)\n\nfor (const item of data) {\n  console.log(item)\n  let elt = {}\n  \n  for (const prop of $('Check if all fields from input are defined').first().json.props) {\n      elt[prop] = item[prop]\n  }\n\n  out.push(elt)\n}\n\nreturn {out}"
      },
      "typeVersion": 2
    },
    {
      "id": "c7f51291-91df-497e-8466-031ac031384a",
      "name": "各フィールドの値を設定1",
      "type": "n8n-nodes-base.code",
      "position": [
        1060,
        120
      ],
      "parameters": {
        "jsCode": "\nfunction findKeyByValue(obj, value) {\n  return Object.keys(obj).find(key => obj[key] === value);\n}\n\nlet out = []\nconst data = $('Get the content of file').all().map(x => x.json)\n// console.log(form_fields)\n\nfor (const item of data) {\n  let elt = {}\n  for (const prop of $('Check if all fields from input are defined').first().json.props) {\n    let equival = findKeyByValue($input.all()[0].json, prop)\n    if(equival) {\n      elt[prop] = item[equival]\n    } else {\n      elt[prop] = item[prop]\n    }\n  }\n  \n  out.push(elt)\n}\n\nreturn {out}"
      },
      "typeVersion": 2
    },
    {
      "id": "6aafe2ff-e4c7-4e07-8a39-d5bed120fdf7",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 640,
        "height": 500,
        "content": "## Import the values in Hubspot\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0b2e7364-4da7-4c4b-b1a2-3fda8e0a20be",
      "name": "付箋7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -520
      ],
      "parameters": {
        "width": 460,
        "height": 200,
        "content": "## Contact me\n- If you need any modification to this workflow\n- if you need some help with this workflow\n- Or if you need any workflow in n8n, Make, or Langchain / Langgraph\n\nWrite to me: [thomas@pollup.net](mailto:thomas@pollup.net)\nCheck out my other templates [here](https://n8n.io/creators/zeerobug/)"
      },
      "typeVersion": 1
    },
    {
      "id": "5cf4f276-54e4-4e31-af1c-c2808802afda",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        520
      ],
      "parameters": {
        "color": 4,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## List of objects\nDefine Here the list of the objects you would like to import in Hubspot"
      },
      "typeVersion": 1
    },
    {
      "id": "bd0953b5-769f-40b2-9e71-b4e38f5aea7c",
      "name": "付箋8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        520
      ],
      "parameters": {
        "color": 4,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Filter the list of properties here"
      },
      "typeVersion": 1
    },
    {
      "id": "ae9d2dee-1c07-40eb-b8aa-020cde8534df",
      "name": "付箋9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        520
      ],
      "parameters": {
        "color": 4,
        "width": 200,
        "height": 380,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Create an empty Google Sheet\nIf you run this part, and set it here and in the last node"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "abfdd971-1112-4dd4-9513-13f12f3e92f2": {
      "main": [
        [
          {
            "node": "75275b15-24e3-4fee-9d71-b4e7a2479c11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "22662720-97ae-4e59-a70e-3b858e8e632d": {
      "main": [
        [
          {
            "node": "abfdd971-1112-4dd4-9513-13f12f3e92f2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "18813eed-27a8-4338-8e71-abb270d43082": {
      "main": [
        [
          {
            "node": "ee610ddd-5bd7-4d97-82a9-b688c71616d8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b1a4d238-9d55-4bff-a1b4-3942dbe37fdb": {
      "main": [
        [
          {
            "node": "44f4ffe7-ff9f-4716-82ef-fc3c44dc48ca",
            "type": "main",
            "index": 0
          },
          {
            "node": "2ba6be51-2508-4d34-b447-2f326fb692b5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5d4481f4-0157-42d4-8223-1259f45a1846": {
      "main": [
        [
          {
            "node": "b765d44e-6b13-4031-b188-e827578b9bee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dfd3d16b-b7d6-49ba-a38b-076960a8a184": {
      "main": [
        [
          {
            "node": "3b231f69-ca9b-40a4-b894-24cece123855",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b765d44e-6b13-4031-b188-e827578b9bee": {
      "main": [
        [
          {
            "node": "f95862b2-555b-44a7-b318-cb3316d33594",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "351604db-d9e9-4994-8c1c-f543c13aead9": {
      "main": [
        [
          {
            "node": "617d572a-53a9-4fe8-9f73-06689c706006",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "617d572a-53a9-4fe8-9f73-06689c706006": {
      "main": [
        [
          {
            "node": "a61d6de1-005e-41ad-a71e-3eafde83afc7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ddebf521-ed07-446b-ac2a-e21be46ee2c5": {
      "main": [
        []
      ]
    },
    "94c2b864-e88d-4da8-9ca3-a34d1ca8b15b": {
      "main": [
        [
          {
            "node": "ddebf521-ed07-446b-ac2a-e21be46ee2c5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3b231f69-ca9b-40a4-b894-24cece123855": {
      "main": [
        [
          {
            "node": "18813eed-27a8-4338-8e71-abb270d43082",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2ba6be51-2508-4d34-b447-2f326fb692b5": {
      "main": [
        [
          {
            "node": "617d572a-53a9-4fe8-9f73-06689c706006",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8a2e23a3-c044-48ac-b66c-7205e34ad3bd": {
      "main": [
        [
          {
            "node": "16869a28-c6c1-4f88-ae7a-6ca74ad97a31",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "123f6190-600a-410a-b943-a6e67d4f0a86",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2836df7d-4307-485c-857e-30b0bb4cf59b": {
      "main": [
        [
          {
            "node": "5d4481f4-0157-42d4-8223-1259f45a1846",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ee610ddd-5bd7-4d97-82a9-b688c71616d8": {
      "main": [
        [
          {
            "node": "22662720-97ae-4e59-a70e-3b858e8e632d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a61d6de1-005e-41ad-a71e-3eafde83afc7": {
      "main": [
        [
          {
            "node": "f2be6bfb-ac32-43d0-924c-d8f20a401b2f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "16869a28-c6c1-4f88-ae7a-6ca74ad97a31": {
      "main": [
        [
          {
            "node": "2836df7d-4307-485c-857e-30b0bb4cf59b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "44f4ffe7-ff9f-4716-82ef-fc3c44dc48ca": {
      "main": [
        [
          {
            "node": "351604db-d9e9-4994-8c1c-f543c13aead9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c7f51291-91df-497e-8466-031ac031384a": {
      "main": [
        [
          {
            "node": "2836df7d-4307-485c-857e-30b0bb4cf59b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "123f6190-600a-410a-b943-a6e67d4f0a86": {
      "main": [
        [
          {
            "node": "c7348c9a-e4c3-4af2-9224-5338799ed7aa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d3eff9e3-1fae-4228-bcd9-525854f3f440": {
      "main": [
        [
          {
            "node": "dfd3d16b-b7d6-49ba-a38b-076960a8a184",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f2be6bfb-ac32-43d0-924c-d8f20a401b2f": {
      "main": [
        [
          {
            "node": "8a2e23a3-c044-48ac-b66c-7205e34ad3bd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "75275b15-24e3-4fee-9d71-b4e7a2479c11": {
      "main": [
        [
          {
            "node": "94c2b864-e88d-4da8-9ca3-a34d1ca8b15b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c7348c9a-e4c3-4af2-9224-5338799ed7aa": {
      "main": [
        [
          {
            "node": "c7f51291-91df-497e-8466-031ac031384a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

上級 - 人工知能, マーケティング, IT運用

有料ですか?

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

ワークフロー情報
難易度
上級
ノード数36
カテゴリー3
ノードタイプ13
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
PollupAI

PollupAI

@zeerobug

We create bespoke AI solutions, automations and agents that help your business as it scales.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34