On this page
Integration is the essence of n8n. The tool itself does nothing useful until you connect it to the outside world: it reads from one service, transforms the data, then writes to another. Mastering how connections work — how keys are stored, how authentication happens and how data flows — is what separates someone who builds a fragile workflow that breaks at the first error from someone who builds production automation you can rely on. If you haven't started yet, first see the guide to automation with n8n from scratch to understand the general concepts, then come back here to dig into integrations.
What are the three ways n8n integrates with your tools?
Before any detail, understand the big picture: n8n doesn't connect a given tool in one magical way; it provides three integration mechanisms that cover almost any service on the internet. Your choice between them determines how easy the build is and what its limits are.
Method one: the dedicated built-in node (native/app node). Every popular service has a built-in node created by n8n or the community — Slack, Gmail, Google Sheets, Notion, HTTP and hundreds more. The node hides the API details behind clear menus and fields: you choose the operation (such as "Send Message"), fill in the fields and assign a credential, and the request goes out. This is the fastest and safest method because it is tested and handles authentication and token refresh for you.
Method two: the generic HTTP Request node. What if the service has no built-in node, or you want an endpoint the node doesn't support? You use the HTTP Request node — the "mother node" that sends any HTTP request to any API. With it, you can connect n8n to practically any service in the world that has a REST interface. It is more powerful and flexible, but it requires you to read the API documentation and set the headers and body manually.
Method three: a Webhook to receive data. The previous two methods have n8n initiate the request (outbound). A Webhook reverses the direction: n8n gives you a URL that you put into an external service, and that service sends its data to you the moment an event occurs (a new payment, a submitted form, an incoming message). This is the foundation of real-time integrations.
| Method | Direction | When to use it | Effort required |
|---|---|---|---|
| Dedicated built-in node | n8n initiates (outbound) | The service has a built-in node | Low |
| HTTP Request node | n8n initiates (outbound) | Any API without a node, or an advanced endpoint | Medium–high |
| Webhook | The outside initiates (inbound) | Receiving real-time events from a service | Low–medium |
The practical rule: always start by looking for a built-in node. If you can't find one, use HTTP Request. And if you want n8n to react instantly to an external event, use a Webhook as the trigger.
What are credentials, and why are they the heart of every integration?
A credential in n8n is a secure record that holds the authentication details for a specific service: an API key, a username and password, or a full OAuth2 connection. The core idea: you enter the authentication details once in the credential, then assign it to any number of nodes without retyping the key each time.
This separation between "authentication details" and "workflow logic" isn't just a convenience; it is a security necessity. If you put an API key in plain text inside a node field, it would leak when the workflow is exported or shared, or in backups. Credentials, by contrast, are stored encrypted in the n8n database with an encryption key (N8N_ENCRYPTION_KEY), and their value never appears in the interface again after saving.
How do you create a credential?
There are two ways to create a credential:
- From inside the node: when you add a Slack node, for example, the "Credential to connect with" field asks you to choose an existing credential or create a new one. You click "Create New," and a form opens with the fields that particular service needs.
- From the central Credentials menu: in the sidebar, you create the credential in advance and assign it to nodes later. This is useful when setting up a team or preparing several services at once.
After you enter the details, n8n provides a "Test" button for many credentials that verifies them by making a test request. Get into the habit of clicking it before building any logic — more than half of integration problems are caused by a wrong credential, and catching it early saves hours of debugging.
Basic rules for credentials
- One credential per account/environment: keep the test (sandbox) credential separate from the production one so you don't send test data to real customers.
- Name credentials clearly:
Slack — Sales alertsis far better thanSlack credential 1. - Share carefully: in the paid edition, credentials can be shared with team members without revealing their values; grant the least privilege possible.
What is the difference between authentication methods, and when should you choose each?
The authentication method is the "language" your service uses to prove you are authorized to access it. n8n nodes support several methods, and understanding the difference between them saves you hours of confusion.
| Authentication method | How it works | Security level | When to use it |
|---|---|---|---|
| API Key | A static key sent in a header or parameter | Medium | Most simple APIs (server-to-server) |
| OAuth2 | Authorization via login + a token that refreshes automatically | High | Accessing a user's account (Google, Slack) |
| Basic Auth | A username + password encoded in base64 | Low–medium | Legacy or internal APIs only |
| Header Auth | A custom value in a header with any name | Medium | APIs that require a non-standard header |
API key
The simplest and most common method. You create a key in the service's dashboard, then put it in the credential, and n8n sends it with every request — either in a header (such as Authorization: Bearer <key> or X-API-Key: <key>) or as a URL parameter (?api_key=<key>). It suits server-to-server connections where no human user logs in.
Its advantage is simplicity; its drawback is that the key is long-lived, so if it leaks it stays valid until you revoke it manually. So treat it like a password: don't put it in code, don't share it, and rotate it regularly.
OAuth2
More complex, but the most secure way to access a user's account on their behalf. Instead of giving n8n a permanent key, n8n opens a login window for the service (such as "Allow n8n to access Google Sheets"), you approve, and n8n receives a short-lived access token and a refresh token that renews the first automatically when it expires. Its big advantage: you never handle the user's password directly, and the authorization can be revoked at any moment from the service's settings without changing anything on your side.
Built-in nodes (Slack, Gmail, Google Sheets) handle the whole OAuth2 dance for you — you click a button, log in, and you are done. But if you use HTTP Request with OAuth2 manually, you will need to enter the Client ID, Client Secret, Authorization URL, Token URL and Scopes.
Basic Auth and Header Auth
Basic Auth sends a username and password encoded in base64 with every request. It is relatively weak (base64 isn't encryption), so use it only over HTTPS and with legacy or internal APIs. Header Auth is the most flexible: you put any value in a header with a name of your choosing — useful when a service requires a non-standard header that doesn't fit the previous patterns.
What are triggers, and when should you choose each?
Every workflow starts with a trigger node that determines when it runs. Choosing the right trigger affects immediacy, reliability and resource usage as much as anything else.
| Trigger | When it fires | Immediacy | Resource usage | Example |
|---|---|---|---|---|
| Webhook | When an external request arrives | Instant | Low (no waiting) | Receiving a new payment from a payment gateway |
| Polling (App Trigger) | Checks the service at intervals | Near real time (minutes) | Medium (repeated requests) | A new row in Google Sheets |
| Schedule | At a set time/interval | Scheduled | Low | A daily report at 8 a.m. |
| Manual | When you click the execute button | On demand | None | Testing and development |
Webhook vs. Polling: the fundamental difference
These are the two triggers most often confused, and the difference between them is decisive:
| Criterion | Webhook | Polling |
|---|---|---|
| Who initiates | The external service pushes to you | n8n pulls from the service periodically |
| Immediacy | Instant (the moment of the event) | Delayed by the polling interval |
| Load | No wasted requests | Repeated requests even when there is nothing new |
| Requirements | A public URL + service support for webhooks | Nothing special |
| Reliability during downtime | Events may be lost while it is down | Catches up on missed items when it comes back |
The rule: if the service supports webhooks and you need true real-time behavior, a Webhook is the best choice. If the service doesn't support them, or you need to guarantee no item is missed, Polling is simpler and more forgiving. Many built-in n8n nodes provide a built-in polling trigger (such as "Google Sheets Trigger") that keeps track of the last row checked for you.
The Schedule trigger and recurring tasks
The Schedule Trigger runs the workflow at predefined times without any external event: every hour, every day at a certain time, or according to a custom cron expression. It is the ideal choice for regular recurring tasks: a daily sales report at 8 a.m., syncing data every 6 hours, or a weekly log cleanup. The following diagram shows how a scheduled workflow fires and moves through its stages to the notification:
When setting up a Schedule Trigger, you either choose a simple interval (such as "every day at 08:00") or write a cron expression for precise control. Examples of common cron expressions:
0 8 * * * → Every day at 8:00 a.m.
0 */6 * * * → Every 6 hours
0 9 * * 1 → Every Monday at 9:00 (weekly report)
*/15 * * * * → Every 15 minutesAn important point when self-hosting: the Schedule trigger depends on the timezone set in n8n through the GENERIC_TIMEZONE environment variable. Set it to your region (such as Asia/Riyadh), otherwise tasks will fire on UTC time and your reports will be off by hours. And for critical scheduled tasks, make sure the server really runs 24/7 — if the server is down at the scheduled time, the execution is missed and isn't made up automatically.
Example Webhook payload
When you create a Webhook node, n8n gives you two URLs: one for testing (/webhook-test/...) and one for production (/webhook/...). The external service sends a JSON payload to it, which arrives in n8n like this:
{
"headers": {
"content-type": "application/json",
"x-signature": "sha256=..."
},
"params": {},
"query": { "source": "checkout" },
"body": {
"event": "order.created",
"order_id": "ORD-10293",
"amount": 349.00,
"customer": { "email": "buyer@example.com" }
}
}The actual data arrives under body, the headers under headers (useful for verifying a security signature), and the URL parameters under query. This structure is fixed, and you will rely on it in expressions later.
How do you build an HTTP Request node precisely?
The HTTP Request node is the key to connecting any service that has no node. Mastering it frees you from the limits of built-in nodes. Its structure mirrors the structure of any HTTP request:
| Part | Description | Example |
|---|---|---|
| Method | The type of operation | GET, POST, PUT, PATCH, DELETE |
| URL | The endpoint address | https://api.service.com/v1/contacts |
| Headers | Request headers | Content-Type, Authorization |
| Query Parameters | URL parameters | ?page=2&limit=50 |
| Body | The request body (for POST/PUT) | JSON or form-data |
| Authentication | The assigned credential | API Key / OAuth2 |
Headers
Most APIs require a Content-Type header that tells the service the body's format, plus an authentication header. An example of headers for a POST request that sends JSON:
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{$credentials.apiKey}}An important tip: don't write the key explicitly in the header. Choose the authentication type in the node's Authentication field and attach the credential, and n8n injects the key securely without it appearing in the workflow.
Body
For POST/PUT/PATCH requests, you choose the body format (JSON, Form-Urlencoded, or Form-Data for files). An example JSON body for creating a contact, passing values from a previous node through expressions:
{
"name": "{{ $json.full_name }}",
"email": "{{ $json.email }}",
"tags": ["lead", "{{ $json.source }}"],
"created_at": "{{ $now.toISO() }}"
}Pagination
Many APIs return results in pages (for example, 50 items at a time). The HTTP Request node in n8n supports built-in pagination: you enable "Pagination" and specify how the URL or parameter for the next page is calculated (via an incrementing page, or a cursor/next token returned in the response). n8n then collects all the pages automatically into a single output without you building a loop manually. This is essential when pulling large lists (customers, orders, messages).
How does data flow between nodes? Expressions and the Set node
An integration isn't complete with the connection alone, but with transforming the data to suit the next service. This is where expressions and the Set node come in.
{{ }} expressions
Every value in any field can be fixed or a dynamic expression that reads from previous nodes. An expression is written between double braces {{ }} and uses simplified JavaScript. The most important variables:
| Expression | What it returns |
|---|---|
{{ $json.field }} | The value of a field from the previous node's data |
{{ $json["field name"] }} | A field whose name contains spaces or symbols |
{{ $node["Webhook"].json.body.email }} | A value from a specific node, by name |
{{ $now.toISO() }} | The current time in ISO format |
{{ $json.amount * 1.15 }} | A calculation (such as adding tax) |
{{ $json.email.toLowerCase() }} | A text transformation |
Practical examples that combine and format:
// Combine the first and last name
{{ $json.first_name + " " + $json.last_name }}
// A default value if the field is empty
{{ $json.country || "Not specified" }}
// Format a readable date
{{ $now.format("yyyy-MM-dd HH:mm") }}The Set node (Edit Fields)
When you want to shape the data explicitly — creating new fields, renaming, or removing what you don't need before sending it to the next service — you use the Set node (also called "Edit Fields"). In it you specify the fields you want to keep and their values (fixed or expressions), and it outputs a clean, predictable structure. This makes the workflow easier to read and less error-prone, especially when the data comes from a messy source.
How do you control the workflow's flow?
An integration is rarely a straight line. You usually need decisions (if a condition is met), merging paths or loops. Flow-control nodes provide that:
| Node | What it does | Example use |
|---|---|---|
| IF | A two-way conditional branch (true/false) | If the amount > 1000 → alert the manager |
| Switch | Multiple branches based on a value | Routing by request type (purchase/refund/inquiry) |
| Merge | Merging data from two paths | Combining the results of two parallel nodes |
| Loop / SplitInBatches | Processing in batches | Sending 100 emails in batches of 10 |
| Filter | Passing only matching items | Keeping only active customers |
IF vs. Switch
Use IF when the decision is binary: one condition that results in a "true" or "false" path. Use Switch when you have more than two paths based on a single value (such as routing tickets by priority: urgent/normal/low). Switch is much cleaner than chaining several IF nodes in a row.
SplitInBatches and rate limits
When processing large lists, sending hundreds of requests at once will hit the service's rate limits — it responds with a 429 Too Many Requests error. The solution: the SplitInBatches node splits the items into small batches and processes them in cycles, and you can add a Wait node between batches to slow the pace. For example, to send 500 messages through an API that allows 60 requests/minute, process them in batches of 10 with a one-second wait between each batch.
Practical integration examples
Theory sinks in through practice. Here are common connection patterns for the most popular tools. For more complete scenarios, see practical workflow examples.
Connecting Slack: instant notifications
The built-in Slack node is one of the simplest integrations. After creating a credential (OAuth2 or a bot token):
- Add a Slack node after the workflow's logic.
- Choose the Send Message operation.
- Specify the channel (
#sales, for example) or a user. - Write the message with a dynamic expression:
New order worth {{ $json.amount }} SAR
From {{ $json.customer.email }} — order no. {{ $json.order_id }}This pattern (event → processing → Slack notification) is the backbone of dozens of automations.
Connecting Google Sheets: logging data
Google Sheets is the perfect poor man's database for logging and reports. Its node supports reading rows, appending a row, updating and deleting. To add a new row for every incoming payment:
- A Google credential via OAuth2.
- The Append Row operation.
- Choose the file and the worksheet.
- Map the columns to values with expressions (
Date ← {{$now}},Email ← {{$json.email}},Amount ← {{$json.amount}}).
And for automation that starts from Sheets itself (a new row triggers the process), use the Google Sheets Trigger (a polling type).
Connecting email (Gmail / SMTP)
To send email, you have two options: the built-in Gmail node (via OAuth2, suitable for Google accounts) or the generic Send Email node (via SMTP for any email provider). The second needs an SMTP credential:
Host: smtp.yourprovider.com
Port: 587
User: notifications@yourdomain.com
Password: ********
SSL/TLS: STARTTLSThen you specify the sender, recipient, subject and body (text or HTML), with expressions to personalize the content for each recipient.
Connecting a database (Postgres / MySQL)
To read from or write to a database directly, use the Postgres or MySQL node. Its credential requires a host, port, database name, user and password. Then you run a query — using parameters, not string concatenation, to avoid SQL injection:
-- Correct: a safe parameter
INSERT INTO leads (email, source, created_at)
VALUES ($1, $2, NOW());You pass the values through the node's Query Parameters field (such as {{$json.email}}, {{$json.source}}), and n8n handles the safe escaping. Don't build the query by concatenating {{$json.email}} directly into the SQL text.
Connecting a CRM or store via a generic API
If your CRM or store (such as WooCommerce or a custom store) doesn't have an adequate built-in node, you connect it with the HTTP Request node. Read the API documentation, create an API key/OAuth2 credential, then call the endpoints directly (create a customer, fetch orders, update a status). This flexibility is what lets n8n connect practically anything.
How do you handle errors safely?
In production, integrations fail: the API goes down, the network drops, the rate limit is exceeded. A workflow without error handling stops silently, and you find out late. n8n provides three complementary mechanisms:
| Mechanism | What it does | When to use it |
|---|---|---|
| Retry On Fail | Retries the node automatically on failure | Transient errors (network, 429, 503) |
| Continue On Fail | The workflow continues even though the node failed | When the error isn't critical and is handled later |
| Error Trigger | A separate workflow that fires on any failure | Central notification of all errors |
Retry On Fail
In any node's settings (the Settings tab), enable Retry On Fail and set the number of attempts (for example 3) and the interval between them (for example 5 seconds). It is ideal for transient errors: a momentary network drop, a 429 or a 503. Usually the second or third attempt succeeds without any intervention.
Continue On Fail
Sometimes a node's failure shouldn't stop everything. For example, when processing 100 customers, a failed update for one customer shouldn't cancel the other 99. Enable Continue On Fail, and the failed items are passed down an error path for you to handle later (log them or send an alert about them) while the rest carries on.
Error Trigger: the central safety net
The most robust practice: create a separate workflow that starts with an Error Trigger node. n8n links this workflow to any other workflow that fails (via the "Error Workflow" setting), so it catches all errors in one place and sends you a notification (Slack or email) with the failure details: the workflow name, the node and the error message. That way you know about a problem the moment it happens instead of discovering it days later.
Security best practices for credentials
Integration means handing n8n the access keys to your systems. Protecting them is a core responsibility, especially when self-hosting on a VPS with Docker.
| Practice | Reason |
|---|---|
| Don't put keys explicitly in nodes | They leak on export/sharing/backups |
| Always use credentials | They are stored encrypted with N8N_ENCRYPTION_KEY |
Store N8N_ENCRYPTION_KEY safely and back it up | Losing it = losing all credentials for good |
| Grant the least privilege | A key with limited permissions reduces the damage of a leak |
| Rotate keys regularly | Limits the risk of an old leaked key |
| Separate test and production environments | Prevents leaking/corrupting real data |
| Enable HTTPS on the n8n interface | Protects keys in transit |
| Verify webhook signatures | Blocks forged requests from unknown parties |
A critically important point: the N8N_ENCRYPTION_KEY environment variable is the key that encrypts all your credentials. When setting up n8n via Docker, set it explicitly and save a secure copy of it:
# In the .env file next to docker-compose
N8N_ENCRYPTION_KEY=put-a-long-secure-random-string-here
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=a-strong-password
WEBHOOK_URL=https://n8n.yourdomain.com/If you lose N8N_ENCRYPTION_KEY after storing credentials, n8n won't be able to decrypt them and you will have to re-enter them all. So back it up somewhere safe, separate from the server.
The security of your integrations starts with the security of the server itself: running n8n in an isolated, up-to-date environment with a stable public address and an SSL certificate is what protects your credentials and keeps webhooks working.
Troubleshooting common problems
Most integration problems recur in well-known patterns. This table links each symptom to its most likely cause and fix:
| Symptom | Likely cause | Fix |
|---|---|---|
401 Unauthorized | A wrong or expired key/token | Regenerate the key, update the credential and click Test |
403 Forbidden | Missing scopes | Add the required scopes and re-authorize |
429 Too Many Requests | Rate limit exceeded | Enable Retry, slow down with SplitInBatches and Wait |
| The Webhook doesn't arrive | Using the test URL, or no public URL | Use the production URL and check WEBHOOK_URL |
| The field arrives empty | A wrong expression path | Inspect the data structure in the output tab |
ECONNREFUSED for the database | Wrong host/port or a firewall | Check connectivity and the allowed IP |
| OAuth2 fails to connect | The redirect URI isn't registered | Register n8n's OAuth callback URL in the service |
| The node works manually but not automatically | The workflow isn't activated (inactive) | Activate the workflow with the toggle at the top right |
A general diagnostic tip: run the workflow manually and inspect each node's output (the JSON tab) step by step. You will usually see exactly where the data stops or gets mangled, and the cause becomes clear right away.
Expert tips for sturdier integrations
- Always test the credential first: before building any logic, click Test on the credential. It saves you hours.
- Start with a Manual Trigger node during development: run it manually again and again until the logic is stable, then switch to the real trigger.
- Use Set early to clean up the data: a clean structure at the start reduces errors in later nodes.
- Don't trust data arriving via a Webhook: verify the signature and the required fields before processing.
- Name nodes clearly:
Fetch ordersis better thanHTTP Request1when debugging months later. - Document the workflow with Sticky Note nodes: visible notes that explain the logic to you and your team.
- Watch rate limits from the start: read the API documentation to learn the limit, and design with SplitInBatches before you hit it.
Frequently asked questions
What is the difference between a built-in node and the HTTP Request node? A built-in node is prebuilt for a specific service; it hides the API details behind clear fields and handles authentication for you, so it is faster and safer. The HTTP Request node is generic and sends any request to any API, so you can use it to connect services that have no built-in node, or advanced endpoints, but it requires manual configuration. Start with the built-in node, and use HTTP Request when you need to.
Do I need programming knowledge to connect tools in n8n?
Not for the basic cases: most integrations are built with built-in nodes and menus, without code. But knowing the basics of JSON and {{ }} expressions opens up wider possibilities, and the Code node (JavaScript/Python) enables advanced logic, only when needed.
Where are API keys stored, and are they safe?
They are stored inside credentials, encrypted in the n8n database using N8N_ENCRYPTION_KEY, and their values don't appear in the interface after saving or in workflow exports. This is far safer than writing them in plain text inside nodes. Back up the encryption key in a separate place.
When should I use a Webhook, and when Polling? Use a Webhook if the service supports it and you need true real-time behavior: it is instant and wastes no requests. Use Polling if the service doesn't support webhooks or you need to guarantee no item is missed: it is simpler and catches whatever was missed during downtime. The difference: with a Webhook the service pushes data to you, while with Polling n8n pulls it periodically.
How do I connect a service that has no built-in node in n8n? With the HTTP Request node: read the API documentation, create the appropriate authentication credential (API key or OAuth2), then set the method, URL, headers and body. In practice, you can connect any service that has a REST interface this way.
How do I pass data from one node to another?
With {{ }} expressions. You read from the previous node with {{ $json.field }}, or from a specific node with {{ $node["Node Name"].json.field }}. To shape the data explicitly (create/rename/remove fields), use a Set node before sending it to the next service.
What do I do about a 429 error (rate limit exceeded)? It means you are sending requests faster than the service allows. Enable Retry On Fail on the node, slow processing down with a SplitInBatches node to split items into batches, and add a Wait node between batches. Read the API documentation to find the allowed limit and design around it.
What is the difference between OAuth2 and an API key, and which is better? An API key is a static, long-lived key that is simple to set up and suits server-to-server connections. OAuth2 is more secure for accessing a user's account: it uses short-lived tokens that are refreshed automatically, and its authorization can be revoked easily. If the node offers OAuth2 for a user service (Google, Slack), it is the better choice; otherwise an API key is enough for simple cases.
How do I handle integration errors in production? With three mechanisms together: Retry On Fail to retry on transient errors, Continue On Fail to carry on with the rest when a non-critical failure occurs, and an Error Trigger in a central workflow that catches any failure and sends you an instant notification with the details. That way, failures never pass silently.
Can n8n connect directly to a database? Yes, through nodes such as Postgres and MySQL. You create a credential with the host, port, database name and login details, then run read/write queries. Always use query parameters instead of concatenating values into the query string, to avoid SQL injection.
Why doesn't my Webhook arrive even though the setup is correct?
The common causes: using the test URL (/webhook-test/) instead of the production URL, the workflow not being activated (the production URL works only when the workflow is active), WEBHOOK_URL not being set to your public address when self-hosting, or a firewall blocking access. Check these four in order.
Conclusion
Connecting n8n to your tools rests on clear foundations: three integration methods (a built-in node, HTTP Request, a Webhook), all starting from a secure credential, authenticating with the appropriate method (API key, OAuth2 or Basic/Header), and firing with the most suitable trigger (Webhook for instant, Polling for periodic, Schedule for timed). Add passing data with expressions, flow control, error handling with three mechanisms, and security around credentials — and you will build reliable production integrations that don't break at the first surprise.
Start small: connect one service, test its credential, run it manually until it is stable, then expand. And if you need to run n8n continuously with a public address, a domain and SSL, choose a stable server that runs without interruption, because it is the foundation all your integrations rest on.
Sources
Frequently asked questions
What is the difference between a built-in node and the HTTP Request node?
A built-in node is prebuilt for a specific service; it hides the API details behind clear fields and handles authentication for you, so it is faster and safer. The HTTP Request node is generic and sends any request to any API, so you can use it to connect services that have no built-in node, or advanced endpoints, but it requires manual configuration. Start with the built-in node, and use HTTP Request when you need to.
Do I need programming knowledge to connect tools in n8n?
Not for the basic cases: most integrations are built with built-in nodes and menus, without code. But knowing the basics of JSON and {{ }} expressions opens up wider possibilities, and the Code node (JavaScript/Python) enables advanced logic, only when needed.
Where are API keys stored, and are they safe?
They are stored inside credentials, encrypted in the n8n database using N8N_ENCRYPTION_KEY, and their values don't appear in the interface after saving or in workflow exports. This is far safer than writing them in plain text inside nodes. Back up the encryption key in a separate place.
When should I use a Webhook, and when Polling?
Use a Webhook if the service supports it and you need true real-time behavior: it is instant and wastes no requests. Use Polling if the service doesn't support webhooks or you need to guarantee no item is missed: it is simpler and catches whatever was missed during downtime. The difference: with a Webhook the service pushes data to you, while with Polling n8n pulls it periodically.
How do I connect a service that has no built-in node in n8n?
With the HTTP Request node: read the API documentation, create the appropriate authentication credential (API key or OAuth2), then set the method, URL, headers and body. In practice, you can connect any service that has a REST interface this way.
How do I pass data from one node to another?
With {{ }} expressions. You read from the previous node with {{ $json.field }}, or from a specific node with {{ $node["Node Name"].json.field }}. To shape the data explicitly (create/rename/remove fields), use a Set node before sending it to the next service.
What do I do about a 429 error (rate limit exceeded)?
It means you are sending requests faster than the service allows. Enable Retry On Fail on the node, slow processing down with a SplitInBatches node to split items into batches, and add a Wait node between batches. Read the API documentation to find the allowed limit and design around it.
What is the difference between OAuth2 and an API key, and which is better?
An API key is a static, long-lived key that is simple to set up and suits server-to-server connections. OAuth2 is more secure for accessing a user's account: it uses short-lived tokens that are refreshed automatically, and its authorization can be revoked easily. If the node offers OAuth2 for a user service (Google, Slack), it is the better choice; otherwise an API key is enough for simple cases.
How do I handle integration errors in production?
With three mechanisms together: Retry On Fail to retry on transient errors, Continue On Fail to carry on with the rest when a non-critical failure occurs, and an Error Trigger in a central workflow that catches any failure and sends you an instant notification with the details. That way, failures never pass silently.
Can n8n connect directly to a database?
Yes, through nodes such as Postgres and MySQL. You create a credential with the host, port, database name and login details, then run read/write queries. Always use query parameters instead of concatenating values into the query string, to avoid SQL injection.
Why doesn't my Webhook arrive even though the setup is correct?
The common causes: using the test URL (/webhook-test/) instead of the production URL, the workflow not being activated (the production URL works only when the workflow is active), WEBHOOK_URL not being set to your public address when self-hosting, or a firewall blocking access. Check these four in order.