# Govern energy portfolios with OpenAI and Perplexity: n8n workflow

> Started by a clock, and works across Gmail, Google Sheets and Slack. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/govern-energy-portfolios-with-openai-and-perplexity (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Chat assistants](https://millionrounds.com/workflows?category=Chat+assistants#library)

# Govern energy portfolios with OpenAI and Perplexity

Started by a clock, and works across Gmail, Google Sheets and Slack. It hands the judgement calls to OpenAI. 22 steps: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgovern-energy-portfolios-with-openai-and-perplexity)

**22 steps** Large: read it before trusting it with anything live

**0** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 11 Logic 2 Service 8

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

- 1 **Energy Analysis Schedule** Schedule trigger *Starts it*
- 2 **Governance Model** Lm Chat Open Ai *Model*
- 3 **Structured KPI Output** Output Parser Structured *Model*
- 4 **Forecasting Model** Lm Chat Open Ai *Model*
- 5 **Weather Model** Lm Chat Open Ai *Model*
- 6 **Policy Model** Lm Chat Open Ai *Model*
- 7 **Energy Calculator** Tool Calculator *Model*
- 8 **Optimization Algorithm Tool** Tool Code *Model*
- 9 **External Data API Tool** Http Request Tool *Service*
- 10 **Sustainability Research Tool** Perplexity Tool *Service*
- 11 **Fetch Weather Data** Http Request *Service*
- 12 **Fetch Energy Demand** Http Request *Service*
- 13 **Fetch Renewable Generation** Http Request *Service*
- 14 **Energy Governance Agent** Agent *Model*
- 15 **Renewable Forecasting Agent** Agent Tool *Model*
- 16 **Weather Analysis Agent** Agent Tool *Model*
- 17 **Policy Compliance Agent** Agent Tool *Model*
- 18 **Combine Energy Data** Merge *Logic*
- 19 **Prepare Sheet Data** Set *Logic*
- 20 **Send Sustainability Alert** Slack *Service*
- 21 **Email Performance Dashboard** Gmail *Service*
- 22 **Store Energy KPIs** Google Sheets *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 22
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Slack
- **Model:** OpenAI

## Questions

What does it need to run?

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

What starts it?

It starts on a clock.

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?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

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 22 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%2Fgovern-energy-portfolios-with-openai-and-perplexity)
- **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.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also chat assistants, with the same services where possible, closest in size first.

- [**Audit browser and proxy fingerprint/IP integrity with OpenAI** 22 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/audit-browser-and-proxy-fingerprint-ip-integrity-with-openai)
- [**Audit landing page conversions with DeepSeek and Google Sheets** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/audit-landing-page-conversions-with-deepseek-and-google-shee)
- [**Detect and remediate leaked secret on repo with GitHub and AWS** 22 steps · calls a model · Jira, Slack](https://millionrounds.com/workflow/detect-and-remediate-leaked-secret-on-repo-with-github-and-a)
- [**Detect multi-source transaction fraud and reconcile finances** 22 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/detect-multi-source-transaction-fraud-and-reconcile-finances)
- [**Empower your AI chatbot with OpenAI and Gmail** 22 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/empower-your-ai-chatbot-with-openai-and-gmail)
- [**Generate AI camera moves with Seedance** 22 steps · calls a model · ClickUp, Google Drive](https://millionrounds.com/workflow/generate-ai-camera-moves-with-seedance)
