I build n8n pipelines that connect databases, APIs, WhatsApp Business, Razorpay, Google and Microsoft 365 to LLM and vector-store nodes, and I run them self-hosted. These are eight of them.
Trigger
Logic
App or API
AI
Error path
AI sub-node
Selected project in my work history
Citizen-support RAG assistant
Answers from your own documents, on your own server.
n8n
Ollama
pgvector
Postgres
14 nodes, 9 AI
A support team needed answers grounded in official PDFs, with nothing leaving the building. The model and the vector store both run self-hosted, and every answer is logged for audit.
How it runs
Ingestion: a PDF arrives on a webhook, is split into overlapping chunks, embedded with a local model, and upserted into pgvector.
Query: a question arrives on a second webhook. The retriever pulls the closest chunks and a local chat model writes the answer from them only.
Every question, answer and source chunk is written to Postgres before the reply goes out.
What keeps it safe
The prompt tells the model to answer from the retrieved context only, and to say it does not know when the context does not contain the answer.
The audit write happens before the response, so a logged answer always exists for anything a user saw.
From a new lead to a paid, verified client without a person in the loop.
n8n
WhatsApp Business
Razorpay
Google Sheets
Slack
13 nodes
Onboarding meant a person chasing documents on WhatsApp, sending a payment link, and updating a tracker by hand. The workflow runs that sequence end to end and cut manual onboarding time by about 70%.
How it runs
A new lead lands on a webhook and is logged in a Google Sheet.
The lead gets a WhatsApp message asking for the KYC details. Their reply resumes the run.
If the details are complete, a Razorpay payment link is created over HTTP and sent back on WhatsApp.
A second webhook receives the Razorpay payment event, marks the row paid and alerts the team on Slack.
What keeps it safe
An incomplete KYC reply gets a message naming exactly what is still missing, instead of a generic retry.
The Razorpay webhook signature is verified before any row is changed.
Payment and status updates key on the Razorpay order id, so a repeated webhook does not double-update.
Selected project in my work history (Hyrowah IoT fleet)
Anomaly-to-ticket pipeline
A sensor misbehaves, the right person gets a ticket that already explains why.
n8n
MQTT
Ollama
Jira
Slack
11 nodes, 2 AI
Field units publish readings over MQTT. Someone had to notice a bad reading, work out what it meant, and file a ticket. This flow scores each reading, has a language model write the incident summary, and routes the ticket by severity.
How it runs
An MQTT trigger subscribes to the sensor topic and receives every reading.
A code step keeps a rolling window per device and computes a z-score against that device's own history.
Only readings past the threshold continue. A local model turns the reading and its recent history into a short incident summary.
A switch routes by severity. Critical anomalies create a high-priority Jira issue and ping Slack; the rest create a normal issue.
What keeps it safe
Baselines are per device and stored in workflow static data, so one noisy unit cannot skew another.
If the language model is unreachable, the ticket is still created with the raw numbers and a note that the summary failed.
An error trigger reports any failed execution to Slack. Set the workflow as its own error workflow in its settings to activate it.
Monday-morning KPIs, written up and waiting in Notion before anyone asks.
n8n
Postgres
Claude
Notion
Slack
7 nodes, 2 AI
Leadership wanted a weekly brief, and someone was assembling it by hand from database queries. The workflow pulls the numbers, computes the week-on-week change in code, and asks Claude to write only what the numbers support.
How it runs
A schedule trigger fires every Monday at 07:30.
One Postgres query returns this week and last week per KPI.
A code step computes the deltas, so the model never does arithmetic.
Claude turns the table into a fixed-structure brief: headline, what moved, what to watch.
The brief is filed as a Notion page and a link is posted to Slack.
What keeps it safe
All arithmetic happens in code and the prompt forbids new numbers, so the narrative cannot contradict the table.
If a KPI is missing for the week, the brief says the data is missing instead of filling the gap.
An inbox mixed routine requests with messages that carried compliance risk. The agent classifies each email, drafts a reply for the routine ones, and stops for a human approval before anything is sent.
How it runs
A Gmail trigger picks up each new inbound email.
A classifier labels it by route, urgency and compliance flag, and returns a confidence score.
Low confidence, or any compliance flag, skips drafting and goes straight to a person with a label.
Otherwise a model drafts a reply into Gmail, and Slack asks a reviewer to approve or reject it.
Only an approval sends the email.
What keeps it safe
Nothing is sent without an explicit approval, including when the classifier is confident.
The low-confidence path exists so an uncertain classification is routed to a person instead of being guessed.
Approval requests expire after four hours, so a draft cannot sit waiting indefinitely.
Everyone's Tomorrow: webhook-driven journeys across WhatsApp and email
Payment-to-follow-up journey
A payment lands, the right message goes out on the right channel.
n8n
Razorpay
Postgres
WhatsApp Business
Gmail
12 nodes
Supporters should hear back quickly and differently depending on who they are. A first-time supporter needs a welcome; a returning one needs recognition. This workflow decides which and sends it.
How it runs
Razorpay posts a payment event to a webhook, and the signature is verified first.
The order is upserted in Postgres and the supporter's history is read back.
A switch segments them: first-time, returning, or a larger gift.
Each segment gets its own WhatsApp message, with an email as the fallback when no WhatsApp number is on file.
On the WhatsApp path, a wait node resumes three days later and sends a short follow-up.
What keeps it safe
The signature check runs before anything is written, so a forged request changes nothing.
Supporters are upserted by email, so a repeated webhook does not create a duplicate supporter.
The email fallback means a supporter without WhatsApp is still acknowledged.
Everyone's Tomorrow: Meta Ads pipeline and Google Analytics attribution
Ads and analytics attribution report
Spend from Meta, sessions and conversions from GA4, joined on the campaign.
n8n
Meta Marketing API
Google Analytics 4
Postgres
Slack
8 nodes
Ad spend lives in Meta and conversions live in Google Analytics, so nobody could say what a campaign actually cost per result. This workflow joins them daily on the campaign tag and flags campaigns that overspend.
How it runs
A schedule runs every morning.
One branch pulls yesterday's spend per campaign from the Meta Marketing API over HTTP; the other pulls conversions per campaign from GA4.
A merge joins them on the campaign name.
A code step computes cost per conversion and flags campaigns above their target.
Rows are upserted into Postgres, and any flagged campaign is posted to Slack.
What keeps it safe
The join is on the exact campaign name, so a renamed campaign drops out of the join visibly instead of merging into a different one.
Cost per conversion is computed in code from the two sources, so the Slack flag and the stored row always agree.
Recurring data-quality validation from my analytics work
Data-quality monitor
Checks the data before the dashboards do.
n8n
Postgres
Claude
Slack
Jira
12 nodes, 2 AI
A dashboard is only as good as the table under it. This workflow runs freshness, null-rate and duplicate checks on a schedule, so a broken feed is caught before a stakeholder sees a wrong number.
How it runs
A schedule runs hourly.
Three Postgres queries measure freshness (minutes since the last row), null rate on key columns, and duplicate keys.
A merge collects them and a code step compares each against its threshold.
If any check fails, Claude writes a short plain-language summary of what broke and what depends on it.
The summary goes to Slack and opens a Jira issue. Every run, pass or fail, is logged to Postgres.
What keeps it safe
Every run is logged, so a monitor that stopped running is itself detectable by a missing row.
The model only summarises failed checks. Pass or fail is decided in code with fixed thresholds.