# Simulate business decisions with Google Sheets and OpenAI: n8n workflow

> Started by another system calling it. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/simulate-business-decisions-with-google-sheets-and-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Strategy and planning](https://millionrounds.com/workflows?category=Strategy+and+planning#library)

# Simulate business decisions with Google Sheets and OpenAI

Started by another system calling it. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to OpenAI. 15 steps, 2 loops or waits: a working afternoon to understand properly.

Medium Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsimulate-business-decisions-with-google-sheets-and-openai)

**15 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**2** Loops or waits

**0** Services by connector: it calls them over plain HTTP

## The flow

Starts it 3 Model 2 Logic 7 Service 3

The steps in the order they run, from what starts it.

- 1 **Webhook - Scenario Input** Webhook *Starts it*
- 2 **Schedule - Weekly Simulation** Schedule trigger *Starts it*
- 3 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 4 **Prepare Scenario Context** Set *Logic*
- 5 **AI - Simulate Outcomes** Agent *Model*
- 6 **Filter - Valid Scenario Types** Filter *Logic*
- 7 **JS - Format Simulation Report** Code *Logic*
- 8 **Fetch Historical Data** Http Request *Service*
- 9 **Log Simulation to Google Sheet** Http Request *Service*
- 10 **Notify via Slack** Http Request *Service*
- 11 **Python - Parse & Summarize History** Code *Logic*
- 12 **Respond to Webhook** Respond To Webhook *Starts it*
- 13 **Wait For Data** Wait *Logic*
- 14 **JS - Build Prompt Context** Code *Logic*
- 15 **Wait - Rate Limit Buffer** Wait *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 15, 2 loops or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Nothing by connector; it calls services over plain HTTP
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 15 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 15 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fsimulate-business-decisions-with-google-sheets-and-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Workflows like it

Also strategy and planning, with the same services where possible, closest in size first.

- [**Generate AI market research reports with Perplexity and Claude** 15 steps · calls a model · Google Drive](https://millionrounds.com/workflow/generate-ai-market-research-reports-with-perplexity-and-clau)
- [**Generate merchandise proposals and market research from NASA APOD** 15 steps · calls a model · Google Drive, Notion](https://millionrounds.com/workflow/generate-merchandise-proposals-and-market-research-from-nasa)
- [**Generate market research reports from Google Maps reviews** 14 steps · calls a model · Gmail](https://millionrounds.com/workflow/generate-market-research-reports-from-google-maps-reviews)
- [**Generate business strategy canvases with OpenAI and Tavily** 13 steps · calls a model · Gmail](https://millionrounds.com/workflow/generate-business-strategy-canvases-with-openai-and-tavily)
- [**Generate AI market research reports** 13 steps · Google Sheets, Notion](https://millionrounds.com/workflow/generate-ai-market-research-reports)
- [**Create a Business Model Canvas and infographic image** 12 steps · calls a model](https://millionrounds.com/workflow/create-a-business-model-canvas-and-infographic-image)
