Intermediate~20 min setupProductivity & CRMVerified April 2026
Google Sheets logo
Salesforce logo

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

scheduled

Use case type

export

Real-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.

/mo
505005K50K

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

Skip the setup

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.

Salesforce admin or API access to run SOQL queries
Google Sheets document set up with column headers
N8n instance running (self-hosted or cloud)
Basic understanding of SOQL query syntax

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Deal NameName
Deal AmountAmount
Close DateCloseDate
Stage NameStageName
Week Ending Datecalculated_week_end
1 optional field▸ show
Account NameAccount.Name

Step-by-Step Setup

1

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.

  1. 1Click 'New Workflow' from the N8n dashboard
  2. 2Click the gray plus button to add your first node
  3. 3Select 'Schedule Trigger' from the trigger list
  4. 4Set interval to 'Weekly' and day to 'Friday'
What you should see: You should see a purple Schedule Trigger node with 'Every Friday' displayed on the node.
2

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.

  1. 1Click on the Schedule Trigger node to open settings
  2. 2Set 'Hour' to 8 and 'Minute' to 0
  3. 3Select your timezone from the dropdown
  4. 4Toggle 'Active' to enabled
What you should see: The trigger shows '8:00 AM Every Friday' with a green active indicator.
Common mistake — Don't set this too early - Salesforce sometimes has maintenance windows between 2-6 AM PST that could cause failures.
3

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.

  1. 1Click the plus button after the Schedule Trigger
  2. 2Search for 'Salesforce' and select it
  3. 3Choose 'Search' as the operation
  4. 4Select 'Use SOQL Query' option
What you should see: A blue Salesforce node appears with 'Search' operation selected and SOQL query field visible.
4

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.

  1. 1Click 'Create New Credential' next to the Credential field
  2. 2Select 'Salesforce OAuth2 API'
  3. 3Enter your Salesforce username and password
  4. 4Click 'Connect my account' and authorize N8n
What you should see: Green checkmark appears next to credentials with your Salesforce org name displayed.
Common mistake — Use a dedicated integration user account, not your personal login - this prevents the workflow from breaking when you change your password.
5

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.

  1. 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
  2. 2Click 'Test Step' to verify the query works
  3. 3Review the returned data in the output panel
What you should see: Output panel shows your recent closed-won deals with Name, Amount, CloseDate, Account Name, and Stage fields populated.
Common mistake — LAST_N_DAYS:7 gives you 7 days from today, not the previous calendar week - adjust to LAST_WEEK if you want Monday-Sunday weeks instead.
6

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.

  1. 1Click the plus button after Salesforce node
  2. 2Add a 'Function' node
  3. 3Select 'Date & Time' category
  4. 4Choose 'Format Date' function
What you should see: A gray Function node appears between Salesforce and your next step.
Common mistake — Filters are the most common place setups break. Double-check the field name and value exactly match what your app sends — a single capital letter difference will block everything.
Google Sheets
GO
trigger
filter
Condition
matches criteria?
yes — passes through
no — skipped
Salesforce
SA
notified
7

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.

  1. 1Add another Function node after the date formatter
  2. 2Select 'Set' operation
  3. 3Create a field called 'total_amount' with expression: {{$json.data.reduce((sum, deal) => sum + deal.Amount, 0)}}
  4. 4Add 'deal_count' field with: {{$json.data.length}}
What you should see: Function node output shows total_amount with your weekly sales sum and deal_count with number of deals.
Common mistake — The reduce function will fail if any Amount fields are null - add || 0 after deal.Amount to handle missing values.
8

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.

  1. 1Click plus after the Function node
  2. 2Search for 'Google Sheets' and select it
  3. 3Choose 'Append' operation
  4. 4Select your existing sales report spreadsheet
What you should see: Pink Google Sheets node appears with 'Append' operation and your spreadsheet name visible.
9

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.

  1. 1Click 'Create New Credential' in the Google Sheets node
  2. 2Select 'Google Sheets OAuth2 API'
  3. 3Click 'Sign in with Google'
  4. 4Grant permissions when prompted
What you should see: Green credential checkmark with your Google account email displayed below the field.
Common mistake — Make sure you sign in with an account that has edit access to your target spreadsheet - view-only access will cause append failures.
10

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.

  1. 1Select your target sheet from the 'Sheet' dropdown
  2. 2Choose 'Define Below' for column mapping
  3. 3Map 'Week Ending' to current date expression
  4. 4Map 'Total Amount' to {{$json.total_amount}}
  5. 5Map 'Deal Count' to {{$json.deal_count}}
What you should see: Three column mappings appear with expressions showing data from previous nodes.
Common mistake — Column headers in your sheet must exactly match the field names you define here - 'Total Amount' won't work if your sheet header is 'Total_Amount'.
Google Sheets fields
Column A
Column B
Email
Status
Notes
available as variables:
1.props.Column A
1.props.Column B
1.props.Email
1.props.Status
1.props.Notes
11

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.

  1. 1Click 'Settings' tab at the top of the workflow
  2. 2Set 'Error Workflow' to 'Continue on Error'
  3. 3Add a 'No Operation' node as a fallback path
  4. 4Connect both success and error paths
What you should see: Workflow shows branching paths with error handling configured.
12

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.

  1. 1Click 'Execute Workflow' button to test manually
  2. 2Verify new row appears in your Google Sheet
  3. 3Click the toggle switch to activate the workflow
  4. 4Confirm 'Active' status appears in green
What you should see: Green 'Active' badge shows on your workflow and you see a new row in Google Sheets with this week's data.
Common mistake — Test runs use live data - if you run this multiple times, you'll get duplicate rows in your sheet unless you delete them first.

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)}}
n8n
▶ Run once
executed
Google Sheets
Salesforce
Salesforce
🔔 notification
received

Scaling Beyond 2000+ deals per week+ Records

If your volume exceeds 2000+ deals per week records, apply these adjustments.

1

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.

2

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

VerdictWhy n8n for this workflow

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.

Cost

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.

Tradeoffs

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 winsCreate a parallel path that posts to Slack when individual deals exceed a certain threshold, giving your team real-time celebration opportunities.
  • Build pipeline health alertsExtend the SOQL query to include open opportunities and create alerts when your pipeline falls below target levels for upcoming weeks.
  • Create executive dashboard dataAdd quarter-over-quarter comparisons and trend calculations to feed executive reporting dashboards with richer analytical data.

Related guides

Was this guide helpful?
Google Sheets + Salesforce overviewn8n profile →