

How to Create Weekly Sales Reports from Salesforce with N8n
Automatically run SOQL queries every Friday to pull closed-won deals and append summaries to Google Sheets.
Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.
Best for
Teams that need custom SOQL queries and complex calculations in their sales reports.
Not ideal for
Small teams wanting a simple hosted solution without server management overhead.
Sync type
scheduledUse case type
exportReal-World Example
A 25-person B2B software company uses this to track weekly sales performance across different product lines. Their sales ops manager was manually running Salesforce reports every Monday morning and copying data into executive dashboards. The manual process took 45 minutes and often had copy-paste errors. Now the data appears automatically in Google Sheets every Friday afternoon, feeding directly into their board reporting dashboard.
What Will This Cost?
Drag the slider to your expected monthly volume.
Each platform counts differently — Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.





Prices shown for annual billing. Based on published pricing as of April 2026.
Estimated ROI
1000
min saved/mo
$583
labor value/mo
Free
no platform cost
Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.
Implementation
Import this workflow directly into n8n
Copy the pre-built n8n blueprint and paste it straight into n8n. All modules, filters, and field mappings are already configured — you just need to connect your accounts.
Before You Start
Make sure you have everything ready.
Field Mapping
Map these fields between your apps.
| Field | API Name | |
|---|---|---|
| Required | ||
| Deal Name | Name | |
| Deal Amount | Amount | |
| Close Date | CloseDate | |
| Stage Name | StageName | |
| Week Ending Date | calculated_week_end | |
1 optional field▸ show
| Account Name | Account.Name |
Step-by-Step Setup
Workflows > New > Triggers > Schedule
Create new workflow
Start a fresh N8n workflow and set up the weekly schedule trigger. This will fire every Friday to collect your sales data automatically.
- 1Click 'New Workflow' from the N8n dashboard
- 2Click the gray plus button to add your first node
- 3Select 'Schedule Trigger' from the trigger list
- 4Set interval to 'Weekly' and day to 'Friday'
Schedule Trigger > Settings
Set schedule timing
Configure the exact time for your report generation. Most teams run this early morning before the sales team checks numbers.
- 1Click on the Schedule Trigger node to open settings
- 2Set 'Hour' to 8 and 'Minute' to 0
- 3Select your timezone from the dropdown
- 4Toggle 'Active' to enabled
Nodes > Salesforce > Search
Add Salesforce node
Connect to Salesforce and configure the SOQL query. You'll pull all deals that closed as won in the past week.
- 1Click the plus button after the Schedule Trigger
- 2Search for 'Salesforce' and select it
- 3Choose 'Search' as the operation
- 4Select 'Use SOQL Query' option
Salesforce Node > Credentials > New
Configure Salesforce credentials
Set up your Salesforce connection using OAuth. This gives N8n permission to run queries against your CRM data.
- 1Click 'Create New Credential' next to the Credential field
- 2Select 'Salesforce OAuth2 API'
- 3Enter your Salesforce username and password
- 4Click 'Connect my account' and authorize N8n
Salesforce Node > SOQL Query
Write SOQL query
Build the query to fetch closed-won opportunities from the past week. Include key fields like amount, close date, and account name for your report.
- 1Paste this query in the SOQL field: SELECT Name, Amount, CloseDate, Account.Name, StageName FROM Opportunity WHERE IsWon = true AND CloseDate >= LAST_N_DAYS:7
- 2Click 'Test Step' to verify the query works
- 3Review the returned data in the output panel
Nodes > Function > Date & Time > Format Date
Add date range filter
Refine the query to only grab deals from the previous complete week. This prevents duplicate entries if the workflow runs multiple times.
- 1Click the plus button after Salesforce node
- 2Add a 'Function' node
- 3Select 'Date & Time' category
- 4Choose 'Format Date' function
Function Node > Set > Add Field
Calculate weekly totals
Sum up the deal amounts and count the number of wins. This creates the summary data that will go into your Google Sheet.
- 1Add another Function node after the date formatter
- 2Select 'Set' operation
- 3Create a field called 'total_amount' with expression: {{$json.data.reduce((sum, deal) => sum + deal.Amount, 0)}}
- 4Add 'deal_count' field with: {{$json.data.length}}
Nodes > Google Sheets > Append
Connect Google Sheets
Add your target spreadsheet where the weekly summaries will be stored. Each row will represent one week of sales data.
- 1Click plus after the Function node
- 2Search for 'Google Sheets' and select it
- 3Choose 'Append' operation
- 4Select your existing sales report spreadsheet
Google Sheets Node > Credentials > OAuth2
Set up Google Sheets credentials
Authorize N8n to write to your Google Sheets. This uses Google's OAuth system to grant append permissions.
- 1Click 'Create New Credential' in the Google Sheets node
- 2Select 'Google Sheets OAuth2 API'
- 3Click 'Sign in with Google'
- 4Grant permissions when prompted
Google Sheets Node > Column Mapping
Map fields to spreadsheet columns
Tell N8n which data goes in which columns. Set up headers for week ending date, total amount, deal count, and any other metrics you want to track.
- 1Select your target sheet from the 'Sheet' dropdown
- 2Choose 'Define Below' for column mapping
- 3Map 'Week Ending' to current date expression
- 4Map 'Total Amount' to {{$json.total_amount}}
- 5Map 'Deal Count' to {{$json.deal_count}}
Workflow > Settings > Error Handling
Add error handling
Configure what happens when the workflow fails. Set up retry logic and notifications so you know when reports don't generate.
- 1Click 'Settings' tab at the top of the workflow
- 2Set 'Error Workflow' to 'Continue on Error'
- 3Add a 'No Operation' node as a fallback path
- 4Connect both success and error paths
Workflow > Execute > Activate
Test and activate
Run a manual test to verify everything works, then activate the workflow. The next Friday, your first automated report will generate.
- 1Click 'Execute Workflow' button to test manually
- 2Verify new row appears in your Google Sheet
- 3Click the toggle switch to activate the workflow
- 4Confirm 'Active' status appears in green
Drop this into an n8n Code node.
Copy this template// Calculate average deal size and add to your summary▸ Show code
// Calculate average deal size and add to your summary
{{($json.total_amount / $json.deal_count).toFixed(2)}}... expand to see full code
// Calculate average deal size and add to your summary
{{($json.total_amount / $json.deal_count).toFixed(2)}}Scaling Beyond 2000+ deals per week+ Records
If your volume exceeds 2000+ deals per week records, apply these adjustments.
Add SOQL pagination
Salesforce limits SOQL results to 2,000 records per query. Add a loop node with OFFSET clauses to fetch all deals across multiple API calls when your weekly volume exceeds this limit.
Batch Google Sheets writes
Instead of appending individual rows, collect all data in an array and use Google Sheets' batch update API to write everything at once. This reduces API calls and prevents rate limit errors.
Going live
Production Checklist
Before you turn this on for real, confirm each item.
Troubleshooting
Common errors and how to fix them.
Frequently Asked Questions
Common questions about this workflow.
Analysis
Use N8n for this if you need custom SOQL queries and don't mind hosting your own automation server. The code nodes let you build complex calculations and data transformations that pre-built connectors can't handle. Skip N8n if you want a hosted solution with zero maintenance - Zapier's Salesforce triggers work fine for simple weekly summaries.
This workflow uses about 4 executions per week (trigger + Salesforce query + calculation + Google Sheets write). At 16 executions monthly, you stay well under N8n's self-hosted free tier. The cloud version costs $20/month for 5,000 executions. Zapier would run $30/month for the same workflow since you need their mid-tier plan for SOQL queries. Make costs $19/month but limits you to 10,000 operations.
Zapier handles Salesforce authentication better - their OAuth setup never seems to break, while N8n's Salesforce connector sometimes loses connection and needs re-auth. Make has cleaner error handling with automatic retries and better logging when SOQL queries fail. But N8n wins on flexibility - you can modify the SOQL query, add complex calculations, and format the data exactly how you want without hitting platform limitations.
Salesforce's API has a 2,000 record limit per SOQL query, so if you close more than 2,000 deals weekly, you'll need to add pagination logic. Google Sheets sometimes takes 2-3 minutes to reflect new rows, which can make your test runs look broken when they're actually working. The Salesforce connector occasionally throws 'Session expired' errors even with valid credentials - adding a retry node with 30-second delays fixes most auth hiccups.
Ideas for what to build next
- →Add Slack notifications for big wins — Create a parallel path that posts to Slack when individual deals exceed a certain threshold, giving your team real-time celebration opportunities.
- →Build pipeline health alerts — Extend the SOQL query to include open opportunities and create alerts when your pipeline falls below target levels for upcoming weeks.
- →Create executive dashboard data — Add quarter-over-quarter comparisons and trend calculations to feed executive reporting dashboards with richer analytical data.
Related guides
How to Share Notion Meeting Notes to Slack with Pipedream
~15 min setup
How to Share Notion Meeting Notes to Slack with Power Automate
~15 min setup
How to Share Notion Meeting Notes to Slack with n8n
~20 min setup
How to Send Notion Meeting Notes to Slack with Zapier
~8 min setup
How to Share Notion Meeting Notes to Slack with Make
~12 min setup
How to Create Notion Tasks from Slack with Pipedream
~15 min setup