HOW-TO
How-to
Practical answers to specific automation and coding problems, with code and a record of what was checked.
How to generate a unique Order ID in n8n for Google Sheets
Create the Order ID in an n8n Code node, append it as a new Google Sheets row, update by matching that ID, and pass it to a sub-workflow.
n8ngoogle-sheetscode-node
Checked: Ran on Node 22 in Docker with a mock self-check
How to alert on failed n8n workflow executions
Create an n8n workflow with an Error Trigger, set it as the Error Workflow of your other workflows, and post the failure details to an alert webhook.
n8nworkflowerror
Checked: structure checked
How to batch compile MQL5 files and read MetaEditor UTF-16 logs
Call MetaEditor /compile once per file with its own /log, decode the log as UTF-16, and pass only when the Result line reports 0 errors.
mql5metatradercompile
Checked: syntax checked
How to catch an n8n run that finishes green but saved nothing
Add a Code node that reads the saved rows back, compares their IDs with the planned ones, and throws when any are missing or duplicated.
n8ncode-nodeerror-handlingdata-validation
Checked: Ran on Node 22 in Docker with a mock self-check
How to decode adjacent RFC 2047 encoded words in Node.js
Drop whitespace between adjacent RFC 2047 encoded words and join same-charset bytes before decoding, so email subjects are not split mid-word.
nodeemailrfc2047
Checked: Ran on Node 22 in Docker with a mock self-check
How to send the SNI server name for IMAP over TLS in Node.js
Pass servername to tls.connect so Node.js sends SNI and the IMAP server returns the certificate for your host, not a placeholder one.
nodeimaptls
Checked: Ran on Node 22 in Docker with a mock self-check