Skip to content

等待#

¥Wait

使用 Wait 节点,暂停工作流的执行。工作流暂停时,会将执行数据卸载到数据库。当满足恢复条件时,工作流会重新加载数据并继续执行。

¥Use the Wait node pause your workflow's execution. When the workflow pauses it offloads the execution data to the database. When the resume condition is met, the workflow reloads the data and the execution continues.

操作#

¥Operations

等待节点可在以下情况下恢复执行:

¥The Wait node can Resume on the following conditions:

¥After Time Interval: The node waits for a certain amount of time.

¥At Specified Time: The node waits until a specific time.

¥On Webhook Call: The node waits until it receives an HTTP call.

  • 表单提交:此节点会等待直到收到表单提交。

¥On Form Submitted: The node waits until it receives a form submission.

请参阅节点文档,了解使用详情。

¥Refer to the more detailed sections below for more detailed instructions.

时间间隔后#

¥After Time Interval

等待一段时间。

¥Wait for a certain amount of time.

此参数包含两个附加字段:

¥This parameter includes two more fields:

  • 等待时长:输入等待时间。

¥Wait Amount: Enter the amount of time to wait.

  • 等待单位:选择等待时间的计量单位。选择以下选项:

¥Wait Unit: Select the unit of measure for the Wait Amount. Choose from:

  • ¥Seconds

  • 分钟

    ¥Minutes

  • 小时

    ¥Hours

  • 天数

    ¥Days

请参阅 基于时间操作 获取有关这些时间间隔的工作原理和所用时区的更多详细信息。

¥Refer to Time-based operations for more detail on how these intervals work and the timezone used.

指定时间#

¥At Specified Time

等待到指定日期和时间再继续。使用日期和时间选择器设置日期和时间。

¥Wait until a specific date and time to continue. Use the date and time picker to set the Date and Time.

请参阅 基于时间操作 获取有关所用时区的更多详细信息。

¥Refer to Time-based operations for more detail on the timezone used.

Webhook 调用#

¥On Webhook Call

此参数允许在等待节点收到 HTTP 调用时恢复工作流。

¥This parameter enables your workflows to resume when the Wait node receives an HTTP call.

运行时生成用于恢复执行的 webhook URL。等待节点提供 $execution.resumeUrl 变量,以便你可以在需要的地方引用和发送尚未生成的 URL,例如发送到第三方服务或通过电子邮件发送。

¥The webhook URL that resumes the execution when called is generated at runtime. The Wait node provides the $execution.resumeUrl variable so that you can reference and send the yet-to-be-generated URL wherever needed, for example to a third-party service or in an email.

工作流执行时,“等待”节点会使用 $execution.resumeUrl 生成恢复 URL 和工作流中的 Webhook。生成的 URL 对于每次执行都是唯一的,因此你的工作流可以包含多个等待节点,并且当调用 webhook URL 时,它将按顺序恢复每个等待节点。

¥When the workflow executes, the Wait node generates the resume URL and the webhook(s) in your workflow using the $execution.resumeUrl. This generated URL is unique to each execution, so your workflow can contain multiple Wait nodes and as the webhook URL is called it will resume each Wait node sequentially.

对于此简历样式,请设置以下列出的更多参数。

¥For this Resume style, set more parameters listed below.

验证#

¥Authentication

选择是否以及如何对发送到 $execution.resumeUrl 的 resume-webhook 请求进行身份验证。选项包括:

¥Select if and how incoming resume-webhook-requests to $execution.resumeUrl should be authenticated. Options include:

  • 基本身份验证:使用基本身份验证。选择或输入一个新的基本身份验证凭据。

¥Basic Auth: Use basic authentication. Select or enter a new Credential for Basic Auth to use.

  • 标头身份验证:使用标头身份验证。选择或输入一个新的标头身份验证凭据。

¥Header Auth: Use header authentication. Select or enter a new Credential for Header Auth to use.

  • JWT 身份验证:使用 JWT 身份验证。选择或输入一个新的 JWT 身份验证凭据。

¥JWT Auth: Use JWT authentication. Select or enter a new Credential for JWT Auth to use.

  • 无:请勿使用身份验证。

¥None: Don't use authentication.

Auth reference

有关每种身份验证类型的更多信息,请参阅 Webhook 节点 | 身份验证文档

¥Refer to the Webhook node | Authentication documentation for more information on each auth type.

HTTP 方法#

¥HTTP Method

选择 Webhook 应使用的 HTTP 方法。更多信息,请参阅 Webhook 节点 | HTTP 方法文档

¥Select the HTTP method the webhook should use. Refer to the Webhook node | HTTP Method documentation for more information.

响应代码#

¥Response Code

输入 Webhook 应返回的响应代码。你可以使用常用代码或输入自定义代码。

¥Enter the Response Code the webhook should return. You can use common codes or enter a custom code.

响应#

¥Respond

从以下选项设置何时以及如何响应 Webhook:

¥Set when and how to respond to the webhook from these options:

  • 立即:节点执行完毕后立即响应。

¥Immediately: Respond as soon as the node executes.

  • 最后一个节点完成时:返回工作流中最后一个执行节点的响应代码和数据输出。如果你选择此选项,请同时设置:

¥When Last Node Finishes: Return the response code and the data output from the last node executed in the workflow. If you select this option, also set:

  • 响应数据:选择要返回的数据及其格式。选项包括:

    ¥Response Data: Select what data should be returned and what format to use. Options include:

    • 所有条目:返回数组中最后一个节点的所有条目。

    ¥All Entries: Returns all the entries of the last node in an array.

    • 第一条 JSON 数据:返回 JSON 对象中最后一个节点的第一个条目的 JSON 数据。

    ¥First Entry JSON: Return the JSON data of the first entry of the last node in a JSON object.

    • 第一条二进制数据:返回二进制文件中最后一个节点的第一个条目的二进制数据。

    ¥First Entry Binary: Return the binary data of the first entry of the last node in a binary file.

    • 无响应体:返回空位。

    ¥No Response Body: Return with no body.

  • 使用 '响应 Webhook' 节点:按照 响应 Webhook 节点中的定义进行响应。

¥Using 'Respond to Webhook' Node: Respond as defined in the Respond to Webhook node.

限制等待时间#

¥Limit Wait Time

设置工作流是否在达到特定限制类型后自动恢复执行(已开启)或不自动恢复执行(已关闭)。如果启用此选项,还需设置:

¥Set whether the workflow will automatically resume execution after a specific limit type (turned on) or not (turned off). If turned on, also set:

  • 限制类型:从以下选项中选择要强制执行的限制类型:

¥Limit Type: Select what type of limit to enforce from these options:

  • 时间间隔:等待一段时间。

    ¥After Time Interval: Wait for a certain amount of time.

    • 输入限制时间。

    ¥Enter the limit's Amount of time.

    • 选择限制的时间单位。

    ¥Select the limit's Unit of time.

  • 在指定时间:等待到指定日期和时间再恢复。

    ¥At Specified Time: Wait until a specific date and time to resume.

    • 最大日期和时间:使用日期和时间选择器设置节点恢复运行的指定时间。

    ¥Max Date and Time: Use the date and time picker to set the specified time the node should resume.

Webhook 调用选项#

¥On Webhook Call options

  • 二进制属性:输入要写入接收到的文件数据的二进制属性名称。此选项仅在接收二进制数据时相关。

¥Binary Property: Enter the name of the binary property to write the data of the received file to. This option's only relevant if binary data is received.

  • 忽略机器人:设置是否忽略来自链接预览器和网络爬虫等机器人的请求(已启用)或不忽略(已禁用)。

¥Ignore Bots: Set whether to ignore requests from bots like link previewers and web crawlers (turned on) or not (turned off).

  • IP 地址白名单:在此处输入 IP 地址,以限制谁(或什么)可以调用 webhook URL。输入允许的 IP 地址列表(以逗号分隔)。从白名单之外的 IP 地址访问将返回 403 错误。如果留空,所有 IP 地址均可调用 webhook URL。

¥IP(s) Whitelist: Enter IP addresses here to limit who (or what) can invoke the webhook URL. Enter a comma-separated list of allowed IP addresses. Access from IPs outside the whitelist throws a 403 error. If left blank, all IP addresses can invoke the webhook URL.

  • 无响应体:设置 n8n 是否应在响应中发送正文(禁用)或阻止 n8n 在响应中发送正文(启用)。

¥No Response Body: Set whether n8n should send a body in the response (turned off) or prevent n8n from sending a body in the response (turned on).

  • 原始数据正文:设置是否以原始格式(例如 JSON 或 XML)返回正文(启用)或不返回(禁用)。

¥Raw Body: Set whether to return the body in a raw format like JSON or XML (turned on) or not (turned off).

  • 响应数据:输入要在响应中发送的任何自定义数据。

¥Response Data: Enter any custom data you want to send in the response.

  • 响应标头:在 Webhook 响应中发送更多标头。请参阅 MDN Web 文档 | 响应头 了解更多关于响应标头的信息。

¥Response Headers: Send more headers in the webhook response. Refer to MDN Web Docs | Response header to learn more about response headers.

  • Webhook 后缀:输入要附加到简历 URL 的后缀。当工作流包含多个等待节点时,这对于为每个等待节点创建唯一的 Webhook URL 非常有用。请注意,生成的 $resumeWebhookUrl 不会自动包含此后缀,你必须在公开 webhook URL 之前手动将其附加到 webhook URL。

¥Webhook Suffix: Enter a suffix to append to the resume URL. This is useful for creating unique webhook URLs for each Wait node when a workflow contains multiple Wait nodes. Note that the generated $resumeWebhookUrl won't automatically include this suffix, you must manually append it to the webhook URL before exposing it.

Webhook 调用限制#

¥On Webhook Call limitations

使用 Webhook 调用时需要注意一些限制:

¥There are some limitations to keep in mind when using On Webhook Call:

  • 工作流的部分执行会更改 $resumeWebhookUrl,因此请确保将此 URL 发送到目标第三方的节点与等待节点在同一执行中运行。

¥Partial executions of your workflow changes the $resumeWebhookUrl, so be sure that the node sending this URL to your desired third-party runs in the same execution as the Wait node.

表单提交#

¥On Form Submitted

等待表单提交后再继续。设置以下参数:

¥Wait for a form submission before continuing. Set up these parameters:

表单标题#

¥Form Title

输入要显示在表单顶部的标题。

¥Enter the title to display at the top of the form.

表单描述#

¥Form Description

输入要显示在标题下方的表单描述。此说明可以帮助用户了解如何填写表单。

¥Enter a form description to display beneath the title. This description can help prompt the user on how to complete the form.

表单字段#

¥Form Fields

使用以下参数设置表单中要显示的每个字段:

¥Set up each field you want to appear on your form using these parameters:

  • 字段标签:输入要在表单中显示的字段标签。

¥Field Label: Enter the field label you want to appear in the form.

  • 字段类型:选择要在表单中显示的字段类型。选择以下选项:

¥Field Type: Select the type of field to display in the form. Choose from:

  • 日期

    ¥Date

  • 下拉列表:在“字段选项”中输入每个下拉选项。

    ¥Dropdown List: Enter each dropdown options in the Field Options.

    • 多项选择选择用户是否可以选择单个下拉选项(关闭)或多个下拉选项(开启)。

    ¥Multiple Choice: Select whether the user can select a single dropdown option (turned off) or multiple dropdown options (turned on)

  • 数字

    ¥Number

  • 密码

    ¥Password

  • 文本

    ¥Text

  • 文本区域

    ¥Textarea

  • 必填字段:设置用户是否必须填写此字段才能提交表单(已开启)或用户是否可以不填写就提交表单(已关闭)。

¥Required Field: Set whether the user must complete this field in order to submit the form (turned on) or if the user can submit the form without completing it (turned off).

响应条件#

¥Respond When

设置何时响应表单提交。选择以下选项:

¥Set when to respond to the form submission. Choose from:

  • 表单已提交:此节点收到表单提交后立即响应。

¥Form Is Submitted: Respond as soon as this node receives the form submission.

  • 工作流已完成:此工作流的最后一个节点完成后响应。

¥Workflow Finishes: Respond when the last node of this workflow finishes.

  • 使用 '响应 Webhook' 节点:响应 Webhook 节点执行完毕后响应。

¥Using 'Respond to Webhook' Node: Respond when the Respond to Webhook node executes.

限制等待时间#

¥Limit Wait Time

设置工作流是否在达到特定限制类型后自动恢复执行(已开启)或不自动恢复执行(已关闭)。

¥Set whether the workflow will automatically resume execution after a specific limit type (turned on) or not (turned off).

如果启用此选项,还需设置:

¥If turned on, also set:

  • 限制类型:从以下选项中选择要强制执行的限制类型:

¥Limit Type: Select what type of limit to enforce from these options:

  • 时间间隔:等待一段时间。

    ¥After Time Interval: Wait for a certain amount of time.

    • 输入限制时间。

    ¥Enter the limit's Amount of time.

    • 选择限制的时间单位。

    ¥Select the limit's Unit of time.

  • 在指定时间:等待到指定日期和时间再恢复。

    ¥At Specified Time: Wait until a specific date and time to resume.

    • 最大日期和时间:使用日期和时间选择器设置节点恢复运行的指定时间。

    ¥Max Date and Time: Use the date and time picker to set the specified time the node should resume.

表单响应选项#

¥On Form Response options

  • 表单响应:从以下选项中选择表单的响应方式和响应内容:

¥Form Response: Choose how and what you want the form to Respond With from these options:

  • 表单提交文本:用户填写表单后,表单将显示“要显示的文本”中输入的任何内容。如果希望显示确认消息,请使用此选项。

    ¥Form Submitted Text: The form displays whatever text is entered in Text to Show after a user fills out the form. Use this option if you want to display a confirmation message.

  • 重定向 URL:用户填写表单后,表单会将用户重定向到“要重定向到的 URL”。这必须是有效的 URL。

    ¥Redirect URL: The form will redirect the user to the URL to Redirect to after they fill out the form. This must be a valid URL.

  • Webhook 后缀:输入要附加到简历 URL 的后缀。当工作流包含多个等待节点时,这对于为每个等待节点创建唯一的 Webhook URL 非常有用。请注意,生成的 $resumeWebhookUrl 不会自动包含此后缀,你必须在公开 webhook URL 之前手动将其附加到 webhook URL。

¥Webhook Suffix: Enter a suffix to append to the resume URL. This is useful for creating unique webhook URLs for each Wait node when a workflow contains multiple Wait nodes. Note that the generated $resumeWebhookUrl won't automatically include this suffix, you must manually append it to the webhook URL before exposing it.

模板和示例#

¥Templates and examples

Template widget placeholder.

基于时间操作#

¥Time-based operations

对于基于时间的恢复操作,请注意:

¥For the time-based resume operations, note that:

  • 等待时间小于 65 秒时,工作流不会将执行数据卸载到数据库。与其让进程继续运行,不如让进程在指定的时间间隔过后恢复执行。

¥For wait times less than 65 seconds, the workflow doesn't offload execution data to the database. Instead, the process continues to run and the execution resumes after the specified interval passes.

  • 无论时区设置如何,始终使用 n8n 服务器时间。工作流时区设置及其任何更改均不影响“等待”节点的间隔或指定时间。

¥The n8n server time is always used regardless of the timezone setting. Workflow timezone settings, and any changes made to them, don't affect the Wait node interval or specified time.