Home » n8n» Connect Snowflake to n8n (Docker & Node.js)

How to connect Snowflake to n8n? how to connect snowflake to n8n?

Connect Snowflake to n8n by installing the Snowflake driver, running n8n with Docker or Node.js, and adding Snowflake credentials in the Snowflake node. This short guide shows the commands and a sample query so you can start automating data tasks quickly. The phrase how to connect snowflake to n8n? appears here to match the tutorial keyword.

What You Need

  • Docker installed or Node.js (14+) with npm.
  • A Snowflake account with a user, password, warehouse, database, and schema.
  • Basic n8n knowledge and access to the n8n UI (http://localhost:5678).
  • Optional: a machine user or key pair for secure access.

How to connect Snowflake to n8n? (Quick Steps include commands)

Follow the numbered steps below. Both a local Node.js method and a Docker method are shown. Use the one you prefer.

Step 1: Node.js local install

Create a small project folder and install n8n and the Snowflake SDK. This ensures the Snowflake driver is available to n8n.

mkdir n8n-snowflake
cd n8n-snowflake
npm init -y
npm install n8n snowflake-sdk
npx n8n

Open the n8n editor at http://localhost:5678 and sign in. Then add Snowflake credentials in the credentials manager.

Step 2: Docker method with a custom image

Build a custom Docker image that adds the Snowflake driver to the official n8n image.

cat > Dockerfile <<'EOF'
FROM n8nio/n8n:latest
USER root
RUN npm install --unsafe-perm --no-audit --no-fund snowflake-sdk
USER node
EOF

docker build -t n8n-snowflake .
docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8n-snowflake

Use environment variables for n8n basic auth in production. Example flags are omitted here for brevity but are easy to add.

Step 3: Add Snowflake credentials in n8n

In the n8n UI, create new credentials for Snowflake. Fill these fields:

  • Account (example: xy12345.us-east-1)
  • Username
  • Password (or use Private Key)
  • Warehouse
  • Database
  • Schema
  • Role (optional)

Save the credentials and attach them to a Snowflake node in your workflow.

Step 4: Example Snowflake node query

Create a workflow with a Snowflake node set to Execute Query and paste this SQL to test the connection.

SELECT CURRENT_VERSION();

Run the node. If credentials and network are correct, you will get a result row with the version.

Update

To update Node.js installs, run:

npm update n8n snowflake-sdk
# then restart n8n (stop and run npx n8n again)

To update the Docker image, rebuild and redeploy:

docker build -t n8n-snowflake .
docker stop n8n && docker rm n8n
docker run -d --name n8n -p 5678:5678 n8n-snowflake

Security

  • Use a Snowflake user with least privilege for automation tasks.
  • Prefer key-pair authentication over plain passwords where possible.
  • Enable n8n basic auth and HTTPS for the editor and API.
  • Do not hard-code credentials in workflows. Use n8n credentials or environment variables.
  • Allowlist n8n server IPs in Snowflake network policies to reduce exposure.

Done

You now have a working connection pattern to run Snowflake queries from n8n. Use the sample query to verify the connection. Build workflows to extract, transform, and load data as needed.


If you need a sample workflow JSON or help with private key setup, ask for the next steps and I will provide a ready-to-import workflow and key pair guidance.

Neil
Written by Neil

Neil is a true n8n geek who lives and breathes workflow automation. He dives deep into nodes, triggers, webhooks, custom logic, and self-hosting setups, sharing everything he learns about n8n on AutomationCompare.com. As part of a broader team of automation specialists, Neil focuses purely on mastering n8n and helping others unlock its full potential.

Keep Reading

Scroll to Top