Make: filter and total a big Google Sheet with one HTTP module
To filter or total a large Google Sheet in Make without pulling every row into the scenario, send the question to an API that queries the sheet and returns only the answer. In practice that’s one HTTP → Make a request module that posts a small JSON query (a filter, a group-by, a sum) and gets back the rows or totals. This guide sets that up with datatomcp, which keeps a synced, queryable copy of your sheet or CSV, and covers where Make’s own MCP Client app fits.
Why not Search Rows and an aggregator?
The usual Make pattern is Google Sheets → Search Rows, then filters, then an aggregator to add things up. Each row comes out as its own bundle, and every module that runs on a bundle counts toward your usage. That’s fine for 50 rows. For “revenue per country this quarter” over 40,000 rows it means a long run, a lot of operations, and a maximum-rows setting to keep an eye on.
With a query API, the sheet is filtered and totalled server-side and the scenario receives one bundle with the result.
1. Make the sheet queryable
- Sign in at app.datatomcp.com, open Add data → Google Sheet and pick the sheet. Private sheets work: datatomcp gets access to that file only. A CSV upload or CSV link works the same way.
- On the dataset page, note the dataset id (
ds_…) and the column ids in the columns table. - Under Account → API keys, create a key named
make. It starts withdtm_; copy it now, it’s shown once.
2. Add the HTTP module
Add the HTTP app’s Make a request module to your scenario and fill in:
| Field | Value |
|---|---|
| Authentication type | No authentication (the key goes in a header below) |
| URL | https://app.datatomcp.com/v1/datasets/ds_YOUR_ID/query |
| Method | POST |
| Headers | Authorization = Bearer dtm_… |
| Body content type | application/JSON |
| Body input method | JSON string |
| Body content | the query (below) |
| Parse response | Yes |
Make’s API key authentication type also works if you’d rather keep the key in a stored credential than in the module: send it as the Authorization header with the value Bearer dtm_….
3. Write the query
Revenue per country for September, highest first:
{
"where": [
{ "column": "order_date", "op": "between", "value": ["2026-09-01", "2026-09-30"] }
],
"group_by": ["country"],
"metrics": [
{ "fn": "count", "as": "orders" },
{ "fn": "sum", "column": "total", "as": "revenue" }
],
"order_by": [{ "column": "revenue", "dir": "desc" }],
"limit": 10
}
You can map values from earlier modules into the JSON string, for example a date from a trigger or a customer name from a form.
What you can send:
where: a list of{ column, op, value }. Ops:eq,neq,gt,gte,lt,lte,in,not_in,contains,starts_with,between,is_null,not_null.group_byandmetrics(count,count_distinct,sum,avg,min,max) for totals.select,order_by,limit(up to 1,000) andoffsetfor rows.
4. Use the result
With Parse response on, the module outputs rows (the answer) and meta. meta includes rows_matched, truncated and the dataset version, so a later module can tell whether the result was complete and which sync of the sheet it came from.
To post the table to Slack or email, add an Iterator on rows and a Text aggregator, or map rows[1].revenue directly when you asked for a single total. Because the query already did the counting, these modules run on 10 bundles, not 40,000.
Keep the data current
Click Refresh now on the dataset page after big edits, or add a second HTTP module that calls POST https://app.datatomcp.com/v1/datasets/ds_YOUR_ID/refresh at the start of the scenario. On Pro, linked sheets sync every hour.
Getting exact category names
Filters match exactly, so "Germany" won’t match "germany ". A GET request to https://app.datatomcp.com/v1/datasets/ds_YOUR_ID/values/country returns the real values in that column. Use it when you build the scenario to copy the exact values into your filters.
What about Make’s MCP Client app?
Make has an MCP Client app (paid plans) that calls tools on remote MCP servers from a scenario or an AI agent, with OAuth or token sign-in. It’s a good fit for servers built for that. datatomcp’s MCP endpoint is built for chat and coding agents that sign in with your account (Claude, ChatGPT, Cursor); for Make, the REST request above is the route we support and test. If you also want to ask the same data questions from a chat app, see how to add a remote MCP server to any AI client.
Troubleshooting
- 401. The header must be exactly
Authorizationwith the valueBearerfollowed by the key. Check for a trailing space or line break. - 400 “Invalid query”. The message names the field, for example an unknown column id. Column ids are on the dataset page and can differ from the sheet’s header text.
- 429. You hit the daily query limit (1,000 on the free plan). Scenarios that run every minute use it up fast; schedule less often or ask for totals instead of rows.
- Empty
rows. The filter matched nothing. Check spellings with the values endpoint and date formats (YYYY-MM-DD).
FAQ
Can Make query a Google Sheet with SQL? Not directly. The query API above gives you filters, group-by and totals in JSON, which covers most “SQL on a sheet” needs without SQL.
Does this write to the sheet? No. The API is read-only. Use Make’s Google Sheets modules to add or update rows.
Is it free? The free plan covers 3 datasets of up to 100,000 rows and 1,000 queries a day.
Related: n8n AI agent over a Google Sheet · Zapier: totals from a big sheet · Google Sheets as an API