{ "id": "NMGsDLoVZ7DUukGs", "meta": { "instanceId": "28a947b92b197fc2524eaba16e57560338657b2b0b5796300b2f1cedc1d0d355" }, "name": "PG&E Daily Cost Tracker", "tags": [ { "id": "yJGnIHoS9KZ1HkjS", "name": "template", "createdAt": "2025-04-17T20:22:38.913Z", "updatedAt": "2025-04-17T20:22:38.913Z" } ], "nodes": [ { "id": "814cc9ac-382b-42b3-b5b8-90eda0dc2889", "name": "Schedule Trigger", "type": "n8n-nodes-base.scheduleTrigger", "position": [ -2640, 100 ], "parameters": { "rule": { "interval": [ { "triggerAtHour": 8 } ] } }, "typeVersion": 1.2 }, { "id": "310bfb08-2086-4f0f-8790-02c2c186bae2", "name": "Type password", "type": "n8n-nodes-base.airtop", "position": [ -1540, 100 ], "parameters": { "text": "={{ $('Variables').item.json.PGE_Password }}", "resource": "interaction", "windowId": "={{ $('Create browser window').item.json.windowId }}", "operation": "type", "sessionId": "={{ $('Create session').item.json.sessionId }}", "pressEnterKey": true, "additionalFields": { "waitForNavigation": "networkidle0" }, "elementDescription": "PASSWORD Text Box" }, "typeVersion": 1 }, { "id": "b0de782e-9c54-4a40-b7e8-8e7ab3655986", "name": "Variables", "type": "n8n-nodes-base.set", "position": [ -2420, 100 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "3a765a8e-14d8-4a32-b894-b6f90e5db246", "name": "PGE_Username", "type": "string", "value": "" }, { "id": "81a94ea1-714b-4f9f-b63a-47fee5f51e3a", "name": "PGE_Password", "type": "string", "value": "" }, { "id": "e90a5678-4c62-443c-ab1d-57efd6ca69eb", "name": "Email", "type": "string", "value": "" } ] } }, "typeVersion": 3.4 }, { "id": "69cca1c7-9a83-43a7-95e7-98ba24f9575b", "name": "Go to \"Energy Costs\"", "type": "n8n-nodes-base.airtop", "position": [ -660, 100 ], "parameters": { "resource": "interaction", "windowId": "={{ $('Create browser window').item.json.data.windowId }}", "sessionId": "={{ $('Create session').item.json.sessionId }}", "additionalFields": { "waitForNavigation": "load" }, "elementDescription": "ENERGY COSTS" }, "typeVersion": 1 }, { "id": "184206ce-4b4d-4bb0-b468-cbb61f45b61b", "name": "Go to \"Electricity and Gas\"", "type": "n8n-nodes-base.airtop", "onError": "continueRegularOutput", "position": [ -440, 100 ], "parameters": { "resource": "interaction", "windowId": "={{ $('Create browser window').item.json.data.windowId }}", "sessionId": "={{ $('Create session').item.json.sessionId }}", "additionalFields": { "waitForNavigation": "networkidle0" }, "elementDescription": "COMBINED" }, "typeVersion": 1 }, { "id": "424b5209-97e7-4eef-a496-ac9f08d84d3d", "name": "Extract Costs", "type": "n8n-nodes-base.airtop", "notes": "Some PG&E accounts have a \"Combined\" view for gas and electricity", "position": [ -220, 100 ], "parameters": { "prompt": "Extract the daily energy costs from the webpage content, including both natural gas and electricity costs. Format the information as a daily update email, listing the costs from the most recent date to the earliest. Ensure the email format is clear and concise, without including a subject line or greeting. Include the date, total combined costs, natural gas costs, and electricity costs for each day. \n\nIf natural gas costs are not provided, ignore them, ignore Total Combined Costs and report only on electricity \n\nFor example, if the webpage content provides the following data:\n\n- Date: 2023-10-01, Total Combined Costs: $15.00, Natural Gas Costs: $5.00, Electricity Costs: $10.00\n- Date: 2023-09-30, Total Combined Costs: $14.50, Natural Gas Costs: $4.50, Electricity Costs: $10.00\n\nThe output should be formatted as an easy to read email:\n\n\n\n
\nOctober 1, 2023
\nTotal Combined Costs: $15.00
\nNatural Gas Costs: $5.00
\nElectricity Costs: $10.00
September 30, 2023
\nTotal Combined Costs: $14.50
\nNatural Gas Costs: $4.50
\nElectricity Costs: $10.00