DIY: Portfolio Q&A Chatbot using n8n

I recently built a Q&A chatbot for my portfolio website using n8n and hosted it on Google Cloud Platform (GCP), so I thought it would be interesting story to share. It covers a simple use case, where visitor of my website could ask the chatbot anything about my work experience.

Here are some pre-requisites that you should learn or do before building workflow using n8n:

  1. Basic server-client knowledge
  2. Basic JSON knowledge
  3. Get yourself Gemini or Claude API key
  4. Install n8n, either locally or host it somewhere (*)

The Q&A chatbot workflow has several nodes (of course you can add / remove whatever nodes to suit your needs) and in my project, it looks like this:



I'll explain a little bit about the node one by one:

  • Webhook node. This one is used to listen to the request that is coming from the client. In this case, the questions coming from the visitor of my website. 



  • Read and parsing HTML node, used to read the content of my portfolio website and parse my it into readable text that can be feed to AI as base context.



  • AI node, which can be whatever AI that you prefer. I used Gemini, simply because I want to have the billing centralised since I already hosted my n8n in GCP. In this node, I send a prompt to ask AI to answer visitor's question based on the my work experience that I parse from previous node.  
    • Ping me if you want to know what is the prompt that I use.


  • Last, respond to Webhook node, used to return any answer from the AI. It will return in JSON format, so make sure your client could parse the response.



That's it. Hopefully this would also help you setting up your own Chatbot using n8n.

Popular posts from this blog

Understanding Customer's Jobs, Pains, and Gains

Product Manager and Project Manager

Watermark using Canvas & Javascript