---
title: "Auto-reply to YouTube comments by type, logged in Supabase"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/bed10c95-08c2-4371-aac2-b02771cc44b0"
updated: "2026-11-09"
---

# Auto-reply to YouTube comments by type, logged in Supabase

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that answers the newest comments on a YouTube video you paste in n8n’s chat. OpenAI sorts each new comment into praise, a question or criticism, thanks the praise and answers questions from the video’s transcript. Supabase logs every comment and reply.

Auto-reply to YouTube comments by type, logged in Supabase is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-09. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow replies to the newest comments on one of your YouTube videos. You paste the video’s link in n8n’s chat. It reads the five latest top-level comments and, in a second branch, fetches the video’s transcript from a service you name. Each comment is looked up in a Supabase table and skipped if it is there, while a new one is saved and then labelled by OpenAI as criticize, compliment or specificdoubt. Praise gets a thank-you. A question gets an answer drawn from the transcript, and criticism gets no reply. Every reply is posted under its comment and written back to that comment’s row.

You paste a YouTube link in n8n’s chat → YouTube returns five comments, your service the transcript → Supabase skips handled comments and saves new ones → OpenAI labels each one and writes a thank-you or an answer → The reply goes up on YouTube and into Supabase

### Who it suits

Creators who get more questions under their videos than they can answer, and who accept replies that a model writes and posts under their channel’s name. Skip it if a person must read each reply before it goes up. Nothing in the file waits for approval.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Tutorial channels | Creators who teach software | Run it a few hours after posting so questions get answers from the transcript | A viewer asks which setting a step used, and the reply points to the step in the video. |
| Product channels | Companies that publish how-to videos | Keep answers tied to what the video shows | A software company answers setup questions under its feature videos. |
| Small channels | Solo creators | Thank every kind comment without typing each reply | A new upload gets a thank-you under each compliment. |
| Agencies | Community managers for client channels | Run one copy per client, each with its own Supabase project | An agency keeps a log of every reply it posted on a client’s channel. |

### Where to use it

Any n8n signed in to the channel that owns the videos. Replies go out as that channel.

- n8n Cloud or your own server: the same file and steps
- n8n’s chat: where you paste each video link
- Your YouTube channel: replies appear under the comments, posted by the account the YouTube credential signs in with
- Supabase: the table holds every comment seen and, where one was posted, its reply

### How to set it up

Get it saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Its author puts setup at about 13 minutes. The transcript call had no address in the original copy, so this one holds `https://YOUR_TRANSCRIPT_SERVICE_ADDRESS` until you name a service.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| YouTube | A YouTube OAuth2 credential for the channel that will reply, with the YouTube Data API v3 on in its Google Cloud project |
| OpenAI | An API key, used by three model nodes |
| Supabase | A project with a table named \`YT\_Comment\` and three text columns: \`id\_comment\`, \`comment\` and \`reply\` |
| A transcript service | An address that accepts the POST body of \`Get YouTube Transcript\` and answers with a \`transcript\` field |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a YouTube OAuth2 credential and select it in `Get Video Snippet`, `Comment Response` and `Comment Response1`.
3. Add an OpenAI credential and select it in `gpt-4o-mini`, `gpt-4o-mini1` and `gpt-4o-mini2`.
4. Create the `YT_Comment` table in Supabase, add a Supabase credential with your project URL and service role key, and select it in the three Supabase nodes.
5. In `Get YouTube Transcript`, replace `https://YOUR_TRANSCRIPT_SERVICE_ADDRESS` with your service’s address, and change the body if your service expects another shape.
6. Save, open the chat, paste the link of a video of yours with a few comments, and read the replies on YouTube before you rely on it.

The transcript call sends this body, with the video’s ID filled in. `Cleanup transcript` then reads `transcript` from the answer.

```json
{
  "startUrls": ["https://www.youtube.com/watch?v=<video ID>"],
  "language": "Default",
  "includeTimestamps": "No"
}
```

### How to use it

Paste the link of one of your videos, a `youtube.com/watch?v=` address or a short `youtu.be` one. Each run handles the five newest top-level comments. A comment already in the table is skipped, so a later run picks up only what is new among the latest five.

What to change for a different result

| To change | Where |
| --- | --- |
| How many comments | \`maxResults\` in \`Get Video Snippet\`, 5 in the file |
| The labels | The prompt in \`Comment Classifier\` and the three rules in \`Switch\` |
| The tone of replies | The prompts in \`Compliment Reply\` and \`Specific Doubt Reply\` |
| What your channel covers | \`Comment Classifier\` says the channel is about artificial intelligence, so change that line |
| Filler cut from the transcript | The patterns in \`Cleanup transcript\` |

### Example

A viewer writes under a tutorial: “Which plan do I need for the API step?” The comment is new to the table. It is saved and sent to the classifier, which answers:

```json
{ "out": "specificdoubt" }
```

`Specific Doubt Reply` reads the comment with the cleaned transcript and writes an answer from what the video says. `Comment Response1` posts it under the comment, and `Update responce to Database` writes it to the row’s `reply` column.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one has 26 nodes, among them a loop that takes one comment at a time. Supabase is a hosted database, used here as the list of comments already seen. A credential is a key n8n keeps for you. The YouTube one signs in as your channel, which is why the replies carry its name. Try it first on a video with only a few comments.

**For experts.** The classifier and both reply chains run chatgpt-4o-latest, though their model nodes are named gpt-4o-mini. A structured parser holds the classifier to `{"out": "..."}`.

How one comment moves

| Step | Nodes | What happens |
| --- | --- | --- |
| Seen before? | \`Get Database Value\`, then \`If\` | Looks up the comment’s ID in \`YT\_Comment\`. A match goes to a no-op and back to the loop |
| Saved | \`Update comment to Database\` | Inserts the ID and the text before anything else |
| Labelled | \`Comment Classifier\`, then \`Switch\` | criticize goes to a no-op. The other two get replies |
| Answered | \`Compliment Reply\`, or \`Merge\` then \`Specific Doubt Reply\` | The question chain gets the cleaned transcript through \`Merge\` |
| Posted and logged | \`Comment Response\` or \`Comment Response1\`, then \`Update responce to Database\` | Posts to the comments endpoint with the comment as parent, then stores the reply’s text |

`Cleanup transcript` decodes HTML entities, drops filler words such as So, Now and Okay, and strips patterns for one channel’s usual greeting, sign-off and subscribe line.

### Good to know

Replies go out under your channel’s name, and no one checks them first.

- No approval step: a wrong answer is posted as written, so read the first runs’ replies on YouTube
- Saved first: a comment is written to the table before it is labelled, so if its reply fails it is never tried again
- Criticism: those comments stay in the table with no reply
- The newest five: older comments outside that window are never read
- Other labels: \`Switch\` has no fallback, so a label outside the three leaves that comment unanswered and ends the loop there
- Several questions: the transcript joins the question chain through one \`Merge\`, so on your first run check that a second question also gets its answer
- Billing: up to two OpenAI calls per new comment, plus whatever your transcript service charges
- Privacy: comments and the transcript go to OpenAI, and comments and replies to your Supabase project
- The original copy: its \`Get Video ID\` and \`Cleanup transcript\` code had lost their backslashes, which stopped the first from compiling and made the second turn every letter s into a space. This one has them back
- Credentials: the JSON holds none, and nothing from its author’s accounts

## README

````markdown
# Auto-reply to YouTube comments by type, logged in Supabase

An n8n workflow. Paste the link of one of your YouTube videos in n8n's chat. It reads the five newest comments, has
OpenAI label each new one, thanks praise, answers questions from the video's transcript and posts the replies as your
channel. A Supabase table keeps every comment and reply, so none is handled twice.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 26 nodes. It holds no credential.
- Changes to the original copy. Its `Get Video ID` code and its `Cleanup transcript` code had lost their backslashes:
  the first could not compile, and the second's whitespace step turned every letter s into a space. This copy has
  them back. The transcript call had no address at all, so it now holds `https://YOUR_TRANSCRIPT_SERVICE_ADDRESS`.
- `README.md`: these notes.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Google Cloud project with the YouTube Data API v3 turned on, and an OAuth client for n8n's YouTube credential. Sign
  in with the channel that should post the replies.
- An OpenAI API key.
- A Supabase project with a table named `YT_Comment` and three text columns: `id_comment`, `comment` and `reply`.
- A transcript service (below).

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a YouTube OAuth2 credential and select it in `Get Video Snippet`, `Comment Response` and `Comment Response1`.
3. Add an OpenAI credential and select it in `gpt-4o-mini`, `gpt-4o-mini1` and `gpt-4o-mini2`.
4. Add a Supabase credential with your project URL and service role key. Select it in `Get Database Value`,
   `Update comment to Database` and `Update responce to Database`.
5. Set the transcript service's address in `Get YouTube Transcript`.
6. Save. Open the chat from the canvas, paste the link of a video of yours with a few comments, then read the replies
   on YouTube before you use it on a busy video.

## The transcript service

The original copy left this node's address empty. Yours receives this POST body, with the video's ID filled in:

```json
{
  "startUrls": ["https://www.youtube.com/watch?v=<video ID>"],
  "language": "Default",
  "includeTimestamps": "No"
}
```

`Cleanup transcript` reads the field `transcript` from the answer, so the service must return the text under that name.
Change the body in the node if your service expects another shape. Until the address is set, the run stops at this
node.

## Change the look

- Number of comments: `maxResults` in `Get Video Snippet` (5).
- Labels: the prompt in `Comment Classifier`, which describes a channel about artificial intelligence, and the three
  rules in `Switch` (criticize, compliment, specificdoubt).
- Tone: the prompts in `Compliment Reply` and `Specific Doubt Reply`.
- Model: all three model nodes run chatgpt-4o-latest, whatever their names say. Pick a current model there if OpenAI
  has retired that one.

## Good to know

- Nothing waits for approval: every reply is posted as the model wrote it.
- A comment is saved before it is labelled. If its reply fails, the next run skips it.
- Criticism gets no reply, and only the five newest comments are read on each run.
- `Switch` has no fallback output. A label outside the three ends the loop at that comment.
- The transcript reaches the question chain through one `Merge`. On your first run, check that a second question also
  gets its answer.
- Comments and the transcript go to OpenAI. Comments and replies are stored in your Supabase project.
````

## What is in it

2 files, 28 KB, downloaded as a zip.

```text
README.md  4 KB
workflow.json  24 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 22 steps, starting on a chat message
- AI: 3 steps call an AI model: Specific Doubt Reply, Comment Classifier and Compliment Reply
- Sign-ins: Signs in to: YouTube, Supabase and OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 12 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/bed10c95-08c2-4371-aac2-b02771cc44b0)
- [Its page on Mindket](https://mindket.com/p/bed10c95-08c2-4371-aac2-b02771cc44b0)
