{ "name": "List All HubSpot Contacts", "nodes": [ { "name": "On clicking 'execute'", "type": "n8n-nodes-base.manualTrigger", "position": [ 440, 320 ], "parameters": {}, "typeVersion": 1, "id": "list-all-hubspot-contacts-legacy-0" }, { "name": "Read contacts", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "parameters": { "url": "https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=100&limit=250", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "options": { "response": { "response": { "responseFormat": "json", "fullResponse": true } }, "pagination": { "pagination": { "paginationMode": "responseContainsNextURL", "nextURL": "={{ 'https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=100&limit=250' + ($pageCount === 0 ? '' : '&vidOffset=' + encodeURIComponent($response.body['vid-offset'])) }}", "paginationCompleteWhen": "other", "completeExpression": "={{ !$response.body['has-more'] }}", "limitPagesFetched": false } } } }, "id": "list-all-hubspot-contacts-legacy-1" }, { "name": "Collect contacts", "type": "n8n-nodes-base.code", "typeVersion": 2, "parameters": { "mode": "runOnceForAllItems", "jsCode": "const rows=[];for(const {json} of $input.all()){const b=json.body;if(!b||!Array.isArray(b.contacts))throw Error('Invalid HubSpot page');for(const x of b.contacts)rows.push({json:x})}return rows;" }, "id": "list-all-hubspot-contacts-legacy-2" } ], "active": false, "settings": {}, "connections": { "On clicking 'execute'": { "main": [ [ { "node": "Read contacts", "type": "main", "index": 0 } ] ] }, "Read contacts": { "main": [ [ { "node": "Collect contacts", "type": "main", "index": 0 } ] ] } }, "pinData": {} }