快速入门#
¥The very quick quickstart
此快速入门指南可帮助你尽快上手 n8n。它允许你试用 UI 并介绍两个关键功能:工作流模板 和 expressions。它不包含详细的解释或对概念的深入探讨。
¥This quickstart gets you started using n8n as quickly as possible. Its allows you to try out the UI and introduces two key features: workflow templates and expressions. It doesn't include detailed explanations or explore concepts in-depth.
在本教程中,你将:
¥In this tutorial, you will:
- 从工作流模板库加载 workflow。
¥Load a workflow from the workflow templates library
- 添加节点并使用表达式进行配置。
¥Add a node and configure it using expressions
- 运行你的第一个工作流
¥Run your first workflow
步骤 1:打开工作流模板并注册 n8n Cloud#
¥Step one: Open a workflow template and sign up for n8n Cloud
n8n 提供了一个使用训练节点的快速入门模板。你可以使用此方法处理虚拟数据,避免设置 credentials。
¥n8n provides a quickstart template using training nodes. You can use this to work with fake data and avoid setting up credentials.
本快速入门指南使用 n8n 云。新用户可享受免费试用。
¥This quickstart uses n8n Cloud. A free trial is available for new users.
- 前往 模板 | 快速入门。
¥Go to Templates | Very quick quickstart. 2. 选择“免费使用”以查看模板的使用选项。
¥Select Use for free to view the options for using the template. 3. 选择“免费开始使用 n8n 云”以注册新的云实例。
¥Select Get started free with n8n cloud to sign up for a new Cloud instance.
此工作流程:
¥This workflow:
- 从 客户数据存储 节点获取示例数据。
¥Gets example data from the Customer Datastore node. 2. 使用 编辑字段 节点仅提取所需数据,并将这些数据分配给变量。本示例中,你将映射客户名称、ID 和描述。
¥Uses the Edit Fields node to extract only the desired data and assigns that data to variables. In this example, you map the customer name, ID, and description.
n8n 工作流中的各个部分称为 nodes。双击节点以查看其设置以及数据处理方式。
¥The individual pieces in an n8n workflow are called nodes. Double click a node to explore its settings and how it processes data.
步骤 2:运行工作流#
¥Step two: Run the workflow
选择“执行工作流”。此操作会运行工作流,从客户数据存储节点加载数据,然后使用“编辑字段”功能对其进行转换。你需要在工作流中提供这些数据,以便在下一步中使用。
¥Select Execute Workflow. This runs the workflow, loading the data from the Customer Datastore node, then transforming it with Edit Fields. You need this data available in the workflow so that you can work with it in the next step.
步骤 3:添加节点#
¥Step three: Add a node
添加第三个节点,向每位客户发送消息并告知其描述。使用“客户消息”节点向虚拟收件人发送消息。
¥Add a third node to message each customer and tell them their description. Use the Customer Messenger node to send a message to fake recipients.
- 在“编辑字段”节点上选择“添加节点
”连接器。
¥Select the Add node {.off-glb} connector on the Edit Fields node. 2. 搜索客户消息n8n 会显示与搜索匹配的节点列表。
¥Search for Customer Messenger. n8n shows a list of nodes that match the search. 3. 选择“客户消息(n8n 培训)”以将节点添加到 canvas。n8n 自动打开节点。
¥Select Customer Messenger (n8n training) to add the node to the canvas. n8n opens the node automatically. 4. 使用 expressions 映射客户 ID 并创建消息:
¥Use expressions to map in the Customer ID and create the Message: 1. 在“输入”面板中,选择“架构”选项卡。
1 | |
-
将“编辑字段 1 > customer_id”拖到节点设置中的“客户 ID”字段。
¥Drag Edit Fields1 > customer_id into the Customer ID field in the node settings. 3. 鼠标悬停在消息上。选择“表达式”选项卡,然后选择展开按钮
以打开完整的表达式编辑器。¥Hover over Message. Select the Expression tab, then select the expand button {.off-glb} to open the full expressions editor. 4. 将此表达式复制到编辑器中:
¥Copy this expression into the editor:
5. 关闭表达式编辑器,然后单击节点外部或选择“返回画布”来关闭“客户消息”节点。1Hi {{ $json.customer_name }}. Your description is: {{ $json.customer_description }}
¥Close the expressions editor, then close the Customer Messenger node by clicking outside the node or selecting Back to canvas. 6. 选择“执行工作流”。n8n 运行工作流。
¥Select Execute Workflow. n8n runs the workflow.
完整的流程应如下所示:
¥The complete workflow should look like this:
Workflow preview placeholder.
下一步步骤#
¥Next steps
- 阅读 n8n 的 更详细的试用教程 文档,了解更复杂的工作流,以及更多功能和 n8n 概念的介绍。
¥Read n8n's longer try it out tutorial for a more complex workflow, and an introduction to more features and n8n concepts.
¥Take the text courses or video courses.