Tail Trigger

Starts the workflow when lines are added to this file

Tail Trigger

AI-generated

Overview

This node acts as a real-time file tailing trigger. It monitors specified files in a given directory for new lines appended to them and triggers the workflow whenever new lines are detected. It is useful for scenarios like monitoring log files, tracking real-time data feeds, or any situation where you need to react to live updates in text files.

Use Case Examples

  1. Monitoring server log files to trigger alerts or further processing when specific events occur.
  2. Tracking real-time data appended to files for live analytics or notifications.

Properties

Name Meaning
Directory Defines the working directory where the files to be monitored are located.
File Expression Specifies the file name pattern to monitor for real-time updates, supporting wildcards.
Include Previous Lines Number of previous lines to load on startup, allowing the node to process recent history before new lines.
Reject Duplicate Lines Option to reject lines that are identical to the previous one to avoid duplicate triggers.

Output

JSON

  • line - A single line of text appended to the monitored file(s).

Dependencies

  • Requires access to the system shell to run the 'tail' command for monitoring files.

Troubleshooting

  • Ensure the specified directory and file expression are correct and accessible by the node's runtime environment.
  • If the node does not trigger, verify that the 'tail' command is available on the system and that the node has permission to execute it.
  • Errors from the 'tail' process are emitted and can cause the node to error out; check stderr output for details.
  • If duplicate lines are not desired, enable the 'Reject Duplicate Lines' option to prevent repeated triggers on identical consecutive lines.

Discussion