n8n

How to Audit n8n Credential Usage?

Quickly see which n8n workflows use which app credentials. Ask questions in plain English and get instant answers, like which projects use Slack and Google Sheets. Built for IT and operations teams that need fast visibility and safer change control.

The build has two parts. First, a manual run calls the n8n API to list all workflows, maps each workflow’s name and credential list, and writes that data into a small SQLite table. Second, a chat entry point lets you type a question. An AI model turns your words into a SQL query, runs it against the local database, and replies with the result. A short memory keeps the conversation context so you can refine your search.

You will need an n8n API key and an OpenAI API key. Run the data load step to rebuild the database, then use the chat interface to search. Expect faster audits, quicker impact checks during credential rotation, and fewer missed dependencies. If your n8n instance restarts, rebuild the database by running the first step again. Teams with many automations will save hours each month by avoiding manual checks.

What are the key features?

  • Manual trigger loads all workflows from the n8n API using a connected n8n credential.
  • Set node maps workflow ID, name, and detected credentials into clean fields.
  • Code node creates and updates a SQLite table to store workflow and credential data.
  • Chat Trigger opens a chat endpoint to receive natural language questions.
  • OpenAI Chat Model converts a user question into a SQL SELECT query.
  • Tool code node runs SQL against the local SQLite database and returns results.
  • Window buffer memory keeps recent conversation context for follow up questions.
  • Agent orchestrates the model, memory, and SQL tool to answer accurately.

What are the benefits?

  • Reduce manual credential searches from hours to minutes
  • Streamline credential audits by up to 80 percent
  • Improve accuracy of workflow inventory by centralizing data
  • Handle hundreds of workflows with one searchable table
  • Speed up credential rotation by showing impacted workflows instantly

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI and n8n. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a new n8n API credential. Provide your n8n base URL and API key from your n8n user settings. Name the credential clearly, then save.
  4. Open the n8n node in the workflow and pick your new n8n credential from the dropdown. Keep the operation that lists workflows. Save the node.
  5. In your OpenAI account, create an API key. In the n8n credentials manager, create an OpenAI credential and paste the key. Save it, then select it in the OpenAI Chat Model node.
  6. Click Test on the manual trigger to run the data load. Confirm that downstream nodes run without errors and that the Save to Database node completes.
  7. Open the Chat Trigger test URL. Ask a quick question such as “How many workflows are indexed?” to verify the database is readable.
  8. Query examples: “Which workflows use Slack and Google Sheets?” or “List workflows with AI in the name that do not use OpenAI.” Use LIKE in your phrasing for partial matches.
  9. If you restart your n8n instance, rerun the manual load step to rebuild the SQLite database so the chat can query fresh data.
  10. Troubleshoot: If results are empty, check your n8n API key and base URL. If the chat fails, verify the OpenAI credential. If SQL errors appear, remember the table is n8n_workflow_credentials and use LIKE for matching.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

n8n API

Sign up

Community Edition (self-hosted): $0 (public REST API available). Cloud Starter: $20 / mo billed annually ($24 monthly); API unavailable during free trial.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.