Query your n8n workflows using an AI SQL agent. Discover which n8n node dependencies (credentials) are used across all your n8n templates quickly and efficiently for better auditing.
Download this n8n workflow template and start using it instantly.
n8n administrators managing large instances with many n8n templates.
Developers needing to audit credential usage across various n8n workflow definitions.
Users looking for advanced examples of combining AI agents with internal n8n API data fetching.
Anyone interested in creating a conversational interface for operational insights within their n8n environment.
As your n8n instance scales, managing credential dependencies across numerous n8n workflows can become complex. This automation solves that problem by transforming your n8n instance metadata into a queryable knowledge base accessible via a conversational AI SQL agent. The process first uses an internal n8n node to fetch metadata for all available n8n templates, extracts credential linkages, and stores them in a temporary SQLite database. Subsequently, an AI Agent is given a specialized tool to execute SQL queries against this database, allowing users to ask natural language questions like, "Which n8n workflow uses both Slack and Google Sheets credentials?" This solution significantly improves operational visibility and audit capabilities within your n8n environment, making credential management easier than ever.
The n8n workflow operates in two distinct phases: Initialization and Querying.
Map Workflows & Credentials n8n node transforms the retrieved API data. It specifically iterates through every n8n node definition in the workflow to identify and flatten associated credential names and types, structuring them for efficient storage and later querying.n8nworkflowcredentials.db) and inserts records containing the workflowid, workflowname, and a JSON string of the credentials used by that n8n workflow. Chat Trigger webhook, serving as the user interface.Workflow Credentials Helper Agent uses the OpenAI Chat Model and Window Buffer Memory to process user input. When a user asks about which n8n templates use certain services, the agent utilizes its tool.Query Workflow Credentials Database tool, which executes a SQL SELECT query against the local database to find matching n8n workflow credential dependencies. When clicking "Test workflow" (Manual Trigger): The initial n8n trigger used to manually start the data indexing process for all n8n workflow templates.
n8n (n8n node): Fetches comprehensive JSON definitions for all configured n8n workflows from the internal n8n API, authenticated via an API key.
Map Workflows & Credentials (Set node): A vital data transformation n8n node. It flattens and maps the complex nested credential structure found within each n8n node into a simple array, making it indexable.
Save to Database (Code node - Python): This custom code n8n node creates and populates the n8nworkflowcredentials.db SQLite database, establishing the index for all n8n templates.
Chat Trigger (Langchain Node): Serves as the interactive HTTP endpoint, acting as the primary n8n trigger for conversational queries.
Workflow Credentials Helper Agent (Langchain Agent node): The core intelligence, responsible for receiving user requests, deciding when to use the SQL tool, and formulating human-readable responses based on the database output.
SELECT queries against the indexed credential database, allowing the agent to determine which n8n node credentials are in use.Automate Shopify order monitoring using a Telegram bot. Use this robust n8n workflow to check open orders and details instantly via simple chat commands.

Use this powerful n8n workflow to build an AI agent powered by OpenAI, capable of querying and analyzing data directly from Microsoft Excel spreadsheets conversationally. Leverage n8n templates for complex RAG tasks.

Use this advanced n8n workflow to turn your Trello board into a natural language chatbot. Query tasks, summarize lists, and get instant status updates using OpenAI.

Automate complex data collection by integrating Bright Data MCP tools with an OpenAI-powered n8n agent. Use this powerful n8n workflow for dynamic, data-driven queries.

Use this n8n workflow to instantly look up HubSpot contact details (by email or ID) directly from a Slack slash command, boosting sales and support efficiency. Deploy this n8n template today.

Use this n8n workflow to automatically send personalized welcome emails to new QuickBooks customers. This robust n8n template tracks processed customer IDs in Google Sheets to prevent duplicate emails and ensure reliable automation.


Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at [email protected] LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk







































