Templates / Send railway queue predictions with OpenAI GPT-4o-mini, Gmail, and Google Sheets

Send railway queue predictions with OpenAI GPT-4o-mini, Gmail, and Google Sheets

Ready for 3.0

by isaWOW ✓ · 7 views · created 2026-07-04 · Market Research, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 7 nodes and runs when someone submits an n8n form (“Railway Queue Predictor”). Along the way it connects Google Sheets and Gmail. It also calls api.openai.com over HTTP.

How it runs

Trigger: When someone submits an n8n form (“Railway Queue Predictor”).

  1. 2. Code — Predict Queue Wait Times (Code): runs custom JavaScript code
  2. 3. HTTP — AI Write Advisory (HTTP Request): calls api.openai.com (POST)
  3. 4. Code — Parse Advisory and Alert Colors (Code): runs custom JavaScript code
  4. 5. Code — Build HTML Email (Code): runs custom JavaScript code
  5. 6. Sheets — Log Prediction (Google Sheets): append
  6. 7. Gmail — Send Queue Alert to Traveler (Gmail): uses Gmail

Services it uses

Google SheetsGmail

HTTP calls to: api.openai.com

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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (5)

From the author

Quick overview This workflow collects train trip details via an n8n Form, predicts station crowding and queue times with a rule-based algorithm, generates a short advisory with OpenAI, then emails a color-coded HTML alert via Gmail and logs each prediction to…

Excerpt from isaWOW's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.