今日已更新 81 条资讯 | 累计 37330 条内容
关于我们

Expressions in n8n

Mohammad Jawad (Kasir) Barati 2026年08月05日 04:57 2 次阅读 来源:Dev.to

So here is a list of all the commonly used expressions in n8n with a short description and when you might wanna use them. BTW if you do NOT know what are expressions, they are small pieces of JavaScript-like code wrapped in {{ ... }} that dynamically reference and transform data in your workflows. Core Data Access Expressions Expression Description When to Use {{$json}} Accesses the JSON data of the current item When you need to reference the entire data payload of the current workflow item {{$json.fieldName}} Accesses a specific field from the current item To pull a specific value (e.g., {{$json.body.city}} for webhook data) {{$json['field name']}} Accesses a field with spaces or special characters When field names contain spaces, diacritics, or special characters (e.g., {{$json['Gross Price']}} ) {{$binary}} Accesses binary data of the current item When working with files, images, or other binary attachments Referencing Other Nodes Expression Description When to Use {{$("NodeName").first()}} Gets the first item from a specific node When you need only the first result from a previous node {{$("NodeName").last()}} Gets the last item from a specific node When you need only the last result from a previous node {{$("NodeName").all()}} Gets all items from a specific node When you need to work with the complete output of a previous node {{$("NodeName").item}} Gets the linked item from a specific node When using item linking to trace back the source of data {{$node["HTTP Request"].json.data}} Alternative syntax for referencing other nodes When you prefer bracket notation or when node names have special characters Date and Time Expressions Expression Description When to Use {{$now}} Current date and time To timestamp events or calculate time differences {{$today}} Today's date (start of day) For date-only operations (e.g., filtering by today's date) {{$now.toFormat("yyyy-MM-dd")}} Formats current date as a string When you need dates in specific formats (e.g., 2026-08-04 fo

本文内容来源于互联网,版权归原作者所有
查看原文