Employee Feedback Analyzer
Analyzes anonymous employee feedback for themes and action items, persists for trend tracking.
ai
Source
/**
* Analyzes anonymous employee feedback for themes and action items.
* Persists results for trend tracking.
*/
form employee_feedback {
label: "Employee Feedback"
schema: @json {
{
"type": "object",
"required": ["feedback", "department"],
"properties": {
"feedback": { "type": "string", "title": "Your Feedback" },
"department": {
"type": "string",
"title": "Department",
"enum": ["engineering", "product", "design", "sales", "marketing", "operations", "hr"]
},
"satisfaction_score": { "type": "number", "minimum": 1, "maximum": 5, "title": "Satisfaction (1-5)" }
}
}
}
}
workflow analyze_feedback {
label: "Analyze Feedback"
root {
type: code
label: "Extract feedback"
code: @ts { return context.nodes.root.input }
outputSchema: @json {
{
"type": "object",
"properties": {
"feedback": { "type": "string" },
"department": { "type": "string" },
"satisfaction_score": { "type": "number" }
}
}
}
}
node analyze {
type: ai
label: "Analyze themes"
kind: object
model: "google/gemini-2.5-flash"
prompt: @ts {
const fb = context.nodes.root.output
return "Analyze this anonymous employee feedback. Identify themes and suggest actions.\n\nDepartment: " + fb.department + "\nSatisfaction: " + (fb.satisfaction_score || "not provided") + "/5\n\nFeedback: " + fb.feedback
}
schema: @json {
{
"type": "object",
"required": ["themes", "sentiment", "action_items", "priority"],
"properties": {
"themes": { "type": "array", "items": { "type": "string" } },
"sentiment": { "type": "string", "enum": ["positive", "neutral", "negative", "mixed"] },
"action_items": { "type": "array", "items": { "type": "string" } },
"priority": { "type": "string", "enum": ["high", "medium", "low"] }
}
}
}
}
node result {
type: code
label: "Store result"
code: @ts {
const fb = context.nodes.root.output
const analysis = context.nodes.analyze.output
return {
department: fb.department,
satisfaction: fb.satisfaction_score || 0,
sentiment: analysis.sentiment,
themes: analysis.themes,
priority: analysis.priority
}
}
}
flow {
root -> analyze
analyze -> result
}
}
stream employee_feedback {
label: "Employee feedback"
workflow: analyze_feedback
version: v1
versions: {
v1 {
schema: @json {
{
"type": "object",
"required": ["department", "sentiment", "themes", "priority"],
"properties": {
"department": { "type": "string" },
"satisfaction": { "type": "number" },
"sentiment": { "type": "string" },
"themes": { "type": "array", "items": { "type": "string" } },
"priority": { "type": "string" }
}
}
}
condition: @ts { return context.output.result != null }
prepare: @ts { return context.output.result }
}
}
}
trigger on_feedback {
form:employee_feedback -> analyze_feedback
enabled: true
}
Flow
Trigger to workflow
employee_feedbackform
analyze_feedback
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Workflow nodes
CODE
Code Node
Extract feedback
AI
AI Node
Analyze themes
CODE
Code Node
Store result
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.