memory_key string required default: "words_accumulated" Accumulates words across turns and fires a branch once a threshold is reached.
Counts how many words a text has.
Receives text and applies a simple formula to return the total word count.
Useful as a basic example of custom node creation or to limit response size before sending via SMS.
| name | type |
|---|---|
text | string |
| name | type |
|---|---|
words_in_turn | number |
total | number |
threshold | number |
reached | boolean |
branch | string |
reached — Reached below — Below memory_key string required default: "words_accumulated" threshold integer required text_field string required default: "text" reset_on_fire boolean required default: true branch_when_reached string required default: "reached" branch_when_below string required default: "below" accumulate_text_memory_key string optional output_field string required default: "accumulated_text" {
"memory_key": "words_accumulated",
"threshold": 20,
"text_field": "text",
"reset_on_fire": true,
"branch_when_reached": "reached",
"branch_when_below": "below",
"output_field": "accumulated_text"
} counter.updated Word counter updated after a turn.