---
title: "Chat agent that lists which workflows use which credentials"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/a265a3f6-20d8-40d4-8bc8-e2ab02d58fd2"
updated: "2026-11-12"
---

# Chat agent that lists which workflows use which credentials

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

An n8n workflow in two steps. One saves which credentials each workflow uses, the other is a chat where an agent answers with SQL. It reads types, ids and names, never secrets.

Chat agent that lists which workflows use which credentials is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. 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 lets you ask which of your workflows use which credentials. Step one lists your workflows through n8n’s own API and saves each one’s id, name and credential list in a SQLite database. Step two is a chat. An AI agent turns your question into a SQL query, runs it and answers. It reads credential types, ids and names only. No secret is read. Nine nodes do the work, beside four sticky notes.

### Who it suits

n8n admins, agencies and teams with many workflows who need to know what breaks when a credential is rotated or removed. It also suits anyone learning how an agent can use a database as a tool. Skip it if your host has no Python runner that allows `sqlite3`, because both steps depend on it.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| IT operations | n8n administrators | Find every workflow that uses a credential before they rotate it | An admin asks which workflows use the Slack account named Support. |
| Agencies | Automation agencies | Audit a client’s instance and list the apps it touches | An agency asks which workflows use Google Sheets and Airtable together. |
| Security | Reviewers | Check where a sensitive account is used | A reviewer asks which workflows use an OpenAI credential. |
| Software | Developers | Study how a chat agent can query a small database | A developer swaps the table for their own and keeps the agent. |

You need a little n8n and the right to change one setting of its Python runner. Nothing in the file states a setup time.

### Where to use it

Any n8n whose Python runner allows `json` and `sqlite3` will run it.

- Your own n8n server: allow the two modules in the runner’s settings, then import the file
- n8n Cloud: only if your plan lets Python code import those two modules
- More facts about workflows: keep more fields in \`Map Workflows \& Credentials\` and add columns in \`Save to Database\`

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Two accounts and one runner setting cover every step.

What you need first

| Need | Detail |
| --- | --- |
| n8n | With a Python task runner |
| Runner setting | \`N8N\_RUNNERS\_STDLIB\_ALLOW\` allowing \`json\` and \`sqlite3\` |
| n8n API | An API key and the API address of your instance, which ends in \`/api/v1\` |
| OpenAI | An API key for the chat model |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Allow `json` and `sqlite3` in the Python runner.
3. Add an n8n API credential with your key and API address, and select it in `n8n`.
4. Add an OpenAI credential and select it in `OpenAI Chat Model`.
5. In the system message of `Workflow Credentials Helper Agent`, replace `<YOUR_N8N_ADDRESS>` with the address of your n8n.
6. Press Test workflow on the manual trigger. `Save to Database` reports how many workflows it stored.
7. Open the chat and ask a question.

### How to use it

Run step one whenever your workflows change, then chat. Ask in plain words and the agent writes the SQL for you.

What to change for a different result

| To change | Where |
| --- | --- |
| Which workflows are read | The options of \`n8n\` |
| Which fields are kept | The three assignments in \`Map Workflows \& Credentials\` |
| What the agent knows | The system message and the description of the tool |
| The model | \`OpenAI Chat Model\` |

### Example

You ask which workflows use Slack and Google Calendar.

The agent writes a query that looks for both app names in the credentials column, since the table keeps them as JSON text. It runs the query through the tool and lists the matching workflows by name. Ask for a link, and it builds one from the address you set in its system message.

### 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. The top row is a one time import. The row below is the chat. SQL is a language for asking a table questions, and the agent writes it for you.

**For experts.** The table is a SQLite file that two Python steps share, and the tool accepts SELECT queries only.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`n8n\` | Lists workflows, all of them | It sees the workflows your API key can see |
| \`Map Workflows \& Credentials\` | Version 3.3 with three assignments, the credentials built from each node’s entry | Each entry holds a credential’s type, id and name |
| \`Save to Database\` | A Code node in Python (Native) | It imports \`json\` and \`sqlite3\`, which the runner must allow |
| \`Query Workflow Credentials Database\` | A Custom Code Tool 1.1 in Python | It reads the query from \`\_query\` and refuses anything that does not start with \`select\` |
| \`Workflow Credentials Helper Agent\` | A Tools Agent, version 1.6 | Its system message holds your n8n address, for links |

### Good to know

It reads credential names, and Python must be allowed to import two modules.

- What it reads: credential types, ids and names, and no secret. A name is free text, so it can hold an email address or a client’s name
- A snapshot: the table holds what the workflows looked like on the last run of step one, so run it again after changes
- Python: both Python steps need \`json\` and \`sqlite3\` allowed, which a stock n8n turns off
- The file: the SQLite file is created in the folder the Python runner works from, so that folder must be writable
- Your data: the agent’s answers, which can include workflow and credential names, go to OpenAI
- Billing: each question costs at least one model call, and two when the agent queries the database
- Models: the original copy left the model out, so n8n would use \`gpt-5-mini\`, which OpenAI shuts down on 11 December 2026. Mindket’s copy names \`gpt-5.6-terra\`
- Repairs: the original copy’s Python steps were written for an older runner, and its link line used a browser object that n8n’s expressions do not have. Mindket’s copy fixes both and limits the tool to SELECT
- Where it runs: from n8n’s Chat window in the editor. Nothing in the file opens a public chat
- Credentials: the JSON holds none

## README

```markdown
# Chat agent that lists which workflows use which credentials

An n8n workflow in two steps. Step one asks your own n8n for all its workflows, keeps each workflow's id, its name and the
credentials its nodes point to, and saves them in a small SQLite database. Step two is a chat. An AI agent turns your
question into a SQL query and answers from what comes back.

## What it reads, plainly

It reads credential types, ids and names. Nothing else about a credential is read. The workflow takes the `credentials`
entry of each node from n8n's list of workflows, and that entry holds a type, an id and a name. It never calls n8n's
credential endpoints, so no secret, password or token is read or saved. A credential's name is free text, though, and can
carry an email address or a client's name.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 9 nodes beside 4 sticky notes. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

The copy was written for an older Python runner. Mindket made these changes so it runs on n8n's current one:

- Both Python steps read `_input` and used `item.json` and `.to_py()`. The current runner gives code only `_items` and, for a
  tool, `_query`. Mindket rewrote both steps to match, and set `Save to Database` to Python (Native).
- The tool ran any SQL the model wrote. It now answers only a query that starts with `select`, which is what its own
  description asks for.
- The agent's system message built the workflow link from `window.location`. n8n's expressions give a `window` with nothing
  in it, so the message could not be built. The message now holds `<YOUR_N8N_ADDRESS>`.
- The chat model named no model, so n8n would fill in `gpt-5-mini`, which OpenAI shuts down on 11 December 2026. Mindket's
  copy names `gpt-5.6-terra`, the replacement OpenAI gives for it.
- A sticky note said the database lives in memory and is wiped when n8n restarts. The Python step creates a file, so the
  note now says that.
- No credential is inside.

## Before you start

- An n8n instance with a Python task runner. Its Python code can import nothing by default, so `json` and `sqlite3` must be
  allowed through the runner's variable `N8N_RUNNERS_STDLIB_ALLOW`, for example `json,sqlite3`. For an external runner, n8n's
  docs, read on 12 November 2026, say to set it in the runner's config file as an env override.
- An n8n API key and the API address of your instance, which ends in `/api/v1`.
- An OpenAI API key.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Allow `json` and `sqlite3` in the Python runner, as above.
3. In n8n, create an API key. Add an n8n API credential with that key and your API address, and select it in `n8n`.
4. Add an OpenAI credential and select it in `OpenAI Chat Model`.
5. Open `Workflow Credentials Helper Agent` and replace `<YOUR_N8N_ADDRESS>` in its system message with the address of
   your n8n, such as `https://n8n.example.com`.
6. Press Test workflow on the manual trigger. `Save to Database` should report how many workflows it stored.
7. Open the chat and ask a question.

## How a run goes

Step one runs when you press Test workflow:

1. `When clicking "Test workflow"` starts the run.
2. `n8n` lists every workflow the API key can see.
3. `Map Workflows & Credentials` keeps three fields for each one: `workflow_id`, `workflow_name` and `credentials`, a list
   of the type, id and name of every credential its nodes use.
4. `Save to Database` makes the table `n8n_workflow_credentials` if it is missing, then inserts or replaces one row for each
   workflow.

Step two runs when you send a chat message:

1. `Chat Trigger` starts a run.
2. `Workflow Credentials Helper Agent` is a Tools Agent, version 1.6, with `OpenAI Chat Model` and `Window Buffer Memory`.
3. `Query Workflow Credentials Database` is its tool, `query_workflow_credentials_database`. It runs the SELECT the agent
   writes. Its description tells the agent the table and that the credentials column is a JSON string, so a LIKE search
   works best.
4. The agent answers, and gives a link to a workflow when you ask for one.

## Change the look

- Which workflows are read: the options of `n8n`.
- Which fields are kept: the three assignments in `Map Workflows & Credentials`.
- What the agent knows and how it answers: the system message and the tool's description.
- The model: `OpenAI Chat Model`.

## Good to know

- The database is a snapshot. Press Test workflow again after your workflows change.
- Python gives each run a fresh process, so the steps share one SQLite file that the runner creates in the folder it works
  from. That folder must be writable, and whether the file survives a restart depends on it.
- The agent's answers, which can include credential names and workflow names, go to OpenAI.
- The workflows you can list depend on your API key.
- Each question costs at least one model call, and two when the agent queries the database.
- It runs from n8n's Chat window in the editor. Nothing in the file opens a public chat.
- The JSON holds no credential.
```

## What is in it

3 files, 15 KB, downloaded as a zip.

```text
NOTICE.md  608 B
README.md  5 KB
workflow.json  9 KB
```

## Workflow check

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

- Steps: 6 steps, starting by hand or on a chat message
- AI: 1 step calls an AI model: Workflow Credentials Helper Agent
- Sign-ins: Signs in to: OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads 3 of its 6 step types. It does not read: N8n, Code and AI Agent

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/a265a3f6-20d8-40d4-8bc8-e2ab02d58fd2)
- [Its page on Mindket](https://mindket.com/p/a265a3f6-20d8-40d4-8bc8-e2ab02d58fd2)
