Salesforce Renewal Pipeline Digest

Free

Every Monday at 8 AM, queries Salesforce for all renewal opportunities closing in the next 90 days, enriches each with account health signals (days since CSM activity, open case count), and posts a structured Slack digest to #cs-renewals grouped into Critical, Watch, and Healthy buckets. Gives your CS team a 5-second view of the renewal pipeline every week.

SalesforceSlack

Workflow Overview

πŸ“‹Setup Required
⏰Weekly Monday 8AMSchedule TriggerπŸ”—Query Renewal Opport…SalesforceπŸ’»Enrich With Risk Sig…CodeπŸ’»Build Slack DigestCodeπŸ’¬Post Digest to SlackSlack

Salesforce Renewal Pipeline Digest

Every Monday at 8 AM, this workflow pulls all renewal opportunities closing within 90 days from Salesforce, enriches them with account health signals, and posts a structured digest to your Slack renewals channel β€” grouped into Critical, Watch, and Healthy buckets.


Prerequisites

  • n8n instance (self-hosted or n8n Cloud)
  • Salesforce account with API access
  • Renewal opportunities using specific StageName values in Salesforce
  • Slack workspace with bot token
  • n8n Salesforce credential (OAuth2) β€” setup guide
  • n8n Slack credential β€” setup guide

Setup Steps

1. Import the workflow

In n8n, go to Workflows β†’ Import from File and select workflow.json.

2. Configure Salesforce credentials

  • Open the "Query Renewal Opportunities" node
  • Create or select your Salesforce OAuth2 credential
  • Required Salesforce permissions: Read on Opportunity, Account, Case

3. Verify your Salesforce stage names

Open the "Query Renewal Opportunities" node and check the StageName IN (...) list:

StageName IN ('Renewal Due', 'Renewal Negotiation', 'Renewal At Risk')

Go to Salesforce β†’ Setup β†’ Object Manager β†’ Opportunity β†’ Fields β†’ StageName β†’ view your picklist values. Replace the stage names in the query to exactly match yours (case-sensitive).

4. Add custom health score field (optional)

If your Salesforce org has a custom Account health score field (e.g., Health_Score__c), add it to the SOQL:

SELECT ..., Account.Health_Score__c FROM Opportunity WHERE ...

Then reference it in the "Enrich With Risk Signals" Code node to factor it into urgency classification.

5. Configure Slack

  • In the "Post Digest to Slack" node, change #cs-renewals to your channel name
  • Create or select your Slack credential (bot token starting with xoxb-)
  • Invite the bot to your channel: /invite @your-bot-name

6. Activate the workflow

Toggle to Active. It runs every Monday at 8:00 AM server time.


Urgency Classification Logic

UrgencyTriggers
πŸ”΄ CriticalClosing ≀ 30 days OR Stage = "Renewal At Risk"
🟑 WatchClosing 31–60 days OR No CSM activity >30 days OR 3+ open cases
🟒 HealthyClosing 61–90 days, no risk signals

Sample Slack Output

πŸ“Š *Weekly Renewal Pipeline β€” Monday, April 14*

8 renewals closing within 90 days

πŸ”΄ *CRITICAL (2)*

β€’ *Acme Corp* β€” $45,000 β€” closes 2026-04-28 (14d)

_Closing in 14 days Β· Stage: Renewal At Risk_

CSM: Jane Smith | View in Salesforce

🟑 *WATCH (3)*

β€’ *TechCo Ltd* β€” $28,000 β€” closes 2026-05-20 (36d)

_No CSM activity in 42 days_

CSM: Bob Jones | View in Salesforce

🟒 *HEALTHY (3)*

β€’ *StartupXYZ* β€” $12,000 β€” closes 2026-06-10


Troubleshooting

SOQL query returns zero results
  • Your renewal stage names don't match. Run this in Salesforce Developer Console to check: SELECT StageName, COUNT(Id) FROM Opportunity GROUP BY StageName
  • Ensure CloseDate <= NEXT_N_DAYS:90 is working β€” SOQL date literals are UTC
Account.Owner.Name shows "Unknown CSM"
  • This is a relationship field. Confirm your Salesforce user has permission to read the User object
  • Alternatively, add a custom CSM_Name__c field to Account and use that instead
Digest is too long for Slack
  • Slack messages have a 3,000 character limit for regular text
  • If you have many renewals, consider splitting Critical/Watch/Healthy into separate messages by adding 3 Slack nodes after the digest node

Template Details

Category

Renewals

Platform

n8n

Difficulty

Intermediate

Setup Time

20 minutes

Version

1.0.0

Last Updated

2026-04-14


Integrations

SalesforceSlack

⬇ Download