Generate carbon emissions reports with OpenAI, Slack and an ESG dashboard
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL (plus 2 other triggers). Along the way it connects OpenAI Chat Model and Slack.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 2 other triggers).
- Set - Config (Edit Fields (Set)): sets 18 fields: companyName, facilityName, region…
- HTTP Request: calls an HTTP API
- JS - Calculate Carbon Emissions (Code): runs custom JavaScript code
- Switch: routes items into 4 branches
- Wait: pauses before continuing
- If: checks a condition and branches into true / false
- AI - Generate Sustainability Report (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Set - Discarded/Cancelled (Edit Fields (Set)): sets 1 field: finalStatus
- JS - Parse LLM Output & Build Report Payload (Code): runs custom JavaScript code
- Wait: pauses before continuing
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Webhook
n8n-nodes-base.webhook - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Wait
n8n-nodes-base.wait - If
n8n-nodes-base.if - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow receives energy consumption data or runs on a schedule, converts electricity and fuel usage into estimated CO2e using a live grid-intensity API, and generates a management-ready sustainability report with OpenAI, delivering the…