Skip to product information

n8n Webhook AI: Train & Run Neural Network with Code Nodes

n8n Webhook AI: Train & Run Neural Network with Code Nodes

 (200+Reviews)
Regular price £36.99
Regular price £36.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Webhook AI: Train & Run Neural Network with Code Nodes

n8n Webhook AI: Train & Run Neural Network with Code Nodes

Regular price £36.99
Regular price £36.99 Sale price
SAVE Sold out

Train and run a neural network via Webhook—powered entirely by n8n Code nodes

n8n Webhook AI: Train & Run Neural Network with Code Nodes provides two production-ready webhook endpoints—one to train and one to predict—using a feedforward neural network (three hidden ReLU layers) implemented with n8n Code. It persists learned weights in n8n workflow static data and returns class probabilities, predictions, and evaluation metrics as JSON.

What this workflow does

  • Training webhook: Send a POST request to /train with epochs, learning rate, and an optional dataset. The workflow runs vectorized forward and backpropagation in JavaScript, updates weights/biases via gradient descent, and stores them in workflow static data.
  • Inference webhook: Send a POST request to /predict with one or more 8-dimensional feature vectors (optionally including trueClass). It runs a feedforward pass through three ReLU hidden layers (9 neurons per layer), using stored weights or a deterministic fallback if none exist.
  • Probabilities and metrics: The workflow computes output logits, applies temperature-scaled softmax, and returns probabilities, predicted class, and confidence. When trueClass is provided, it calculates per-sample cross-entropy loss and batch accuracy.

Use cases

  • Expose an internal ML model to other services through simple HTTP webhook-based inference.
  • Let SaaS operators trigger model training with configurable epochs and learning rate, then immediately run predictions.
  • Prototype and validate classification quality by returning loss, accuracy, and probability distributions per sample.

Technical details

  • n8n nodes: Webhook, Code, Merge, Respond to Webhook, and Sticky Note.
  • Persistence: learned weights stored in n8n workflow static data.
  • Inputs/outputs: /train for epochs/learning rate/dataset; /predict for x: [8 numbers] with optional trueClass, returning probabilities, prediction, confidence, and evaluation metrics.
View full details