Building a workflow¶
The action runs any FlowDrop workflow, but it only reads one thing back: the
first node output that contains the configured Output Key
(processed_content by default). The two nodes in the Field Widget
Actions category cover the start and the end of that workflow.
Minimal workflow¶
flowchart LR
A[Entity Field Extractor] -->|formatted_context| B[Prompt / AI chat]
B -->|response text| C[Field Suggestion Output]
- Create a workflow in the FlowDrop editor.
- Add Entity Field Extractor. Leave its entity inputs unconnected: the action fills them in when it runs the workflow.
- Set Fields to Extract to the fields the model needs, for example
titleandbody. Empty means every field except the target field. - Connect
formatted_contextto your prompt or AI chat node. - Connect the AI response to the
contentinput of Field Suggestion Output. - Set Output Format on Field Suggestion Output to match the target
field:
plainfor plain text fields,htmlfor formatted text fields,markdownto keep the model's Markdown as is. - Attach the workflow to a field. See Configuration.
Note
The action only passes entity context to nodes of the Entity Field
Extractor type. Other nodes do not receive entity_id, entity_values
and the rest unless you connect them from the extractor's outputs.
Entity Field Extractor¶
Reads the entity being edited and turns it into text for a prompt.
When the form has values (the normal case), it extracts from the form state, so unsaved edits are included. If the entity already exists and the user can view it, field labels come from the field definitions; on a new entity the label is the machine name with underscores replaced by spaces. Without form values it falls back to the saved entity.
The target field (the one receiving the suggestion) is always left out.
| Setting | Default | What it does |
|---|---|---|
| Fields to Extract | empty | Field machine names to include. Empty includes all non-computed fields. |
| Strip HTML | on | Removes tags, turning <br>, paragraphs and list items into line breaks and dashes first. |
| Output | Contents |
|---|---|
formatted_context |
Label: value blocks separated by blank lines. Connect this to prompts. |
fields |
Machine name to extracted text. |
field_labels |
Machine name to label. |
entity_info |
entity_type, bundle, entity_id, label, is_new. |
target_field |
The field that will receive the suggestion. |
extracted_fields |
List of machine names that had a value. |
file_ids |
File IDs found in managed file widgets on the form, including uploads not saved yet. |
Values are reduced to text by shape: text values, entity reference labels (or
ID: n when no label is available), file names for file and image widgets,
link titles (or the URI) and dates. Multi-value fields are joined with line
breaks.
Field Suggestion Output¶
The last node of the workflow. It takes content, converts it and returns it
under processed_content, the default Output Key of the action.
| Setting | Default | What it does |
|---|---|---|
| Output Format | plain |
plain renders the Markdown and strips the tags. html renders Markdown to HTML with CommonMark. markdown returns the text unchanged. |
| Output | Contents |
|---|---|
processed_content |
The suggestion. |
text |
Same value as processed_content. |
length |
Character count. |
format |
The format used. |
If content is an array or object, it is JSON encoded before conversion.
Using a different output node¶
Any node can provide the suggestion. Set the action's Output Key to a key that node returns. The action walks the node results in execution order and uses the first one containing that key.
To tell the editor there is nothing to suggest, have a node return
no_match: true. The action stops and shows a "no suggestions" message next
to the field.