n8n workflow

Messenger clothing shop

Sell clothing on Facebook Messenger with a Gemini sales agent, Stripe checkout and an admin app, all in one n8n workflow.

By Tushar Rayamajhi · 306 nodes · Admin app included

The canvas loads after the page. You can also open it on n8n.io.

Open on n8n.io

What it does

An AI sales agent for a clothing shop on Facebook Messenger, plus its own admin website, all inside one workflow.

Customers chat with the shop's Page. The agent answers from your real products, manages the cart, saves delivery details step by step, sends a Stripe payment page and confirms the order once it is paid. The shop owner manages products, orders, customers and the assistant from the admin website.

How it works

Messenger intake. The Meta webhook answers the handshake, replies 200 OK at once, ignores duplicates and groups quick messages.

One customer message. A Gemini agent with chat memory answers using products, cart, orders and customer history. Product search works by exact lookup and by meaning, using Gemini embeddings in a Supabase pgvector index.

Delivery details and checkout. Name, phone, city and address are saved on the order. After the customer confirms, checkout re-prices the cart from your product table, checks size, colour and stock, and sends a Stripe payment page with a Pay Now button.

Payment confirmed. The Stripe webhook (signature verified) or the return page marks the order paid, saves the order lines, reduces stock and confirms to the customer.

Admin website and housekeeping. Pages and API for products, photos, orders, customers, an inbox for escalated questions and a test chat are served from the same workflow. A nightly job cleans old data, and failures go to a Problems page.

Tools and integrations

  • Webhook, AI Agent and Gemini chat models
  • n8n Data Tables (14, created by the setup button)
  • Postgres chat memory and Supabase pgvector product search
  • Stripe Checkout and Meta Messenger Send API
  • Google Drive for product photos (optional)
  • Admin website served by Webhook and Code nodes

Setup and requirements

You bring your own accounts and credentials. Nothing in the JSON contains a secret: keys live in n8n credentials, Variables or the app's Settings page.

  1. Use n8n reachable over https: n8n Cloud, or self-hosted with a public URL.
  2. Bring your own accounts: a Supabase project, a Google Gemini API key, a Meta developer app with a Facebook Page you manage, a Stripe account (test mode first) and, optionally, Google Drive OAuth2.
  3. Create the Gemini, Postgres and Google Drive credentials in n8n and select them on the nodes that show a warning. Meta and Stripe keys are entered in the admin website, not in nodes.
  4. Publish the workflow, open the admin website path, press the create-database button and change the first login straight away.
  5. Connect Facebook and Stripe in Settings, add products and test in Messenger before going live. Keep the Meta app in Development mode until a full test order works.

Full step-by-step notes are on the canvas itself as sticky notes, and on the original n8n.io template.

Want a workflow like this built for your business, or have an idea? Message us

Tell us what your team repeats every day. We design and build n8n workflows and AI agents, with a fixed price and a written timeline.

Message ushello@solvex.com.np