10 n8n Hacks That Will Make Your Workflows Super Efficient 🚀
Hey there, code‑crunchers!
Ever felt like you’re spending more time wiring up n8n nodes than actually building the cool stuff you signed up for? 🙋♀️🙋♂️
Me too. I remember the first time I tried to sync a Google Sheet with a Slack channel – I ended up with a 10‑step flow that looked like a spaghetti monster. After a few late‑night debugging sessions (and a lot of coffee), I discovered a handful of tricks that turned that monster into a sleek, one‑liner.
In this post I’m sharing 10 n8n hacks that will shave minutes (or even hours) off your automations. Grab your favorite drink, and let’s make those workflows sing! 🎶
1. Use the “Expression” Shortcut ({{ }}
) Everywhere
n8n’s expression syntax is powerful, but typing {{ $json["field"] }}
over and over can be tedious.
Hack: Turn on “Expression Preview” (gear icon → Enable Expression Preview) and then just write {{ $json.field }}
. n8n will auto‑complete the path for you.
// Instead of this:
{{ $json["user"]["profile"]["email"] }}
// Write this:
{{ $json.user.profile.email }}
Pro tip: Press
Ctrl + Space
inside the braces to see a dropdown of available variables.
2. Leverage the “Set” Node for Quick Data Shaping
You don’t always need a custom JavaScript node to rename or drop fields. The Set node can:
- Rename fields (
oldName → newName
) - Add static values
- Remove unwanted keys (just leave them out)
{
"name": "Alice",
"email": "alice@example.com",
"age": 28
}
Using a Set node, keep only
name
andcontact
:
Field | Value |
---|---|
name | {{$json.name}} |
contact | {{$json.email}} |
3. Batch Process with “SplitInBatches”
When dealing with large arrays (e.g., 10 000 rows from Airtable), hitting the execution timeout is a real pain.
Hack: Insert a SplitInBatches node before the heavy API call. Set the batch size to something reasonable (e.g., 100
). n8n will automatically loop until the whole array is processed.
# SplitInBatches settings
batchSize: 100
Now you can safely call rate‑limited APIs without blowing up the workflow.
4. Cache Expensive Calls with “Cache” in HTTP Request
If you hit the same endpoint dozens of times (think “get user profile” inside a loop), enable the Cache option on the HTTP Request node.
Cache Settings | What it does |
---|---|
Cache | Stores the response for the configured TTL |
TTL (seconds) | How long the cache lives (e.g., 3600 = 1 hour) |
Result? One network call → many data points. 🎉
5. Use “FunctionItem” Instead of “Function” for Per‑Item Logic
When you need to transform each item in a list, the FunctionItem node runs your JS once per item. This avoids manual loops and keeps the data shape intact.
// FunctionItem example: add a slug field
return {
...item,
slug: item.title.toLowerCase().replace(/\s+/g, '-')
};
No need to for (const item of items) { … }
– n8n does it for you!
6. Dynamic Credentials with “Credential Overwrites”
Storing a single API key in a credential is fine… until you need to act on behalf of multiple users.
Hack: In the node that calls the external API, open “Credential Overwrites” and set the key using an expression:
{{ $json.apiKey }}
Now each item can bring its own token, perfect for SaaS‑style multi‑tenant automations.
7. Debug Fast with “Execute Workflow” → “Run Once”
Instead of deploying the whole thing and waiting for a trigger, click Run Once on any node. You can feed in mock data (the little “play” button on the node) and instantly see the output.
Storytime: I once spent 30 minutes chasing a
null
error, only to discover the problem was a missing field in my test payload. A quick “Run Once” saved the day.
8. Re‑use Logic with “Sub‑Workflows” (Workflow Call)
If you find yourself copying the same 5‑node pattern across multiple flows (e.g., “validate payload → enrich → store”), extract it into a sub‑workflow and call it via Workflow Call node.
Benefits:
- Centralized updates
- Cleaner top‑level flows
- Version control (each sub‑workflow can have its own Git repo)
# Workflow Call node config
Workflow ID: {{ $json.workflowId }}
9. Auto‑Retry on Rate Limits with “Retry” Settings
Most APIs return 429
when you hit the limit. n8n’s Retry options let you automatically back‑off.
Retry Setting | Typical Use |
---|---|
Retry On |
429 (or any status) |
Maximum Attempts | 5 |
Delay (ms) |
2000 (2 seconds) |
No more manual if (status === 429) { wait… }
code!
10. Visualize Data Flow with “Merge” Modes
When you need to combine data from two sources, the Merge node’s “Append” or “Keep Only Matching” modes are lifesavers.
-
Append – stacks arrays (think
concat
) - Keep Only Matching – like an inner join on a key
// Example: merge on userId
{
"mode": "keepOnlyMatching",
"options": {
"key": "userId"
}
}
Now you can join a CRM record with a Stripe invoice without writing a custom join function.
Quick‑Reference Cheat Sheet 📋
Hack | Where to Use It | One‑Liner |
---|---|---|
Expression shortcut | Any node | {{ $json.field }} |
Set node for shaping | Data cleanup | Rename / drop fields |
SplitInBatches | Large arrays | batchSize: 100 |
HTTP Cache | Repeated GETs | Enable → TTL |
FunctionItem | Per‑item transform | return { …item, slug } |
Credential Overwrites | Multi‑tenant APIs | {{ $json.apiKey }} |
Run Once | Debugging | Click “Run Once” |
Sub‑workflow | Reuse logic | Workflow Call |
Retry on 429 | Rate‑limited APIs | Set retry options |
Merge modes | Data joining | keepOnlyMatching |
Conclusion: Make n8n Work For You, Not the Other Way Around
You’ve just got a toolbox of 10 hacks that turn n8n from a “nice‑to‑have” automation platform into a productivity powerhouse.
- Write less code – use Set, FunctionItem, and Merge.
- Avoid timeouts – SplitInBatches and Cache.
- Stay DRY – Sub‑workflows and Credential Overwrites.
Give these tricks a spin in your next project (maybe that Slack‑to‑Google‑Sheets sync you’ve been postponing). You’ll notice the difference right away: fewer clicks, faster runs, and more time for the things you actually love—like building the next cool side‑hustle.
What’s your favorite n8n shortcut? Drop a comment below, share your own hacks, or ask questions. Let’s level up together! 🙌
References
- n8n Docs – Expressions
- n8n Docs – SplitInBatches Node
- n8n Forum – Tips & Tricks thread (link omitted for brevity)
Happy automating! 🎉
Top comments (0)