Task: LoneScale - Tracking contacts' job changes to Salesforce

n8n workflow JSON:
{"id":"21","meta":{"instanceId":"81b0d0f4ebb052991cb352e76cb8b2803ed521afd57aeef066e0ecfe83fd76cc"},"name":"LoneScale - Tracking contacts' job changes to Salesforce","tags":[{"id":"1","name":"Example","createdAt":"2022-12-30T09:13:52.086Z","updatedAt":"2022-12-30T09:13:52.086Z"}],"nodes":[{"id":"b67ca866-4e44-4671-a580-e0ec7208c9bc","name":"searchContact","type":"n8n-nodes-base.salesforce","disabled":true,"position":[-220,940],"parameters":{"query":"=SELECT Name, Id FROM Contact WHERE Linkedin_Company_Id__c = '{{$json[\"company_id\"]}}' LIMIT 1","resource":"search"},"typeVersion":1},{"id":"445cfdcb-0c52-442b-b677-b66dc1e1f26a","name":"searchAccount","type":"n8n-nodes-base.salesforce","position":[140,740],"parameters":{"query":"=SELECT Name, Id FROM Account WHERE Linkedin_Company_Id__c = '{{$json[\"company_id\"]}}' LIMIT 1","resource":"search"},"typeVersion":1},{"id":"01b2d9f2-cb6c-4d57-a15f-c5985b19373d","name":"LoneScale - GetJobChanges","type":"n8n-nodes-base.webhook","position":[-740,760],"webhookId":"964614c1-bed7-4af2-b77f-1530737a9234","parameters":{"path":"lonescalecontacttracking","options":{},"httpMethod":"POST"},"typeVersion":1},{"id":"8ed590d9-d7a4-45d5-9de9-a46c247db718","name":"checkAccountExist","type":"n8n-nodes-base.if","position":[340,740],"parameters":{"conditions":{"string":[{"value1":"={{$node[\"searchAccount\"].json[\"item\"][\"id\"]}}","operation":"isNotEmpty"}]}},"typeVersion":1},{"id":"c2d658aa-5e61-404b-93b5-a3331a7bb499","name":"createAccount","type":"n8n-nodes-base.salesforce","position":[700,820],"parameters":{"name":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}}","resource":"account","additionalFields":{"customFieldsUi":{"customFieldsValues":[{"value":"= {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}","fieldId":"APIId_LinkedinUrl"}]}}},"typeVersion":1},{"id":"66db17ae-83bf-41be-a8ef-f63ec45e865d","name":"updateContact","type":"n8n-nodes-base.salesforce","position":[1180,520],"parameters":{"resource":"contact","contactId":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"client_contact_id\"] }}","operation":"update","updateFields":{"title":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}","acconuntId":"={{ $json[\"id\" }}","customFieldsUi":{"customFieldsValues":[{"value":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_linkedin_url\"] }}","fieldId":"linkedinurl"},{"value":"={{new Date()}}","fieldId":"datelastupdate"},{"value":"=enriched_by_lonescale_{{new Date().toLocaleDateString()}}_{{new Date().toLocaleTimeString()}}","fieldId":"LS - job change"}]}}},"typeVersion":1},{"id":"56adc34c-97f5-41ba-9a39-58bbadd37803","name":"IFPersonCRMId","type":"n8n-nodes-base.if","position":[-540,760],"parameters":{"conditions":{"string":[{"value1":"={{ $json[\"idcrm\"] }}","operation":"isNotEmpty"}]}},"typeVersion":1},{"id":"5ed79117-570c-4997-8a46-8881b6cb490b","name":"Note5","type":"n8n-nodes-base.stickyNote","position":[-740,620],"parameters":{"width":183.5294162084655,"height":102.58823351661385,"content":"Change \"idcrm\" based the field name of your CRMId in your file imported on LoneScale"},"typeVersion":1},{"id":"cf95ff51-460c-423b-8180-51d1e73ad2de","name":"check_company","type":"n8n-nodes-base.if","position":[500,960],"parameters":{"conditions":{"string":[{"value1":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"] }}","operation":"isNotEmpty"},{"value1":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"] }}","value2":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"client_company_name\"] }}","operation":"notContains"}]}},"typeVersion":1},{"id":"b26a2db7-018d-4e79-a827-6437dd66a53e","name":"IF_LinkedIn_url_contact","type":"n8n-nodes-base.if","position":[900,600],"parameters":{"conditions":{"string":[{"value1":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"client_linkedin_url\"] }}","operation":"isEmpty"}]}},"typeVersion":1},{"id":"3d18c51a-42da-432e-9d4e-bcdb91571021","name":"IF_LinkedIn_url_contact1","type":"n8n-nodes-base.if","position":[900,980],"parameters":{"conditions":{"string":[{"value1":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"client_linkedin_url\"] }}","operation":"isEmpty"}]}},"typeVersion":1},{"id":"328c3d14-7ba2-4fa8-b234-97a4fd198af5","name":"Note1","type":"n8n-nodes-base.stickyNote","position":[2460,860],"parameters":{"height":80,"content":"Final step can be a slack post to your sales reps notification channel"},"typeVersion":1},{"id":"254d8364-d677-4e6a-9357-5f13573bc122","name":"postNotifSlack","type":"n8n-nodes-base.slack","position":[2500,700],"parameters":{"text":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"client_full_name\"]}} has a job changes:\nStatut: {{$node[\"routeJobChangeType\"].parameter[\"fallbackOutput\"] === 2 ? \"position\" : $node[\"routeJobChangeType\"].parameter[\"fallbackOutput\"] === 1 ? \"company\"  : $node[\"routeJobChangeType\"].parameter[\"fallbackOutput\"] === 0 ? \"company + position\" : \"\" }}\n<br>Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>New company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}","attachments":[],"otherOptions":{},"authentication":"oAuth2"},"typeVersion":1},{"id":"54dd87df-bbf5-46ec-8cc0-f1d0f9c39dc9","name":"createTask","type":"n8n-nodes-base.salesforce","position":[1880,480],"parameters":{"resource":"task","additionalFields":{"description":"=Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>\nNew company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}\n<br>\nStatut: company + position"}},"typeVersion":1},{"id":"5b2a971b-15d2-4bce-847c-ff4df955045a","name":"updateContact1","type":"n8n-nodes-base.salesforce","position":[1180,720],"parameters":{"resource":"contact","contactId":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"client_contact_id\"] }}","operation":"update","updateFields":{"title":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}","acconuntId":"={{ $json[\"id\" }}","customFieldsUi":{"customFieldsValues":[{"value":"={{new Date()}}","fieldId":"datelastupdate"},{"value":"=enriched_by_lonescale_{{new Date().toLocaleDateString()}}_{{new Date().toLocaleTimeString()}}","fieldId":"LS - job change"}]}}},"typeVersion":1},{"id":"63efb1e0-9301-4faf-9a3e-18c6b7a179b5","name":"updateContact2","type":"n8n-nodes-base.salesforce","position":[1180,980],"parameters":{"resource":"contact","contactId":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"client_contact_id\"] }}","operation":"update","updateFields":{"title":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}","acconuntId":"={{ $json[\"id\" }}","customFieldsUi":{"customFieldsValues":[{"value":"={{new Date()}}","fieldId":"datelastupdate"},{"value":"=enriched_by_lonescale_{{new Date().toLocaleDateString()}}_{{new Date().toLocaleTimeString()}}","fieldId":"LS - job change"},{"value":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_linkedin_url\"] }}","fieldId":"linkedinurl"}]}}},"typeVersion":1},{"id":"c66b2454-1941-4801-a508-f553606ae7f6","name":"updateContact3","type":"n8n-nodes-base.salesforce","position":[1180,1160],"parameters":{"resource":"contact","contactId":"={{ $node[\"LoneScale - GetJobChanges\"].json[\"client_contact_id\"] }}","operation":"update","updateFields":{"title":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}","acconuntId":"={{ $json[\"id\" }}","customFieldsUi":{"customFieldsValues":[{"value":"={{new Date()}}","fieldId":"datelastupdate"},{"value":"=enriched_by_lonescale_{{new Date().toLocaleDateString()}}_{{new Date().toLocaleTimeString()}}","fieldId":"LS - job change"}]}}},"typeVersion":1},{"id":"24ef6fc0-4a25-4bd8-a074-a38cb9f87b65","name":"routeJobChangeType","type":"n8n-nodes-base.switch","position":[1480,520],"parameters":{"rules":{"rules":[{"value2":"true true"},{"output":1,"value2":"true false"},{"output":2,"value2":"false true"}]},"value1":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_company\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_job_title\"]}}","dataType":"string","fallbackOutput":3},"typeVersion":1},{"id":"6d118a0b-9c8e-4ed5-bfb9-422ddec6eba2","name":"routeJobChangeType1","type":"n8n-nodes-base.switch","position":[1480,720],"parameters":{"rules":{"rules":[{"value2":"true true"},{"output":1,"value2":"true false"},{"output":2,"value2":"false true"}]},"value1":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_company\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_job_title\"]}}","dataType":"string","fallbackOutput":3},"typeVersion":1},{"id":"ed800a81-30a0-4206-8e3e-0a1821ffcdf7","name":"routeJobChangeType2","type":"n8n-nodes-base.switch","position":[1480,980],"parameters":{"rules":{"rules":[{"value2":"true true"},{"output":1,"value2":"true false"},{"output":2,"value2":"false true"}]},"value1":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_company\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_job_title\"]}}","dataType":"string","fallbackOutput":3},"typeVersion":1},{"id":"caa03f3a-eaa2-4707-abda-baf1ee28e217","name":"routeJobChangeType3","type":"n8n-nodes-base.switch","position":[1480,1160],"parameters":{"rules":{"rules":[{"value2":"true true"},{"output":1,"value2":"true false"},{"output":2,"value2":"false true"}]},"value1":"={{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_company\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_change_job_title\"]}}","dataType":"string","fallbackOutput":3},"typeVersion":1},{"id":"0da0a19d-6b1f-47c1-9be9-8b1ab0c10713","name":"Note6","type":"n8n-nodes-base.stickyNote","position":[1440,340],"parameters":{"width":176.47059323452353,"height":125.2763927405135,"content":"Check if contact:\n1. Position Changed\n2. Account changed\n3. Account & Position changed"},"typeVersion":1},{"id":"9578557b-15fa-4511-99fd-a01c164f19dd","name":"createTask1","type":"n8n-nodes-base.salesforce","position":[1880,620],"parameters":{"resource":"task","additionalFields":{"description":"=Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>\nNew company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}\n<br>\nStatut: company"}},"typeVersion":1},{"id":"82ab49e0-28fe-44b1-8576-6c928d957d76","name":"createTask2","type":"n8n-nodes-base.salesforce","position":[1880,760],"parameters":{"resource":"task","additionalFields":{"description":"=Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>\nNew company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}\n<br>\nStatut: position"}},"typeVersion":1},{"id":"0a8f606a-aa2a-4c40-a399-793d334d505a","name":"createTask3","type":"n8n-nodes-base.salesforce","position":[1880,980],"parameters":{"resource":"task","additionalFields":{"description":"=Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>\nNew company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}\n<br>\nStatut: company + position"}},"typeVersion":1},{"id":"1c13acf4-b734-4fef-954f-be7db456a676","name":"createTask4","type":"n8n-nodes-base.salesforce","position":[1880,1100],"parameters":{"resource":"task","additionalFields":{"description":"=Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>\nNew company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}\n<br>\nStatut: company"}},"typeVersion":1},{"id":"eaf99a8c-00b2-4da9-8b87-a6689aac83db","name":"createTask5","type":"n8n-nodes-base.salesforce","position":[1880,1240],"parameters":{"resource":"task","additionalFields":{"description":"=Job title: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_job_title\"]}}\n<br>\nNew company: {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_name\"]}} {{$node[\"LoneScale - GetJobChanges\"].json[\"body\"][\"lonescale_company_linkedin_url\"]}}\n<br>\nStatut: position"}},"typeVersion":1},{"id":"9718d2b5-786c-4915-97a9-a54632bf4a69","name":"Note","type":"n8n-nodes-base.stickyNote","position":[1820,160],"parameters":{"height":220.68599524879056,"content":"Choose your process between:\n- Create a Task in Sales reps ToDoList \n- Add an item to your Intent Custom Object\n\nIf you choose Custom Object, replace all the createTask nodes with it.\nDelete the node you don't need."},"typeVersion":1},{"id":"7f09eadd-f424-49e2-a2b4-86614434ecf1","name":"createCustomObject","type":"n8n-nodes-base.salesforce","position":[2100,220],"parameters":{"resource":"customObject","operation":"upsert","additionalFields":{}},"typeVersion":1},{"id":"f59765f7-1b7d-4215-aa14-b85e64e72d8c","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","position":[2500,1020],"parameters":{},"typeVersion":1},{"id":"c215c059-9a1a-4f82-b2cd-2ae35b9afc56","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[820,460],"parameters":{"height":110.54838709677419,"content":"With this IF, you choose to not replace LinkedIn Url in your CRM even if it's outdated and  LoneScale detects a new one."},"typeVersion":1}],"active":false,"pinData":{},"settings":{},"versionId":"5f5d8515-798e-4fe8-8e04-4c3b426165b7","connections":{"createTask":{"main":[[{"node":"postNotifSlack","type":"main","index":0}]]},"createTask1":{"main":[[{"node":"postNotifSlack","type":"main","index":0}]]},"createTask2":{"main":[[{"node":"postNotifSlack","type":"main","index":0}]]},"createTask3":{"main":[[{"node":"No Operation, do nothing","type":"main","index":0}]]},"createTask4":{"main":[[{"node":"No Operation, do nothing","type":"main","index":0}]]},"createTask5":{"main":[[{"node":"No Operation, do nothing","type":"main","index":0}]]},"IFPersonCRMId":{"main":[[{"node":"searchAccount","type":"main","index":0}],[{"node":"searchContact","type":"main","index":0}]]},"check_company":{"main":[[{"node":"createAccount","type":"main","index":0}],[{"node":"IF_LinkedIn_url_contact1","type":"main","index":0}]]},"createAccount":{"main":[[{"node":"IF_LinkedIn_url_contact1","type":"main","index":0}]]},"searchAccount":{"main":[[{"node":"checkAccountExist","type":"main","index":0}]]},"searchContact":{"main":[[{"node":"searchAccount","type":"main","index":0}]]},"updateContact":{"main":[[{"node":"routeJobChangeType","type":"main","index":0}]]},"updateContact1":{"main":[[{"node":"routeJobChangeType1","type":"main","index":0}]]},"updateContact2":{"main":[[{"node":"routeJobChangeType2","type":"main","index":0}]]},"updateContact3":{"main":[[{"node":"routeJobChangeType3","type":"main","index":0}]]},"checkAccountExist":{"main":[[{"node":"IF_LinkedIn_url_contact","type":"main","index":0}],[{"node":"check_company","type":"main","index":0}]]},"routeJobChangeType":{"main":[[{"node":"createTask","type":"main","index":0}],[{"node":"createTask1","type":"main","index":0}],[{"node":"createTask2","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"routeJobChangeType1":{"main":[[{"node":"createTask","type":"main","index":0}],[{"node":"createTask1","type":"main","index":0}],[{"node":"createTask2","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"routeJobChangeType2":{"main":[[{"node":"createTask3","type":"main","index":0}],[{"node":"createTask4","type":"main","index":0}],[{"node":"createTask5","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"routeJobChangeType3":{"main":[[{"node":"createTask3","type":"main","index":0}],[{"node":"createTask4","type":"main","index":0}],[{"node":"createTask5","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"IF_LinkedIn_url_contact":{"main":[[{"node":"updateContact","type":"main","index":0}],[{"node":"updateContact1","type":"main","index":0}]]},"IF_LinkedIn_url_contact1":{"main":[[{"node":"updateContact2","type":"main","index":0}],[{"node":"updateContact3","type":"main","index":0}]]},"LoneScale - GetJobChanges":{"main":[[{"node":"IFPersonCRMId","type":"main","index":0}]]}}}