Task: Sync Hubspot with Outlook (for secondary domain) 

n8n workflow JSON:
{"meta":{"instanceId":"5e94c4e840a537eafad41834dc1cdea87e7b992e4a38d15d50e7b95cebc2c"},"nodes":[{"id":"bf32cf83-682a-4e08-9716-f85979431ad2","name":"Merge3","type":"n8n-nodes-base.merge","position":[280,800],"parameters":{"mode":"combine","options":{},"joinMode":"enrichInput1","mergeByFields":{"values":[{"field1":"email_adress","field2":"email_adress"}]}},"typeVersion":2},{"id":"43c538c0-8ccf-43e3-a58f-bff1b04fdfde","name":"Airtable3","type":"n8n-nodes-base.airtable","position":[1480,820],"parameters":{"table":{"__rl":true,"mode":"url","value":"","__regex":"https://airtable.com/[a-zA-Z0-9]{2,}/([a-zA-Z0-9]{2,})"},"options":{},"operation":"append","application":{"__rl":true,"mode":"url","value":"","__regex":"https://airtable.com/([a-zA-Z0-9]{2,})"}},"credentials":{"airtableApi":{"id":"56","name":"Airtable account"}},"typeVersion":1},{"id":"ecedde79-c611-45cb-a783-607ccc049bd9","name":"Set2","type":"n8n-nodes-base.set","position":[920,820],"parameters":{"values":{"number":[{"name":"contact_ID","value":"={{$json[\"contact_ID\"]}}"}],"string":[{"name":"email_adress","value":"={{$json[\"email_adress\"]}}"},{"name":"email_ID","value":"={{$json[\"email_id\"]}}"},{"name":"email_body","value":"={{ $json[\"email_content\"] }}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"d2bd9223-7753-4f96-880e-82fe91b49a2b","name":"Airtable4","type":"n8n-nodes-base.airtable","position":[-1640,880],"parameters":{"table":{"__rl":true,"mode":"url","value":"","__regex":"https://airtable.com/[a-zA-Z0-9]{2,}/([a-zA-Z0-9]{2,})"},"operation":"list","application":{"__rl":true,"mode":"url","value":"","__regex":"https://airtable.com/([a-zA-Z0-9]{2,})"},"additionalOptions":{}},"credentials":{"airtableApi":{"id":"56","name":"Airtable account"}},"typeVersion":1},{"id":"c4f0910f-b948-4518-9a28-4bba0be9489d","name":"SplitInBatches3","type":"n8n-nodes-base.splitInBatches","position":[1280,820],"parameters":{"options":{},"batchSize":1},"typeVersion":1},{"id":"12f34efb-ec83-4a3c-9356-a0f9d721fee6","name":"IF5","type":"n8n-nodes-base.if","position":[1680,820],"parameters":{"conditions":{"boolean":[{"value1":true,"value2":"={{$node[\"SplitInBatches3\"].context[\"noItemsLeft\"]}}"}]}},"typeVersion":1},{"id":"8aecfb9d-ef3a-4252-bd43-3be35c01bed2","name":"SplitInBatches4","type":"n8n-nodes-base.splitInBatches","position":[980,1100],"parameters":{"options":{},"batchSize":1},"typeVersion":1},{"id":"da3e0bb2-92b5-4e90-adea-4fce1806f868","name":"IF6","type":"n8n-nodes-base.if","position":[1720,1100],"parameters":{"conditions":{"boolean":[{"value1":true,"value2":"={{$node[\"SplitInBatches4\"].context[\"noItemsLeft\"]}}"}]}},"typeVersion":1},{"id":"9a5c6f5c-6d0f-495d-8fcd-6f94c351ebc9","name":"Item Lists","type":"n8n-nodes-base.itemLists","position":[680,820],"parameters":{"operation":"limit"},"typeVersion":1},{"id":"750c1870-294c-45b3-81a0-54ea930c2a24","name":"Read_Contact_ID","type":"n8n-nodes-base.googleSheets","position":[-1640,1140],"parameters":{"options":{},"authentication":"serviceAccount"},"credentials":{"googleApi":{"id":"44","name":"Google account"}},"typeVersion":2},{"id":"37e0f618-e69a-471e-948f-08920de70c8c","name":"Set_contact_ID","type":"n8n-nodes-base.set","position":[-220,1140],"parameters":{"values":{"string":[{"name":"email_adress","value":"={{ $json[\"email_adress\"] }}"},{"name":"contact_ID","value":"={{ $json[\"contact_ID\"] }}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"3f81c5c5-b829-4015-b504-62c1bdcbcf70","name":"Merge","type":"n8n-nodes-base.merge","position":[0,760],"parameters":{"mode":"combine","options":{},"joinMode":"keepNonMatches","mergeByFields":{"values":[{"field1":"email_adress","field2":"email_adress"}]}},"typeVersion":2},{"id":"1d40ee48-19ec-4e1a-bf17-d081febb11dc","name":"Set_outlook","type":"n8n-nodes-base.set","position":[-220,640],"parameters":{"values":{"string":[{"name":"email_adress","value":"={{$node[\"Set1\"].json[\"sender_email\"]}}"},{"name":"email_content","value":"={{$json[\"list\"]}}"},{"name":"email_id","value":"={{$node[\"Get_messages\"].json[\"id\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"383a8a33-dfb6-4dcc-aa42-a0d98ceb0161","name":"Set_airtable","type":"n8n-nodes-base.set","position":[-220,880],"parameters":{"values":{"string":[{"name":"email_adress","value":"={{$json[\"fields\"][\"email_adress\"]}}"}]},"options":{}},"typeVersion":1},{"id":"1d3e0d30-7270-4292-9373-e77b9d8edf7f","name":"Set","type":"n8n-nodes-base.set","position":[-1460,640],"parameters":{"values":{"string":[{"name":"ID_Folder","value":"={{$json[\"id\"]}}"},{"name":"Folder_Name","value":"={{$json[\"displayName\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"cdf18e62-e34f-4b9f-9a5a-ccec5c25334d","name":"NoOp1","type":"n8n-nodes-base.noOp","position":[-1280,340],"parameters":{},"typeVersion":1},{"id":"c794a7d4-ae69-4ce3-91d1-4c096f4b21cb","name":"IF","type":"n8n-nodes-base.if","position":[500,800],"parameters":{"conditions":{"string":[{"value1":"={{ $json[\"contact_ID\"] }}","operation":"isEmpty"}]}},"typeVersion":1},{"id":"54e90132-ba1e-4dc9-996b-028f67130f4e","name":"IF2","type":"n8n-nodes-base.if","position":[-820,620],"parameters":{"conditions":{"string":[{"value1":"={{$json[\"sender\"][\"emailAddress\"][\"address\"]}}","value2":"@gxpcs.onmicrosoft.com","operation":"endsWith"},{"value1":"={{$json[\"sender\"][\"emailAddress\"][\"address\"]}}","value2":"postmaster","operation":"contains"}]},"combineOperation":"any"},"typeVersion":1},{"id":"a5837b13-7ac4-4fde-a0fe-d978e82e8b96","name":"NoOp","type":"n8n-nodes-base.noOp","position":[-840,360],"parameters":{},"typeVersion":1},{"id":"e809006a-bd35-4788-a705-be93a55e12e4","name":"email has changed","type":"n8n-nodes-base.noOp","position":[600,480],"parameters":{},"typeVersion":1},{"id":"72b3344b-7c4e-48e9-abf5-ca28b23fa4d3","name":"Set1","type":"n8n-nodes-base.set","position":[-600,640],"parameters":{"values":{"string":[{"name":"contenu_email","value":"={{$json[\"body\"][\"content\"]}}"},{"name":"sender_email","value":"={{$json[\"sender\"][\"emailAddress\"][\"address\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"d88eb4d3-37d5-4856-91bc-ddcc8a45b09b","name":"Retrieve_folders","type":"n8n-nodes-base.microsoftOutlook","position":[-1640,640],"parameters":{"resource":"folder","operation":"getAll","additionalFields":{}},"credentials":{"microsoftOutlookOAuth2Api":{"id":"45","name":"Microsoft Outlook account"}},"typeVersion":1},{"id":"55f86887-ca0c-48e0-9316-b0e8f21562a9","name":"Select_folder","type":"n8n-nodes-base.if","position":[-1260,640],"parameters":{"conditions":{"string":[{"value1":"={{ $json[\"Folder_Name\"] }}","value2":"Boîte de réception","operation":"contains"}]}},"typeVersion":1},{"id":"60bb9a89-a68f-4585-a199-4ca74bf8c6cb","name":"Get_messages","type":"n8n-nodes-base.microsoftOutlook","position":[-1040,620],"parameters":{"limit":500,"folderId":"={{$json[\"ID_Folder\"]}}","resource":"folderMessage","operation":"getAll","additionalFields":{}},"credentials":{"microsoftOutlookOAuth2Api":{"id":"47","name":"Microsoft Outlook"}},"typeVersion":1},{"id":"07c643d1-e537-4802-bc63-6d5cd87336d8","name":"Extract HTML -> Text","type":"n8n-nodes-base.htmlExtract","position":[-400,640],"parameters":{"options":{},"dataPropertyName":"contenu_email","extractionValues":{"values":[{"key":"list","cssSelector":"body"}]}},"typeVersion":1},{"id":"8ca424c6-088f-47e4-9854-4e8b9ff6aaad","name":"Store_email","type":"n8n-nodes-base.hubspot","position":[1500,1100],"parameters":{"type":"email","metadata":{"html":"={{$json[\"email_content\"]}}","fromEmail":"={{$json[\"email_adress\"]}}"},"resource":"engagement","additionalFields":{"associations":{"contactIds":"={{$json[\"contact_ID\"]}}"}}},"credentials":{"hubspotApi":{"id":"6","name":"Hubspot account"}},"typeVersion":1},{"id":"479059c6-63af-4786-8ff9-1439e40ae280","name":"Set_engegement_id","type":"n8n-nodes-base.set","position":[1960,1080],"parameters":{"values":{"number":[{"name":"engagement_id","value":"={{$json[\"engagement\"][\"id\"]}}"}],"string":[{"name":"email_address","value":"={{$json[\"metadata\"][\"from\"][\"email\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"91b8c666-87cd-4075-86ca-91038fb34fb1","name":"Set_airtable_id","type":"n8n-nodes-base.set","position":[1920,800],"parameters":{"values":{"string":[{"name":"airtable_id","value":"={{ $json[\"id\"] }}"},{"name":"email","value":"={{$json[\"fields\"][\"email_adress\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"08c0b2da-08d7-4712-a49f-a45e188c03fd","name":"Merge1","type":"n8n-nodes-base.merge","position":[2320,980],"parameters":{"mode":"combine","options":{},"mergeByFields":{"values":[{"field1":"email","field2":"email_address"}]}},"typeVersion":2},{"id":"53f05bbd-287a-4162-9ef4-91b664fc277e","name":"Airtable","type":"n8n-nodes-base.airtable","position":[2880,980],"parameters":{"id":"={{$node[\"Prepare_update\"].json[\"airtable_id\"]}}","table":{"__rl":true,"mode":"url","value":"","__regex":"https://airtable.com/[a-zA-Z0-9]{2,}/([a-zA-Z0-9]{2,})"},"fields":["engagement_id"],"options":{},"operation":"update","application":{"__rl":true,"mode":"url","value":"","__regex":"https://airtable.com/([a-zA-Z0-9]{2,})"},"updateAllFields":false},"credentials":{"airtableApi":{"id":"56","name":"Airtable account"}},"typeVersion":1},{"id":"1727f654-bc48-4465-bc81-24bb43050f07","name":"SplitInBatches","type":"n8n-nodes-base.splitInBatches","position":[2680,980],"parameters":{"options":{},"batchSize":1},"typeVersion":1},{"id":"1ec755c7-14d0-45cf-9c2c-f9d23e557f79","name":"IF7","type":"n8n-nodes-base.if","position":[3080,980],"parameters":{"conditions":{"boolean":[{"value1":true,"value2":"={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}"}]}},"typeVersion":1},{"id":"e91e5e33-809f-43a5-8165-8962a6a3b2d7","name":"Prepare_update","type":"n8n-nodes-base.set","position":[2500,980],"parameters":{"values":{"number":[{"name":"contact_ID","value":"={{$json[\"contact_ID\"]}}"}],"string":[{"name":"email","value":"={{$json[\"email_adress\"]}} {{ $json[\"email\"] }}"},{"name":"airtable_id","value":"={{ $json[\"airtable_id\"] }}"},{"name":"engagement_id","value":"={{ $json[\"engagement_id\"] }}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"id":"614a465d-cd60-4455-9d03-17982f200dd1","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","disabled":true,"position":[-1860,880],"parameters":{"rule":{"interval":[{"field":"minutes","minutesInterval":1}]}},"typeVersion":1},{"id":"bfdd0128-42b8-40d3-85d6-8ff39b661b25","name":"Set3","type":"n8n-nodes-base.set","position":[1280,1100],"parameters":{"values":{"string":[{"name":"email_adress","value":"={{ $json[\"email_adress\"] }}"},{"name":"email_content","value":"={{ $json[\"email_content\"] }}"},{"name":"Contact_ID ","value":"={{ $json[\"contact_ID\"] }}"}]},"options":{},"keepOnlySet":true},"typeVersion":1}],"connections":{"IF":{"main":[[{"node":"email has changed","type":"main","index":0}],[{"node":"Item Lists","type":"main","index":0}]]},"IF2":{"main":[[{"node":"NoOp","type":"main","index":0}],[{"node":"Set1","type":"main","index":0}]]},"IF5":{"main":[[{"node":"Set_airtable_id","type":"main","index":0}],[{"node":"SplitInBatches3","type":"main","index":0}]]},"IF6":{"main":[[{"node":"Set_engegement_id","type":"main","index":0}],[{"node":"SplitInBatches4","type":"main","index":0}]]},"IF7":{"main":[null,[{"node":"SplitInBatches","type":"main","index":0}]]},"Set":{"main":[[{"node":"Select_folder","type":"main","index":0}]]},"Set1":{"main":[[{"node":"Extract HTML -> Text","type":"main","index":0}]]},"Set2":{"main":[[{"node":"SplitInBatches3","type":"main","index":0}]]},"Set3":{"main":[[{"node":"Store_email","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Merge3","type":"main","index":0}]]},"Merge1":{"main":[[{"node":"Prepare_update","type":"main","index":0}]]},"Merge3":{"main":[[{"node":"IF","type":"main","index":0}]]},"Airtable":{"main":[[{"node":"IF7","type":"main","index":0}]]},"Airtable3":{"main":[[{"node":"IF5","type":"main","index":0}]]},"Airtable4":{"main":[[{"node":"Set_airtable","type":"main","index":0}]]},"Item Lists":{"main":[[{"node":"Set2","type":"main","index":0},{"node":"SplitInBatches4","type":"main","index":0}]]},"Set_outlook":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Store_email":{"main":[[{"node":"IF6","type":"main","index":0}]]},"Get_messages":{"main":[[{"node":"IF2","type":"main","index":0}]]},"Set_airtable":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Select_folder":{"main":[[{"node":"Get_messages","type":"main","index":0}],[{"node":"NoOp1","type":"main","index":0}]]},"Prepare_update":{"main":[[{"node":"SplitInBatches","type":"main","index":0}]]},"Set_contact_ID":{"main":[[{"node":"Merge3","type":"main","index":1}]]},"SplitInBatches":{"main":[[{"node":"Airtable","type":"main","index":0}]]},"Read_Contact_ID":{"main":[[{"node":"Set_contact_ID","type":"main","index":0}]]},"Set_airtable_id":{"main":[[{"node":"Merge1","type":"main","index":0}]]},"SplitInBatches3":{"main":[[{"node":"Airtable3","type":"main","index":0}]]},"SplitInBatches4":{"main":[[{"node":"Set3","type":"main","index":0}]]},"Retrieve_folders":{"main":[[{"node":"Set","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Retrieve_folders","type":"main","index":0},{"node":"Airtable4","type":"main","index":0},{"node":"Read_Contact_ID","type":"main","index":0}]]},"Set_engegement_id":{"main":[[{"node":"Merge1","type":"main","index":1}]]},"Extract HTML -> Text":{"main":[[{"node":"Set_outlook","type":"main","index":0}]]}}}