Conversational Interviews with AI Agents and n8n Forms n8n Workflow Template

n8n workflow template · 30 nodes · Redis

Conversational Interviews with AI Agents and n8n Forms is a free n8n workflow template that starts when someone submits an n8n form and works with Redis, Groq and Google Sheets. It has 30 nodes, 5 of them AI nodes (Chat Memory Manager, Window Buffer Memory, AI Agent and Groq Chat Model). To run it, you add your own credentials for Google Sheets OAuth2, Groq API and Redis.

At a glance

Trigger
n8n Form Trigger (Start Interview)
Nodes
30
Apps
Redis, Groq and Google Sheets
AI nodes
5
Credentials
3 types
Category
Spreadsheets, databases and docs

Apps and integrations

  • Redis
  • Groq
  • Google Sheets

Node types used

  • If
  • Edit Fields (Set)
  • Chat Memory Manager
  • n8n Form Trigger
  • Form
  • Crypto
  • Redis
  • Respond to Webhook
  • Window Buffer Memory
  • Webhook
  • HTML
  • AI Agent
  • Groq Chat Model
  • Google Sheets
  • Split Out

How it works

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Set Interview Topic Here!

2. AI Researcher for Endless Interview Questions

Learn more about the AI Agent node

An AI interviewer is an interesting take on a role traditionally understood as expensive and time-consuming - both in preparation and execution. What if this could be handed off to an AI/LLM, which could perform when it suits the interviewee and ask a never-ending list of open and follow-on questions for deeper insights?

This is what this AI researcher agent is designed to do! Upon activation, a loop is created where the agent generates the question and the user answers via the form node. This continues until the user asks to stop the interview.

3. Record Answers and Prep for Next Question

Learn more about the n8n Form node

The interview is no good if we can't record the answers somewhere for later analysis! Using n8n form node to capture the answer, we can simple push our new question and answer pair to our Redis session to build our transcript before continuing the loop with the agent.

4. Graciously End the Interview

Read more about the Chat Manager node

Once the AI/LLM detects the user wishes to end the interview (which is done by the user explicitly saying in the form), then the loop breaks and we conclude the interview session and displaying the confirmation screen.

For this demo, I've created a special confirmation screen which also displays the transcript. This is done by redirecting to a webhook URL. If you don't need this, feel free to change this to "show completion screen" instead.

Set Your Webhook URL here!

For this demo, we want to show a customised completion screen with transcript so it's necessary to redirect to a webhook (see step 6).

5. Save the Interview to Sheets

Read more about the Google Sheets node

For easier data-sharing, we can have the workflow upload the session messages into data analysis tools for our team members.

For this demo, Google Sheets is an easy option. We'll pull the entire session out of redis and upload the messages one by one to sheets.

Check out the example sheet here

6. Display the Transcript

Read more about the Webhook Trigger

This step is totally optional. For a nicer user experience, I use this webhook mini-flow to display the user's transcript for the completion screen. It works by capturing the session_id in the webhook's url and searching for it in our redis database. If a match is found the transcript is fetched and rendered into a webpage using the HTML node and returned to the user. If no match is found, a 404 message is displayed instead.

This is the webhook we want to redirect to!

If you're on n8n cloud, you may want to copy the webhook url generated here and use it as the form ending's redirect url.

Setup notes

The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.

Try it out!

Conducting user interviews have been traditionally difficult due to preparation, timing and execution costs. What if we let an AI/LLM do it instead?

This template enables automated AI/LLM powered user interviews using n8n forms and an AI agent where the question and answers are recorded in a google sheet for later analysis. A powerful tool for any researcher.

Check out the full showcase post here

How it works

  • A form trigger is used to start the interview and a new session is created in redis to capture the transcript.
  • An AI agent is then tasked to ask questions to the user regarding the topic of the interview. This is setup as a loop so the questions never stop unless the user wishes to end the interview.
  • Each answer is recorded in our session set up earlier between questions.
  • Finally, when the user requests to end the interview we break the loop and show the interview completion screen.

Why Redis?

Redis is a fast key-value datastore which makes it ideal for sessions. This ensures the interview flow stays snappy between questions. For my live demo, I used Upstash.com which has a generous free tier.

Need Help?

Join the Discord or ask in the Forum!

1. Setup Interview

Learn more about the form trigger node

The form trigger node will be our entry point into this workflow and to start, we'll just ask for the user's name to start the interview. Our session storage will be using Redis via Upstash.com (you can use regular redis btw!) - whichever way, this ensures a highly scalable system able to handle many users.

Nodes in this workflow

The 30 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:

  1. Stop Interview? (If)
  2. Generate Row (Edit Fields (Set))
  3. Generate Row1 (Edit Fields (Set))
  4. Clear For Next Interview (Chat Memory Manager)
  5. Send Reply To Agent (Edit Fields (Set))
  6. Start Interview (n8n Form Trigger)
  7. Get Answer (Form)
  8. Set Interview Topic (Edit Fields (Set))
  9. UUID (Crypto)
  10. Generate Row2 (Edit Fields (Set))
  11. Create Session (Redis)
  12. Update Session (Redis)
  13. Update Session1 (Redis)
  14. Update Session2 (Redis)
  15. Valid Session? (If)
  16. Respond to Webhook (Respond to Webhook)
  17. Window Buffer Memory2 (Window Buffer Memory)
  18. Window Buffer Memory (Window Buffer Memory)
  19. Redirect to Completion Screen (Form)
  20. Webhook (Webhook)
  21. 404 Not Found (HTML)
  22. AI Researcher (AI Agent)
  23. Parse Response (Edit Fields (Set))
  24. Groq Chat Model (Groq Chat Model)
  25. Show Transcript (HTML)
  26. Save to Google Sheet (Google Sheets)
  27. Session to List (Split Out)
  28. Messages To JSON (Edit Fields (Set))
  29. Query By Session (Redis)
  30. Get Session (Redis)

Credentials you need

  • Google Sheets OAuth2 – used by Save to Google Sheet
  • Groq API – used by Groq Chat Model
  • Redis – used by Create Session, Get Session, Query By Session and Update Session and others

Configure your own credentials after importing. Create each credential in n8n, then select it in the node.

How to import into n8n

  1. Download the JSON file with the button above.
  2. In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
  3. Open each node that shows a warning and select or create its credential.
  4. Read the notes on the canvas, test the workflow with sample data, then activate it.

Do you need somewhere to run it? Read our guide to self-hosted n8n.

Need this customised?

We can adapt this workflow to your apps, data and process, then deploy and support it.

Contact Us