Database Structure

n8n Database Structure Overview

Ever wondered what makes your favorite workflow automation tool tick? Let’s dive into the n8n database structure, where all the magic happens. Whether you’re a tech geek or just curious about how n8n manages to keep your workflows humming along, this overview will give you the inside scoop. By default, n8n uses SQLite as its database, but don’t worry if you’re using something else—the structure remains similar, with only the data types changing based on your chosen database. So, buckle up, and let’s explore the backbone of n8n’s power!

Understanding the Core Tables

At the heart of n8n’s database structure are tables that manage key aspects of your workflow automation. Let’s break them down:

  • AUTH_IDENTITY: This table stores details of external authentication providers when you’re using OAuth2. It’s like the bouncer at the club, making sure only authorized folks get in.
  • AUTH_PROVIDER_SYNC_HISTORY: Ever used SAML for authentication? This table keeps a history of those connections, so you know who’s been coming and going.
  • CREDENTIALS_ENTITY: Here’s where n8n stashes the credentials used to authenticate with various integrations. Think of it as your digital key ring.
  • EVENT_DESTINATIONS: This table holds configurations for event tracking. It’s where n8n decides where to send all those juicy event details.
  • EXECUTION_DATA: When you run a workflow, this table captures the workflow at that moment, along with the execution data. It’s like a snapshot of your workflow in action.
  • EXECUTION_ENTITY: This one’s a biggie—it stores all saved workflow executions. Whether you’re troubleshooting or just curious, this table has the answers.
  • EXECUTION_METADATA: Want to know more about those executions? This table provides the metadata to give you deeper insights.

So, how do these tables work together to keep your workflows running smoothly? Well, it’s all about efficiency and organization. Each table has a specific job, and together, they create a seamless experience.

Managing Projects and Users

Now, let’s talk about how n8n handles projects and users:

  • PROJECT: This table lists all the projects in your n8n instance. It’s your project management hub.
  • PROJECT_RELATION: Here, you’ll find the relationships between users and projects, including each user’s role. It’s crucial for managing access and permissions.
  • ROLE: Not currently used, but it’s there for future work on custom roles. Think of it as a placeholder for bigger things to come.
  • USER: This table contains all user data. It’s where n8n keeps track of who’s using the system.

Wondering how this impacts your workflow automation? Well, by organizing projects and users effectively, n8n ensures that everyone has the right access to the right tools, making collaboration a breeze.

Customizing Your n8n Experience

n8n isn’t just about running workflows—it’s also about tailoring your experience:

  • SETTINGS: This table records custom instance settings that you can’t control using environment variables. It includes whether the instance owner is set up, if the user chose to skip owner and user management setup, and the license key.
  • SHARED_CREDENTIALS: Here, n8n maps credentials to users, ensuring that everyone has access to the tools they need.
  • SHARED_WORKFLOW: Similar to shared credentials, this table maps workflows to users, making collaboration seamless.
  • TAG_ENTITY: This table lists all workflow tags created in your n8n instance, helping you keep your workflows organized and easy to find.
  • VARIABLES: Store variables here to use across your workflows. It’s like having a handy toolbox of reusable components.

By customizing your n8n experience, you can make the tool work for you, not the other way around. It’s all about efficiency and personalization.

Inspecting the n8n Database

Want to peek under the hood? You can inspect the n8n database using tools like DBeaver, an open-source universal database tool. Here’s how:

  1. Download and install DBeaver.
  2. Connect to your n8n database.
  3. Explore the tables and data to your heart’s content.

It’s like being a detective, uncovering the secrets of your workflow automation. And don’t worry if you’re using a different database—the structure will be similar, just with different data types.

Advanced Features and Future-Proofing

n8n isn’t just about the basics—it’s also about preparing for the future:

  • INSTALLED_NODES: This table lists the nodes installed in your n8n instance. It’s like a catalog of all the tools at your disposal.
  • INSTALLED_PACKAGES: Here, you’ll find details of npm community nodes packages installed in your n8n instance. It’s your go-to for keeping track of what’s installed.
  • MIGRATIONS: This table logs all database migrations, ensuring that your n8n instance stays up-to-date. For more on migrations, check out TypeORM’s documentation.
  • WEBHOOK_ENTITY: This table records all active webhooks in your n8n instance’s workflows. It’s not just for the Webhook node—it includes all active webhooks used by any trigger node.
  • WORKFLOW_ENTITY: Here, you’ll find all your n8n instance’s saved workflows. It’s your workflow library.
  • WORKFLOW_HISTORY: This table stores previous versions of workflows, so you can track changes and revert if needed.
  • WORKFLOW_STATISTICS: Want to know how your workflows are performing? This table counts workflow IDs and their status.
  • WORKFLOWS_TAGS: This table maps tags to workflows, making it easy to categorize and find your workflows.

By keeping track of these advanced features, n8n ensures that you’re always ready for what’s next. It’s about staying ahead of the curve and maximizing your workflow automation potential.

So, there you have it—an in-depth look at the n8n database structure. From authentication to workflow management, n8n’s got you covered. And hey, if you’re looking to dive even deeper, why not explore our other resources? Ready to boost your workflow automation game? Check out our other articles and guides for more tips and tricks!

Share it :

Other glossary

UptimeRobot Node

Master UptimeRobot node in n8n: automate workflows, manage alerts, and integrate with other apps. Learn operations and setup.

SEO Silo

Learn how SEO silo architecture groups related pages to boost SEO through contextual links and link equity flow.

Microsoft To Do Node

Learn to integrate Microsoft To Do node in n8n workflows. Automate task creation, updates, and more with ease.

UV Printing

Discover UV Printing in POD: a durable, sharp finish for flat items like phone cases and signs using UV light for instant ink curing. Learn more!

Unnatural Links

Learn to detect and avoid unnatural links to prevent SEO penalties. Understand risks and maintain a healthy backlink profile.

N8n Cloud

Explore n8n Cloud for easy setup, uptime monitoring, and managed OAuth. Not available in Russia and Belarus.

Bạn cần đồng hành và cùng bạn phát triển Kinh doanh

Liên hệ ngay tới Luân và chúng tôi sẽ hỗ trợ Quý khách kết nối tới các chuyên gia am hiểu lĩnh vực của bạn nhất nhé! 🔥