Automation library · Research and reporting

Generate carbon emission reports with OpenAI and Slack

Started by another system calling it, and works across Slack. It hands the judgement calls to OpenAI. 21 steps, 3 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

21 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
2Loops or waits
1Service it connects to

The flow

Starts it 3Model 2Logic 11Service 5

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

  1. 1Webhook - Consumption Data UploadedWebhookStarts it
  2. 2Schedule Trigger - Periodic ReportSchedule triggerStarts it
  3. 3Manual Trigger - Test RunManual triggerStarts it
  4. 4HTTP Request - Auto-Fetch Consumption Data (optional)Http RequestService
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6Set - ConfigSetLogic
  7. 7AI - Generate Sustainability ReportChain LlmModel
  8. 8HTTP Request - Fetch Grid Emission FactorHttp RequestService
  9. 9JS - Parse LLM Output & Build Report PayloadCodeLogic
  10. 10JS - Calculate Carbon EmissionsCodeLogic
  11. 11Wait - For Report ApprovalWaitLogic
  12. 12Switch - Emission Level RouterSwitchLogic
  13. 13IF - Report ApprovedIfLogic
  14. 14Wait - For Data ReviewWaitLogic
  15. 15HTTP Request - Push Report to ESG DashboardHttp RequestService
  16. 16Slack - Notify ManagementSlackService
  17. 17Set - Discarded/CancelledSetLogic
  18. 18IF - Review ApprovedIfLogic
  19. 19HTTP Request - Fetch Prior Period Report (optional)Http RequestService
  20. 20JS - Compute YoY TrendCodeLogic
  21. 21JS - Estimate Offset Cost (optional)CodeLogic

How it's built

Starts on
Another system calling it
Steps
21, with 3 branches, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Slack
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Slack 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?

Take your time. At 21 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 21 steps before you point it at anything that matters.