🀝 Analyze Salesforce stakeholder risk with Gmail, Google Calendar, OpenAI and Slack

⚑ 0 views · 🀝 CRM & Sales Operations

Description

Quick overview

This workflow monitors updated Salesforce opportunities, gathers related contacts plus Gmail and Google Calendar interaction history, uses OpenAI to assess stakeholder engagement gaps and risk, writes the results back to Salesforce custom fields, and posts a high-risk alert to Slack.

How it works

  1. Triggers when a Salesforce Opportunity is updated.
  2. Retrieves the opportunity details and the associated Opportunity Contact Roles from Salesforce.
  3. Calculates which stakeholder roles are expected based on the opportunity amount and stage, then compiles the customer contact emails/domains to search.
  4. Searches the connected Gmail mailbox for emails involving the opportunity contacts and pulls events from a specified Google Calendar.
  5. Normalizes email and meeting results into a single interaction list and combines it with opportunity context and contact details.
  6. Sends the combined data to OpenAI (gpt-4o-mini) to generate a structured JSON stakeholder gap and risk analysis, then parses and validates the response.
  7. Updates the Salesforce Opportunity with the risk status, score, engagement insight, last analysis timestamp, and missing stakeholder roles, and posts a Slack alert if the risk score is 61 or higher.

Setup

  1. Connect Salesforce credentials and ensure the Opportunity object has the custom fields used for output (Stakeholder_Engagement_Status__c, Last_Stakeholder_Analysis__c, Stakeholder_Risk_Score__c, Stakeholder_Engagement_Insight__c, Missing_Stakeholders__c).
  2. Connect Gmail credentials for the mailbox you want to scan for messages with opportunity contacts.
  3. Connect Google Calendar credentials and set the target calendar ID used to pull meeting events.
  4. Add an OpenAI credential (configured in the OpenAI node) and select an available model (default: gpt-4o-mini).
  5. Connect Slack credentials and set the destination channel for high-risk alerts.

Additional info

Customization Options

Use Case Examples

Troubleshooting Guide

Need Assistance?

WeblineIndia can help you with:

Whether you need workflow enhancements, custom dashboards, advanced AI integrations or entirely new automation systems, WeblineIndia can help build scalable solutions tailored to your business needs.

πŸ”— Nodes Used

Slack, Google Calendar, Salesforce, Gmail, OpenAI, Salesforce Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup