Learn Build Community Opportunities Hosted n8n Blog About Careers Contact Log in

Home / Blog / Explainer

Explainer

Log Generator Fuel Top-Ups and Get Low Diesel Alerts in n8n

A beginner Arena brief about a hotel whose generator ran dry on a full weekend, and the simple n8n workflow that would have warned the manager in time.

This beginner Arena brief asks builders to log generator fuel top-ups and alert the manager when diesel runs low, using n8n, a web form, Google Sheets and WhatsApp. Staff record each top-up on their phone, the workflow keeps a running diesel balance, and the manager gets a WhatsApp warning before the tank gets dangerously low.

The business behind the brief

The brief describes Grand Royal Suites, an Arena scenario: a 35-room hotel on Bank Road in Owerri that runs a 250 kVA diesel generator up to 14 hours a day because of grid outages. It burns about 350 litres a day, at more than ₦4.2 million a month. For many Nigerian businesses, diesel is not a utility bill. It is the biggest operating cost they have.

Today the maintenance technician logs purchases on loose paper receipts, writes hour meter readings in a book, and estimates the tank level each evening with a calibrated stick. The brief lists the results: about ₦180,000 a month in diesel purchases nobody can verify, and a generator that ran completely dry during a busy weekend, damaging air conditioners and spoiling ₦350,000 of food in the cold room, followed by emergency diesel bought at night at inflated prices.

What the automation has to do

The beginner version is deliberately small, one workflow, but it covers the two problems that matter most:

  • A record of every top-up: who added how many litres, at what price, at what meter reading, with the total cost calculated.
  • A warning in time: a WhatsApp message to the manager whenever the calculated stock is at or below the safe threshold of 400 litres.

How to approach the build

  1. Start with an n8n form. The n8n Form Trigger node gives staff a web form they can open on any phone, with fields for staff name, litres added, price per litre and current meter hours. No spreadsheet access, no app to install. Make every field required, and the numeric ones number fields.
  2. Keep settings in the sheet, not in the workflow. A GeneratorSettings tab holds the current fuel stock, the minimum threshold and the manager's WhatsApp number. Read it with a Google Sheets node at the start of each run. When the manager wants a different threshold, they change a cell, not your workflow.
  3. Do the arithmetic in one Code node. Convert form values to numbers, compute the total cost (litres times price), the new stock (previous stock plus litres added), and whether the new stock is at or below the threshold. Output everything later nodes need, with clear names.
  4. Write the log, then update the stock. Append a row to DieselLog, then update the current stock value in GeneratorSettings. The log is the history; the settings row is the latest state.
  5. Alert only when it matters. An If node checks the low-fuel flag, and an HTTP Request node sends the WhatsApp message through GreenAPI. Keep the GreenAPI token in an n8n credential, never typed into a URL on the canvas.

The hard parts, even at beginner level

Numbers arrive as text

Form and sheet values often come through as strings. Add "500" and "200" as text and you get "500200" litres. Convert explicitly with Number() before any arithmetic, and the brief's calculation criterion takes care of itself.

A top-up form only ever adds fuel

Think about this one before a client does. Every form submission increases the stock, but the generator burns fuel all day. As specified, the balance only ever goes up between top-ups, so on its own it cannot see the tank running down. A good builder points this out and suggests the next step: estimate consumption from the hour meter readings between top-ups, or add a short daily reading of the tank level. Raising that in your notes shows you understand the business, not just the nodes.

Credentials on screenshots

The rubric includes credential safety. Beginners often paste API tokens straight into an HTTP Request URL, and then into a screenshot. Use credentials or variables, and check your screenshots before you submit.

What our graders look for

  • Canvas and node wiring (25%): named nodes in a clear order.
  • Form trigger configuration (15%): the right fields, required and typed.
  • Calculation logic (25%): correct totals and balances, with numbers handled as numbers.
  • Google Sheets logging and settings update (20%).
  • Alerting and credential safety (15%): the alert fires at the threshold, and no secret is exposed.

Pricing and pitching this job

The brief values this at $60 to $150 fixed. That is a small job, but an easy one to sell, because the client has a story you can point to: one dry tank on a busy weekend cost more than the whole build. Pitch it as insurance, and offer the consumption estimate as a paid next step.

New Arena briefs drop every Monday in the app at app.automatenaija.com, and every Beginner brief is free, so pick one and build it this week.

Frequently asked questions

Can n8n send a WhatsApp alert when diesel is low?

Yes. After calculating the new fuel balance, an If node checks whether it is at or below your threshold, and an HTTP Request node sends a WhatsApp message through a provider such as GreenAPI. Keep the threshold and the manager's number in a Google Sheet so they can be changed without editing the workflow.

Do staff need access to the Google Sheet?

No. The n8n Form Trigger gives them a simple web form they open on their phone. The workflow writes their entry to the sheet, so staff never touch the spreadsheet and cannot accidentally edit past records. Only the manager needs to open the sheet, to read the log or change settings.

How can the system estimate fuel used, not just fuel added?

Use the hour meter readings captured with each top-up. Hours run between two top-ups, multiplied by the generator's typical litres per hour, gives an estimate of fuel burned. Subtract it from the balance, and check the estimate against an occasional real tank reading so the figure does not drift over time.

Is this automation useful beyond hotels?

Very. Any Nigerian business that runs a generator, such as schools, clinics, factories, estates or filling stations, has the same problems: unverified diesel purchases and running out at the worst moment. The same form, sheet and alert pattern works for all of them with only the settings changed.


Build it with us. The community is free and the build track teaches this kind of automation week by week: see pricing or join the community.

Comments

Questions, corrections and your own experience are welcome. Comments are posted by members in the Automate Naija community and moderated there.

Loading comments...

Add a comment

Keep reading

More guides on building, fixing and shipping automations with n8n, Make and Zapier.