# Weekly Upstash inventory and spend log in Google Sheets

> Every Monday at 7am, every database and index in your Upstash account lands in a spreadsheet with its size, usage and cost, so you keep a history you can chart.

- Workflow type: code
- Services: Upstash, Google Sheets
- Categories: Engineering, Operations
- Published: 2026-08-10

## What it does

- Takes a full inventory of your Upstash account every Monday morning, covering every Redis database and every vector index
- Records how much each database holds and what it has cost this month, including storage, request volume, bandwidth and spend
- Adds one row per resource plus an account wide totals row, so week after week the sheet builds a trend you can chart
- Keeps the same columns in the same order on every run, so the history stays clean enough to pivot without any cleanup

## What you'll need

- An Upstash account, with sign in details that can see the databases and indexes you want tracked
- A Google account and a spreadsheet you want the log written into
- A tab in that spreadsheet set aside for the log, with a header row matching the columns below

## Prompt

Every Monday at 7am, take a point in time inventory of my entire Upstash account and append it to a Google Sheet, so I keep a cost and capacity trend that outlives what the Upstash console retains.

Start by enumerating every resource in the account. Use the Upstash List Redis Databases operation to get every Redis database, and List Vector Indices to get every Vector index. Then, for each Redis database returned, call Get Redis Database Stats to pick up its current usage: current_storage, total_monthly_requests, total_monthly_bandwidth and total_monthly_billing.

Write one row per resource into the sheet using Google Sheets Append Values, with this exact column order on every run: run date, resource type, name, region, plan or tier, storage, monthly requests, monthly bandwidth, monthly billing. Resource type is either redis or vector. The run date is the date the workflow executes, and it is the same value on every row of a given run so each week's batch can be grouped.

Redis databases and Vector indexes come back with different shapes, so use this one shared column set and leave a blank where a field does not apply. The stats call is Redis only, so vector rows carry the run date, resource type, name, region and tier taken from the index listing, and leave storage, monthly requests, monthly bandwidth and monthly billing blank. Never reorder or rename the columns between runs. The entire point is that appended rows line up into a trend I can chart.

Finish each run with a single totals row: the run date, the word TOTAL in the resource type column, and the account wide sums for storage, monthly requests, monthly bandwidth and monthly billing across every Redis database. Leave name, region and plan blank on that row so it is easy to filter the totals apart from the per resource rows.

Append using the value input option that parses entries the way typed input is parsed, so the run date lands as a real date and the usage and cost figures land as numbers rather than text, and the columns stay chartable without cleanup. Only ever append. Do not overwrite, clear or rewrite existing rows, so every week stacks onto the bottom of the history.

This is a straight list, format and append with no judgement required, so build it as a deterministic workflow. If the account has no resources at all, still append the totals row with zeros, so the weekly record has no gaps.

## How to customize

- Change the timing: run it daily for a finer trend, or monthly if you only care about the bill
- Add or remove columns to match what you report on, as long as the order stays the same every week
- Point it at a different spreadsheet or tab, for example one per environment or one per team

## FAQ

### Why not just check the Upstash console?

The console shows you current numbers and only keeps a limited window of history. This copies those numbers into your own spreadsheet every week, so you keep the full record and can chart months of growth and spend instead of a snapshot.

### Does this change anything in my Upstash account?

No. It only reads. Nothing is created, changed or deleted, and it never touches the data stored inside your databases or indexes.

### Do vector indexes get the same columns as databases?

They share one set of columns so the rows line up. Vector indexes record their name, region and tier, and the usage and cost columns are left blank for them, since those figures are only reported for Redis databases.

### What happens when I add or delete a resource?

Each run records whatever exists at that moment. New resources show up in the next weekly batch of rows, and removed ones simply stop appearing. Older rows are never rewritten, so they stay an accurate record of what you had at the time.

### Can I share the sheet with people who do not have Upstash access?

Yes, and that is one of the better reasons to run this. Anyone you share the spreadsheet with can pivot and chart the trend themselves, with no access to your infrastructure needed.

Use this prompt in General Input: https://www.generalinput.com/prompts/weekly-upstash-inventory-and-spend-log-in-google-sheets