Shashank Pandit

Workflows where AI agents read, decide and act.

I'm Shashank Pandit. I build automations in n8n that connect language models, vector databases, CRMs and APIs, so work that took several manual steps runs on its own. Here are four workflows I built, each with screenshots from real runs.

Each green tick is a workflow that ran end to end. Select one to jump to it.

What this work shows

Agent design
AI agents that call tools, keep chat memory in PostgreSQL and drive a real browser through MCP.
Retrieval (RAG)
Crawling, chunking, embeddings and semantic search on Supabase vector stores, with both OpenAI (1,536 dimensions) and Mistral (1,024 dimensions) embeddings.
Workflow logic
Branching with IF and Switch nodes, polling loops for long-running jobs, dynamic request payloads and JavaScript code steps.
Integrations
Google Sheets, HubSpot, Gmail, the YouTube Data API, Replicate, and any REST API through HTTP Request nodes.
Debugging
Traced quota limits, vector dimension mismatches, pgvector functions and MCP browser errors until the full run worked.
Tools
n8n (self-hosted), OpenAI, Mistral AI, Supabase, PostgreSQL with pgvector, Playwright MCP, JavaScript.

Index the site

  1. Form: submit a website URL
  2. Crawl the site and scrape all pages
  3. Wait 30 seconds, check crawl status, repeat until done
  4. Split pages into chunks
  5. Embed with OpenAI, store in Supabase

Ask questions

  1. Chat message received
  2. AI Agent with OpenAI model and Postgres memory
  3. Search the vector store for relevant chunks
  4. Reply with the answer and source URL
The workflow. The top row answers questions. The bottom row crawls and indexes a site, looping on the status check until the crawl finishes.
A live answer. The chat, the execution log and the agent output side by side. The log shows the agent using memory, the model and the vector store.
Checked against the source. The Books to Scrape demo site lists the same book at the same price, in stock.

What the run showed

  • Asked “is Sharp Objects in stock”, the bot answered In stock at £47.82 and linked the book's page.
  • The answer comes from the indexed site content, not from the model's training data.
  • The agent replied in 6.2 seconds. The full run took about 32 seconds and roughly 2,064 tokens.

Prepare the request

  1. Read title, prompt and description from Google Sheets
  2. Keep only pending rows
  3. Build the request payload
  4. Call the Replicate API to start generation

Wait for the video

  1. Wait for generation
  2. Check generation status
  3. Switch: keep waiting, or continue when ready

Publish

  1. AI Agent step (OpenAI model)
  2. Download the video
  3. Upload it to YouTube
The workflow. The Switch node routes each status check: loop back to wait, or move on to download and upload once the video is ready.
The output. One of the generated videos, titled “Resplendent Quetzal Perched in a Tree – Stunning Close-Up”.

What this covers

  • Long-running AI jobs handled by polling: the workflow only moves on when the video is ready.
  • Request payloads built dynamically from spreadsheet fields.
  • Only pending rows are processed, so finished videos are not generated again.
  • The whole path, from sheet to YouTube upload, runs without anyone touching it.

Capture and score

  1. Run the workflow
  2. Read leads from Google Sheets
  3. AI Agent analyses and scores each lead
  4. JavaScript node processes the result

Decide and act

  1. IF node routes the lead
  2. Create or update the contact in HubSpot
  3. Send a confirmation email with Gmail
  4. Update the sheet: lead status, score, CRM sync
The workflow. Every node on the main path shows a green tick from a successful run. Leads that don't pass the IF check skip HubSpot and email, and the sheet is still updated.
The email the lead receives. Personalised with the lead's name and the topic of their enquiry. The sender address is blurred.

What the run showed

  • One sheet row went through scoring, CRM sync, email and a sheet update in a single run.
  • The confirmation arrived in Gmail with the right name and enquiry topic filled in.
  • The sheet records each lead's status, score and CRM sync result, so every run leaves a record.

Collect the data

  1. Run the workflow
  2. AI Agent drives the browser through Playwright MCP: open Amazon, search for laptops
  3. Extract title, price, RAM and storage
  4. Embed with Mistral, store in Supabase

Ask questions

  1. Chat message received
  2. AI Agent with a Mistral chat model
  3. Semantic search in Supabase through a custom match function
  4. Reply in chat
The workflow. The top flow collects and stores product data. The bottom flow answers questions from it. Both use Mistral embeddings with 1,024 dimensions.
The chat interface. When no laptop met every requirement, the bot said so and offered the closest match instead of making one up.
Inside a run. For “Return only laptops priced below ₹50,000” the agent returned the HP 15 Smartchoice at ₹49,990 with its processor, RAM, storage and display. The log shows the model, vector store and embeddings calls.

What the run showed

  • Product details scraped from Amazon by an agent controlling a real browser, then searchable by meaning, not just keywords.
  • Budget filtering worked: the answer was ₹49,990, under the ₹50,000 limit.
  • The agent replied in 6.4 seconds using about 1,507 tokens.

Problems I fixed on the way

Browser automation
Playwright MCP connection problems, the “browser already in use” error, and invalid browser_navigate parameters.
Model provider
OpenAI quota and rate limits. I moved chat and embeddings to Mistral AI.
Vector database
A dimension mismatch between OpenAI (1,536) and Mistral (1,024) vectors, pgvector setup in PostgreSQL, a custom match_amazon_products() function, and an ambiguous metadata column error.
Agent wiring
Getting the n8n AI Agent and the Supabase vector store to work together.