# Ask a spreadsheet question, get an answer that was actually computed

> Pick a Google Sheet or upload a CSV, ask in plain English, and get back a chart and a table your analysts can check the math on.

- Workflow type: app
- Services: Daytona, Google Sheets, Slack Bot
- Categories: Operations
- Published: 2026-08-17

## What it does

- Load data straight from a Google Sheet tab or a CSV you upload, and see the first rows and column names before you ask anything.
- Type a question in plain English, like which regions grew month over month or show me revenue by plan as a bar chart, and get back a real answer with a chart and a result table.
- Every answer shows the working that produced it next to the result, so an analyst can check the math and re-run an edited version.
- Share any answer into a Slack channel in one click, and keep your own history of past questions you can reopen and re-run against fresh data.

## What you'll need

- A Daytona account, which is where the number crunching happens in a private workspace of your own
- A Google account with access to the spreadsheets your team analyses, or just CSV files to upload
- A Slack workspace, if you want the Share button to post answers into a channel
- No Python or spreadsheet formula knowledge, the questions are asked in plain English

## Prompt

Build me an analysis workbench that my ops and analyst team opens whenever they have a question about a spreadsheet. Today they paste data into a chatbot and get a plausible sounding number back. I want them to get an answer that was actually computed, in our own infrastructure, with the chart and the code to back it up. This is an on-demand surface a person opens with an unplanned question, so do not turn any part of it into a scheduled report or a recurring digest.

The main screen is where you choose data and ask. Give me two ways to load a dataset. First, a Google Sheet picker: a handler calls the Google Sheets Get Spreadsheet operation to read the spreadsheet metadata and list its tab names, then calls Get Values on the chosen tab to pull the range. Second, a direct CSV upload for data that is not in Sheets. Either way, once the data is loaded show a preview of the first twenty or so rows in a table, along with the detected column names, the column types, and the total row count, so the analyst can confirm they grabbed the right thing before spending a question on it.

Under the preview is a plain English question box with a Run button. Real examples of what people will type: which regions grew month over month, show me revenue by plan as a bar chart, what are the top ten accounts by spend, which products have declining units but rising revenue. Show a couple of these as clickable example prompts when the box is empty.

When the user hits Run, the handler works inside a Daytona sandbox. Reuse one sandbox across a whole working session rather than spinning up a new one per question. On the first question of a session, call the Daytona Create Sandbox operation. Sandbox creation is asynchronous, so poll the Get Sandbox operation until the state is started before making any call that runs inside the sandbox. As soon as it is up, call Set Auto-Stop / Auto-Archive / Auto-Delete Intervals to set a short auto-stop, around fifteen minutes of inactivity, so a forgotten session cannot sit there running. Every later question in the same session skips creation and reuses the existing sandbox id.

With the sandbox running, the handler uses the Daytona Upload File operation to drop the dataset in as a CSV, generates Python that answers the question using pandas for the analysis and matplotlib for any chart, and executes it with Run Code in Sandbox. Use Execute Command in Sandbox for shell steps such as installing a missing package or listing output files, keeping in mind that command execution is synchronous by default and returns the exit code together with the combined output. Have the generated code write its chart to a known path as a PNG and its result table to a known path as CSV or JSON, then use the Download File operation to pull both back out. Render the chart image and the result table directly in the app.

Each question produces an answer card. The card shows a short written summary of the finding, the chart, and the result table, with the generated Python sitting right next to the result in a code panel so an analyst can check the math. Make that code editable: an analyst who spots a wrong assumption, a bad filter or a missing currency conversion should be able to edit the code and re-run it, producing a new version of the card rather than silently overwriting the old one. When code fails, show the error output on the card so they can fix it and try again instead of hitting a dead end.

Every answer card has a Share button. It posts the written summary, the question that produced it and the headline numbers into a chosen Slack channel using the Slack Bot Send a Message operation, and attaches the chart image with the Slack Bot Upload a File operation so the picture lands in the channel rather than just a description of it. Let the user pick the channel and edit the message text before it goes.

Keep a per-user history of past questions. Each entry stores the question text, which spreadsheet and tab or which uploaded file it ran against, the generated code, the result table and the chart, plus who asked it and when. Show it as a list, most recent first, that a person can search. Opening a past entry brings back the full answer card, and there is a Re-run against fresh data action that pulls the current values from the same Google Sheet tab again with Get Values and runs the saved code over the new rows, so a question asked last month becomes this month's answer without retyping it. History is scoped to the person who asked, with their own questions front and centre.

Finally, clean up after the session. When the user ends their session or leaves the workbench, call the Daytona Stop Sandbox operation so the workspace is not left running, with the short auto-stop interval acting as the backstop if the app never gets a clean exit. Show the current session state somewhere unobtrusive, something like a small indicator saying the workspace is ready, starting or stopped, so people understand why the very first question of a session takes a little longer than the ones after it.

## How to customize

- Change how long an idle workspace stays open before it shuts itself down
- Set the Slack channel the Share button posts to by default
- Pin the handful of spreadsheets your team uses most so nobody has to hunt for the right file
- Adjust how many preview rows show before you ask a question

## FAQ

### Does my spreadsheet get handed over to a third party chatbot?

No. The data is read from your own Google Sheet or the file you upload, and the analysis runs in a private workspace that belongs to your team. That is the main difference between this and the hosted chat with your data tools.

### Do I need to know Python or write formulas?

No. You ask your question in plain English. The working is shown beside each answer so anyone who does know Python can check it, but you never have to write any yourself.

### What kinds of questions can I ask?

Anything you would normally work out with a pivot table or a chart. Totals by group, growth month over month, top and bottom performers, breakdowns by plan, region or owner, and simple trends over time.

### Can I trust the numbers it gives me?

Every answer card shows the exact working that produced it, and you can edit that working and run it again. The result is computed from your actual rows rather than guessed from a summary, so the math is checkable.

### Can I use it with a CSV that is not in Google Sheets?

Yes. You can upload a CSV directly and ask questions about it the same way, without putting it in a spreadsheet first.

### Is anything left running and costing money after I finish?

No. Your team shares one workspace for a working session instead of starting a new one per question, it closes when you finish, and it also shuts itself down automatically after a short idle period as a safety net.

Use this prompt in General Input: https://www.generalinput.com/prompts/ask-a-spreadsheet-question-get-an-answer-that-was-actually-computed