Text file
Analysis
This group reads a plain-text file and saves what it finds for later instructions: whether a text is there, how many lines there are, and the whole content. These instructions change nothing in the document.
Prerequisite: the workflow must already have a text file created or opened (with Create txt file or Open txt file).
- Document: indicates which document in the workflow the instruction applies to. If left empty, the current document is used. If the document doesn’t exist, the instruction simply does nothing.
- Saving a result: every instruction here has one or more “save … key” fields. If you leave them empty nothing is saved and the instruction has no effect; if you fill them in, the result is stored under that name for later instructions to use.
- Dynamic values (
@name): in a text field you can type@followed by the name of a value saved earlier in the workflow.
Count Lines .txt
Counts the lines of the file.
When to use it: to know how much a file has before deciding whether to keep going.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Save count key | Name to save the number of lines under | (empty) | No |
Important behavior: an empty document has 0 lines. A file that ends with a line break does
not count an extra empty line at the end; blank lines in the middle are counted.
Find Text .txt
Looks for a text and reports whether it is there, how many times, and the first line that has it.
When to use it: to decide what the workflow does next — for example, only add a line if a marker is not already in the file.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Search text | Text to look for. Supports @name |
(empty) | Yes |
| Case sensitive | Yes = Cat and cat are different |
No |
No |
| Case sensitive (from variable) | Reads yes/no from a saved value | (empty) | No |
| Save found key | Name to save yes/no under | (empty) | No |
| Save count key | Name to save how many occurrences under | (empty) | No |
| Save line key | Name to save the first line that has it under | (empty) | No |
Important behavior: if Search text is empty, nothing happens and nothing is saved. Several
occurrences on the same line are counted separately. When there is no match, the count is 0 and
the line is 0.
Get Text .txt
Saves the whole content of the file as a value.
When to use it: to carry the text into another instruction — to write it into a document, or to compare it with something else.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Save text key | Name to save the content under | (empty) | No |
Important behavior: the content is saved exactly as it is, line breaks included. If Save text key is empty, nothing is saved.
Iterate Lines .txt
Publishes every line of the document into a variable, so a For Each can walk them one by one.
When to use it: to process a text file line by line — checking, counting, or copying each line somewhere else.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Save key | Name of the variable that receives the lines. Empty = the instruction does nothing useful | (empty) | No |
| Save count key | Name of the variable that receives how many lines there are | (empty) | No |
A line is a text, not a record, so each turn hands out the line itself: inside the loop it is
read as @line, with no field name after it.
Important behavior: the turns are a copy taken when the instruction runs: what the loop walks does not change if the body edits the document. To leave a result back in the row, write it by position — the Index of the For Each feeds the “(from variable)” field of the writing instruction. In this format that instruction is Replace Line, whose Line number (from variable) takes the loop’s index.
This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.