Task: Create a new record in Google Sheets when something happens in Hubspot

n8n workflow:
{"id":"cGYp8fpTdh3LAgP5","meta":{"instanceId":"dbd43d88d26a9e30d8aadc002c9e77f1400c683dd34efe3778d43d27250dde50"},"name":"Create a new record in Google Sheets when something happens in Hubspot","tags":[{"id":"vh6ctEIEfFztmSF2","name":"release-template-version","createdAt":"2023-09-21T09:36:34.726Z","updatedAt":"2023-09-21T09:36:52.231Z"}],"nodes":[{"id":"78395fdf-2e8b-4064-a102-c1c0335e0d94","name":"HubSpot Trigger","type":"n8n-nodes-base.hubspotTrigger","notes":"On Contact Created","position":[580,320],"webhookId":"25833e56-c646-4af0-8bbe-2eea8bda4c00","parameters":{"eventsUi":{"eventValues":[{}]},"additionalFields":{}},"notesInFlow":true,"typeVersion":1},{"id":"3888d918-c140-47a1-8024-d50fddb3f8f0","name":"IF","type":"n8n-nodes-base.if","notes":"Is Gmail Email?","position":[820,320],"parameters":{"conditions":{"string":[{"value1":"={{ $json['identity-profiles'][0].identities[0].value }}","value2":"@gmail","operation":"contains"}]}},"notesInFlow":true,"typeVersion":1},{"id":"416a8876-f496-499c-a089-aad243daabc6","name":"Is Gmail, Don't Add to Sheet","type":"n8n-nodes-base.noOp","position":[1140,240],"parameters":{},"typeVersion":1},{"id":"cf69cda9-ba96-468f-990c-6c3ad5242053","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[520,100],"parameters":{"width":480.31999999999596,"height":160.1450000000002,"content":"## Demo: Creating Google Sheets records when something happens in HubSpot\nThis workflow runs each time a new Contact is added in HubSpot. It filters out Contacts with Gmail email addresses then pushes the remaining new Contacts to [this Google Sheet](https://docs.google.com/spreadsheets/d/1GeWRcu5cvNVA-0hpHZHtatjnFtyunbgWUgRur5uT08A/edit?usp=sharing)."},"typeVersion":1},{"id":"1e4084bd-b7fb-41f1-a340-1414ef134468","name":"Google Sheets","type":"n8n-nodes-base.googleSheets","notes":"Append new contact to sheet","position":[1140,440],"parameters":{"columns":{"value":{"Name":"={{ $json.properties.num_unique_conversion_events.versions[0]['source-type'] }}","Email":"={{ $json.properties.num_unique_conversion_events.versions[0]['source-label'] }}"},"schema":[{"id":"Name","type":"string","display":true,"required":false,"displayName":"Name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Email","type":"string","display":true,"required":false,"displayName":"Email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Sync timestamp","type":"string","display":true,"required":false,"displayName":"Sync timestamp","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/1GeWRcu5cvNVA-0hpHZHtatjnFtyunbgWUgRur5uT08A/edit#gid=0","cachedResultName":"New Contacts"},"documentId":{"__rl":true,"mode":"list","value":"1GeWRcu5cvNVA-0hpHZHtatjnFtyunbgWUgRur5uT08A","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1GeWRcu5cvNVA-0hpHZHtatjnFtyunbgWUgRur5uT08A/edit?usp=drivesdk","cachedResultName":"New HubSpot Contacts"}},"credentials":{"googleSheetsOAuth2Api":{"id":"FrRoXgPJOrFwkeN4","name":"Replace me with your own Sheets credential"}},"notesInFlow":true,"typeVersion":4}],"active":false,"pinData":{"HubSpot Trigger":[{"json":{"vid":51,"portal-id":8924380,"is-contact":true,"properties":{"city":{"value":"Cambridge","versions":[{"value":"Cambridge","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"email":{"value":"bh@hubspot.com","versions":[{"value":"bh@hubspot.com","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"API","source-label":null,"updated-by-user-id":null}]},"state":{"value":"MA","versions":[{"value":"MA","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"company":{"value":"HubSpot","versions":[{"value":"HubSpot","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"website":{"value":"http://www.HubSpot.com","versions":[{"value":"http://www.HubSpot.com","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"jobtitle":{"value":"CEO","versions":[{"value":"CEO","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"lastname":{"value":"Halligan (Sample Contact)","versions":[{"value":"Halligan (Sample Contact)","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"firstname":{"value":"Brian","versions":[{"value":"Brian","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"createdate":{"value":"1606827045698","versions":[{"value":"1606827045698","selected":false,"source-id":"sample-contact","timestamp":1606827045698,"source-type":"API","source-label":null,"updated-by-user-id":null}]},"hs_pipeline":{"value":"contacts-lifecycle-pipeline","versions":[{"value":"contacts-lifecycle-pipeline","selected":false,"source-id":"BackfillHsPipelineForContacts","timestamp":1628846625829,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_object_id":{"value":"51","versions":[{"value":"51","selected":false,"source-id":"BackfillReadtimeCalculatedPropertiesJob","timestamp":1629469311146,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_is_contact":{"value":"true","versions":[{"value":"true","selected":false,"source-id":null,"timestamp":1606827045698,"source-type":"CALCULATED","source-label":null,"updated-by-user-id":null}]},"twitterhandle":{"value":"bhalligan","versions":[{"value":"bhalligan","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"hs_is_unworked":{"value":"true","versions":[{"value":"true","selected":false,"source-id":null,"timestamp":1606827045782,"source-type":"CALCULATED","source-label":null,"updated-by-user-id":null}]},"lifecyclestage":{"value":"lead","versions":[{"value":"lead","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"hs_email_domain":{"value":"hubspot.com","versions":[{"value":"hubspot.com","selected":false,"source-id":"BackfillReadtimeCalculatedPropertiesJob","timestamp":1629469311146,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_latest_source":{"value":"OFFLINE","versions":[{"value":"OFFLINE","selected":false,"source-id":"BackfillContactUpdatesKafka","timestamp":1639158301358,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"lastmodifieddate":{"value":"1651750891986","versions":[{"value":"1651750891986","selected":false,"source-id":null,"timestamp":1651750891986,"source-type":"CALCULATED","source-label":null,"updated-by-user-id":null},{"value":"1639158305597","selected":false,"source-id":null,"timestamp":1639158305597,"source-type":"CALCULATED","source-label":null,"updated-by-user-id":null},{"value":"1628846625829","selected":false,"source-id":"BackfillHsPipelineForContacts","timestamp":1628846625829,"source-type":"CALCULATED","source-label":null,"updated-by-user-id":null}]},"associatedcompanyid":{"value":"4931550080","versions":[{"value":"4931550080","selected":false,"source-id":"RollupProperties","timestamp":1606827057264,"source-type":"CALCULATED","source-label":null,"updated-by-user-id":null}]},"hs_all_contact_vids":{"value":"51","versions":[{"value":"51","selected":false,"source-id":"BackfillReadtimeCalculatedPropertiesJob","timestamp":1629469311146,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_analytics_source":{"value":"OFFLINE","versions":[{"value":"OFFLINE","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"twitterprofilephoto":{"value":"https://pbs.twimg.com/profile_images/3491742741/212e42c07d3348251da10872e85aa6b0.jpeg","versions":[{"value":"https://pbs.twimg.com/profile_images/3491742741/212e42c07d3348251da10872e85aa6b0.jpeg","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"hs_analytics_revenue":{"value":"0.0","versions":[{"value":"0.0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_marketable_status":{"value":"true","versions":[{"value":"true","selected":false,"source-id":"sample-contact","timestamp":1606827045876,"source-type":"API","source-label":null,"updated-by-user-id":null}]},"num_conversion_events":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"BackfillReadtimeCalculatedPropertiesJob","timestamp":1629469311146,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_analytics_num_visits":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_latest_source_data_1":{"value":"API","versions":[{"value":"API","selected":false,"source-id":"BackfillContactUpdatesKafka","timestamp":1639158301358,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_latest_source_data_2":{"value":"sample-contact","versions":[{"value":"sample-contact","selected":false,"source-id":"BackfillContactUpdatesKafka","timestamp":1639158301358,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_marketable_reason_id":{"value":"Sample Contact","versions":[{"value":"Sample Contact","selected":false,"source-id":"sample-contact","timestamp":1606827045876,"source-type":"API","source-label":null,"updated-by-user-id":null}]},"hs_social_twitter_clicks":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_marketable_reason_type":{"value":"SAMPLE_CONTACT","versions":[{"value":"SAMPLE_CONTACT","selected":false,"source-id":"sample-contact","timestamp":1606827045876,"source-type":"API","source-label":null,"updated-by-user-id":null}]},"hs_social_facebook_clicks":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_social_linkedin_clicks":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_analytics_source_data_1":{"value":"API","versions":[{"value":"API","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827054762,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_analytics_source_data_2":{"value":"sample-contact","versions":[{"value":"sample-contact","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827054762,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_latest_source_timestamp":{"value":"1606827045720","versions":[{"value":"1606827045720","selected":false,"source-id":"BackfillContactUpdatesKafka","timestamp":1651750884919,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_analytics_num_page_views":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_lifecyclestage_lead_date":{"value":"1606827045444","versions":[{"value":"1606827045444","selected":false,"source-id":"sample-contact","timestamp":1606827045444,"source-type":"CONTACTS_WEB","source-label":null,"updated-by-user-id":null}]},"hs_marketable_until_renewal":{"value":"true","versions":[{"value":"true","selected":false,"source-id":"sample-contact","timestamp":1606827045876,"source-type":"API","source-label":null,"updated-by-user-id":null}]},"hs_analytics_first_timestamp":{"value":"1606827045444","versions":[{"value":"1606827045444","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_social_google_plus_clicks":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"num_unique_conversion_events":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"BackfillReadtimeCalculatedPropertiesJob","timestamp":1629469311146,"source-type":"MIGRATION","source-label":null,"updated-by-user-id":null}]},"hs_social_num_broadcast_clicks":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_analytics_average_page_views":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]},"hs_analytics_num_event_completions":{"value":"0","versions":[{"value":"0","selected":false,"source-id":"ContactAnalyticsDetailsUpdateWorker","timestamp":1606827047569,"source-type":"ANALYTICS","source-label":null,"updated-by-user-id":null}]}},"merged-vids":[],"merge-audits":[],"canonical-vid":51,"form-submissions":[],"list-memberships":[],"identity-profiles":[{"vid":51,"identities":[{"type":"EMAIL","value":"bh@hubspot.com","timestamp":1606827045444,"is-primary":true},{"type":"LEAD_GUID","value":"d3749acc-06e1-4511-84fd-7b0d847f6eff","timestamp":1606827045717}],"saved-at-timestamp":1606827045720,"deleted-changed-timestamp":0}],"associated-company":{"portal-id":8924380,"company-id":4931550080,"properties":{"zip":{"value":"02141"},"city":{"value":"Cambridge"},"name":{"value":"HubSpot, Inc."},"phone":{"value":"+1 888-482-7768"},"state":{"value":"MA"},"domain":{"value":"hubspot.com"},"address":{"value":"25 First Street"},"country":{"value":"United States"},"website":{"value":"hubspot.com"},"industry":{"value":"COMPUTER_SOFTWARE"},"timezone":{"value":"America/New_York"},"is_public":{"value":"true"},"createdate":{"value":"1606827053844"},"description":{"value":"HubSpot is an American developer and marketer of software products for inbound marketing, sales, and customer service."},"linkedinbio":{"value":"HubSpot is an American developer and marketer of software products for inbound marketing, sales, and customer service."},"founded_year":{"value":"2006"},"hs_object_id":{"value":"4931550080"},"annualrevenue":{"value":"250000000"},"twitterhandle":{"value":"HubSpot"},"hs_num_blockers":{"value":"0"},"web_technologies":{"value":"unbounce;instagram;app_nexus;piwik;google_analytics;mixpanel;google_tag_manager;facebook_advertiser;salesforce;cloud_flare;dstillery;twitter_button;hubspot;vidyard;facebook_connect;crazy_egg;amazon__cloudfront;wistia;optimizely"},"hs_num_open_deals":{"value":"0"},"numberofemployees":{"value":"5000"},"total_money_raised":{"value":"100.5M"},"hs_analytics_source":{"value":"OFFLINE"},"hs_lastmodifieddate":{"value":"1653392172246"},"facebook_company_page":{"value":"https://www.facebook.com/hubspot"},"linkedin_company_page":{"value":"https://www.linkedin.com/company/hubspot"},"hs_num_child_companies":{"value":"0"},"hs_num_decision_makers":{"value":"0"},"hs_analytics_num_visits":{"value":"0"},"num_associated_contacts":{"value":"2"},"first_contact_createdate":{"value":"1606827045444"},"hs_analytics_latest_source":{"value":"OFFLINE"},"hs_analytics_source_data_1":{"value":"API"},"hs_analytics_source_data_2":{"value":"sample-contact"},"hs_analytics_num_page_views":{"value":"0"},"hs_analytics_first_timestamp":{"value":"1606827045444"},"hs_target_account_probability":{"value":"0.49565839767456055"},"hs_annual_revenue_currency_code":{"value":"USD"},"hs_analytics_latest_source_data_1":{"value":"API"},"hs_analytics_latest_source_data_2":{"value":"sample-contact"},"hs_num_contacts_with_buying_roles":{"value":"0"},"hs_analytics_latest_source_timestamp":{"value":"1606827045720"}}}}}]},"settings":{"executionOrder":"v1"},"versionId":"4748dbbc-75dd-400e-98d1-41bbd82c7208","connections":{"IF":{"main":[[{"node":"Is Gmail, Don't Add to Sheet","type":"main","index":0}],[{"node":"Google Sheets","type":"main","index":0}]]},"HubSpot Trigger":{"main":[[{"node":"IF","type":"main","index":0}]]}}}