Skip to content
All modules

Module 01 · foundations · beginner

Text Post API

After this module you can turn any n8n workflow into an HTTP API endpoint that validates input and returns proper status codes.

What it does

A tweet-style "create post" API. You POST a JSON body with a text (and an optional author) to /webhook/posts. If the text is 1–280 characters, the workflow replies 201 Created with the new post: an id, the author, the text, its length and a timestamp. If the text is missing, empty or too long, it replies 400 with an error message.

Flow

Webhook (POST /posts) → Valid Post? ─true─→ Build Post  → Respond Created (201)
                                    └false─→ Build Error → Respond Error (400)

Files

File Tier Purpose
lesson.md Free Step-by-step build
workflow/starter.json Free Linear version without validation (exercise start)
express-vs-n8n.md Free The same API in Express, compared line by line, with pros and cons
workflow/learner.json Learner Finished workflow with validation, 201 and 400
exercises.md Learner Practice tasks
solutions.md Learner Exercise solutions
assets/express-text-post/ Private Same API in Express, for the Express vs n8n video
assets/video/ Private Remotion source for the animated 60s short
notes.md Private My learning log
sell/ Private Offer, video script, blog post