Quick overview
This workflow monitors new Salesforce opportunities, enriches them with related contacts and products, uses Groq-hosted LLM analysis to classify deal complexity, then updates Salesforce with a processed flag, creates a follow-up task, and posts the outcome to a Slack channel.
How it works
- Triggers when a new Opportunity is created in Salesforce.
- Retrieves Opportunity details and checks whether the opportunity has already been marked as processed.
- If it is already processed, posts a “no new opportunities” message to a Slack channel.
- If it is unprocessed, fetches related Salesforce Contacts for the Opportunity’s Account and OpportunityLineItem records for the Opportunity.
- Calculates simple deal metrics (stakeholder count, product count, and total product value) and sends them with Opportunity fields to a Groq LLM to classify complexity as Low/Medium/High with reasons and suggested actions.
- Parses the LLM’s JSON response, marks the Opportunity as Processed__c = true in Salesforce, creates a Salesforce Task containing the classification details, and sends a success notification to Slack.
Setup
- Add Salesforce OAuth2 credentials and ensure your Opportunity object includes the Customization__c and Processed__c fields used by the workflow.
- Update the Salesforce query filters (for example, the OwnerId condition and any field list) so the workflow selects the opportunities you actually want to process.
- Add a Groq API credential and verify the selected model is available in your Groq account.
- Add Slack OAuth2 credentials and select the target Slack channel for both the success and “no data” notifications.
- Confirm your Salesforce org allows creating Tasks and that the Task “WhatId” can reference Opportunities in your setup.
Requirements
- n8n account login
- Salesforce account with
Processed__c field (Boolean)
- AI provider (Groq or any LLM)
- Slack workspace
- API credentials configured
Customization
- Modify Salesforce query fields
- Adjust AI prompt logic
- Change metric calculations
- Customize Slack messages
Additional info
Add-Ons
- Email alerts
- CRM dashboards
- Google Sheets logging
- Risk scoring
- Reminder workflows
Use Cases
- Enterprise deal prioritization
- Sales automation
- Deal risk analysis
- Revenue forecasting
- Customer onboarding planning
Troubleshooting
| Issue |
Cause |
Solution |
| No data processed |
Already processed deals |
Reset Processed__c |
| AI parsing fails |
Invalid JSON |
Fix prompt |
| Slack not working |
Wrong config |
Reconnect Slack |
| Missing data |
Wrong IDs |
Verify Salesforce data |
Need Help?
If you need any help for setup or customization, contact our n8n workflow developers at WeblineIndia for expert n8n workflow support. We're happy to help.