{"product_id":"n8n-workflow-predict-salesforce-win-probability-w-gmail-gpt-4o","title":"n8n Workflow: Predict Salesforce Win Probability w\/ Gmail + GPT-4o","description":"\u003ch3\u003ePredict Salesforce win probability automatically—using Gmail engagement + GPT-4o\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow watches for updates to your Salesforce Opportunities, analyzes recent Gmail activity tied to the deal, and uses OpenAI (GPT-4o-mini) to generate an updated win probability—then writes a refined, smoothed score back to Salesforce.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers on a schedule\u003c\/strong\u003e whenever a Salesforce Opportunity is updated.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePulls full Opportunity context\u003c\/strong\u003e from Salesforce and derives key deal signals (including deal size, complexity, stage, and current probability metrics).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches recent Gmail messages\u003c\/strong\u003e and calculates engagement signals such as reply count and the days since the last activity.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls OpenAI to predict win probability\u003c\/strong\u003e by sending both the engagement signals and deal context, receiving a JSON response that includes a new probability and a short reason.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates and stabilizes the result\u003c\/strong\u003e by:\n    \u003cul\u003e\n      \u003cli\u003eChecking whether the AI probability differs from the current Salesforce value by more than \u003cstrong\u003e5 points\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eClamping\u003c\/strong\u003e the output to a safe probability range.\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eSmoothing\u003c\/strong\u003e the updated probability against the current probability to avoid abrupt swings.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdates the Opportunity probability field\u003c\/strong\u003e in Salesforce with the refined value.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS sales teams want \u003cstrong\u003edata-driven win scoring\u003c\/strong\u003e that reflects both pipeline stage and real customer engagement.\u003c\/li\u003e\n  \u003cli\u003eRevOps teams standardize opportunity scoring by combining Salesforce metrics with \u003cstrong\u003eGmail engagement signals\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers deploy a reliable \u003cstrong\u003eSalesforce + Gmail + GPT\u003c\/strong\u003e n8n workflow with safeguards (thresholding and smoothing).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTrigger:\u003c\/strong\u003e Scheduled run on updated Salesforce Opportunities\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations \/ nodes:\u003c\/strong\u003e \u003cstrong\u003eSalesforce\u003c\/strong\u003e, \u003cstrong\u003eGmail\u003c\/strong\u003e, \u003cstrong\u003eOpenAI (gpt-4o-mini)\u003c\/strong\u003e, plus logic nodes such as \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, and \u003cstrong\u003esticky note\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eField usage (Salesforce):\u003c\/strong\u003e Amount, Probability, Type, StageName, and the Opportunity probability update target\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45824216858803,"sku":"N8N-18144","price":75.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/6ceWjdb3EbFWoCAvb1tFu_0vfLqexE.png?v=1786612866","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-predict-salesforce-win-probability-w-gmail-gpt-4o","provider":"N8N Commerce","version":"1.0","type":"link"}