What You’ll Build
In this guide, you’ll create a workflow that:- Receives form submissions for customer feedback
- Uses AI to analyze the sentiment and categorize the feedback
- Routes high-priority feedback to notify the team
- Creates a record in your system for all feedback
Prerequisites
- A Langdock account with workflows access
- Basic understanding of your use case and goals
Estimated time: 15 minutes to complete this tutorial
Step 1: Create a New Workflow
Navigate to the Workflows section and click Create Workflow.- Give your workflow a descriptive name: “Customer Feedback Processor”
- Optionally add a description
- Click Create
- Click Form from the trigger options
- The trigger node appears on the canvas
Configure the Form
Click on the trigger node to open the configuration panel:- Form Title: “Customer Feedback Form”
-
Add Form Fields:
- Field 1:
name(Text, Required) - Label: “Your Name” - Field 2:
email(Email, Required) - Label: “Email Address” - Field 3:
feedback(Long Text, Required) - Label: “Your Feedback” - Field 4:
product(Dropdown, Required) - Label: “Product”- Options: “Mobile App”, “Web Platform”, “API”, “Other”
- Field 1:
-
Form Settings:
- Enable “Make this form public” to allow external submissions
- Add a thank you message: “Thanks for your feedback! We’ll review it shortly.”
- Click Save
Pro tip: Click the Copy URL button to get your form link. You can
share this with customers or embed it on your website.
Step 3: Add an Agent Node
Now let’s add AI to analyze the feedback:- Click the + button on the trigger’s output handle (right side)
- Select Agent from the node menu
- The agent node appears, connected to your trigger
Configure the Agent
Click on the agent node:- Name: “Analyze Feedback”
- Agent Mode: Create new agent
- Agent Name: “Feedback Analyzer”
- Instructions:
- Input: Add the feedback variable to the prompt
- Model: Select your preferred model (e.g., GPT-4 or Claude)
-
Enable Structured Output:
- Click Add Output Field
- Field 1:
sentiment(String) - “The sentiment of the feedback” - Field 2:
category(String) - “The category of feedback” - Field 3:
priority(String) - “Priority level: low, medium, or high” - Field 4:
summary(String) - “One-sentence summary of the issue”
- Click Save
Test the Agent
Before continuing, test the agent node:- Click the play button on the trigger node
- Fill in test data in the form that appears
- Click Run
- Once complete, click on the agent node
- View the Output tab to see the analysis
Step 4: Add a Condition Node
Let’s route high-priority feedback differently:- Click the + button on the agent node’s output
- Select Condition
- Name it “Check Priority”
Configure Conditions
- Click Add Condition
-
Condition 1:
- Name: “High Priority”
- Mode: Manual
- Expression:
{{agent.output.structured.priority === "high"}}
- Click Add Condition again
-
Condition 2:
- Name: “Normal Priority”
- Mode: Manual
- Expression:
{{agent.output.structured.priority != "high"}}(this catches everything else)
Step 5: Add Notification for High Priority
For high-priority feedback, let’s notify the team:- Click the + button on the “High Priority” condition handle
- Select Send Notification
Configure the Notification
Prompt:- Click Save
Step 6: Add an Action Node
Now let’s save all feedback to your system. This example uses a generic HTTP request, but you can use any integration:- Click + on both condition handles (we want to save all feedback)
- Select Google Sheets
Configure the Google Sheets Node
- SpreadsheetId: Insert your spreadsheetId
- Range: You can leave this on auto.
- Value Input: Set to “Prompt AI” and insert the following:
- Click Save
Alternative: If you don’t have an API, you can use an integration action
instead, like adding a row to Google Sheets or creating a Notion page.
Step 7: Test the Complete Workflow
Now test the entire workflow:- Click on the trigger node
- Click the Test run button in the toolbar
- Fill in the test form with sample data
- Click Run workflow
- Watch as each node executes in sequence
- Click on nodes to view their inputs and outputs
- Different priority levels
- Various types of feedback
- Different products
Step 8: Deploy Your Workflow
Once testing is complete, deploy the workflow to activate it:- Click the Deploy button in the top right
- Choose version type: Major (new Workflow)
- Add description: “Feedback Collection”
- Click Deploy
Step 9: Share Your Form
Get the form URL to share with customers:- Click on the trigger node
- Click Copy URL in the node toolbar
- Share this URL via email, website, or support portal
Pro tip: You can embed the form in your website using an iframe or link to
it from your support page.
Step 10: Monitor Workflow Runs
After your workflow is live, monitor its performance:- Go to the Runs tab at the bottom of the canvas
- View all workflow executions
- Click on any run to see detailed execution data for each node
- Check the Usage section to monitor AI credit consumption
What You’ve Learned
Congratulations! You’ve built a complete workflow that demonstrates:- ✅ Creating form triggers to capture data
- ✅ Using AI agents to analyze content
- ✅ Implementing conditional logic to route execution
- ✅ Sending notifications
- ✅ Integrating with external systems
- ✅ Testing and deploying workflows
Next Steps
Enhance This Workflow
Try adding:- A Code Node to calculate metrics or transform data
- An Action Node to automatically create support tickets
- Additional conditions for different priority levels
Explore Advanced Features
Best Practices
Learn patterns for building robust workflows
Error Handling
Handle failures gracefully in production
Cost Management
Control and optimize workflow costs
Integration Guide
Connect workflows to your tools
Common Questions
Can I edit a published workflow?
Can I edit a published workflow?
Published versions are immutable, but you can always edit the draft version (v0) and publish a new version when ready. This ensures your production workflows stay stable while you make changes.
How do I share workflows with my team?
How do I share workflows with my team?
What happens if a node fails?
What happens if a node fails?
By default, the workflow stops and marks the run as failed. You can configure
error handling strategies for each node, including continuing on error or
routing to error-handling paths.
How much do workflows cost?
How much do workflows cost?
Workflows consume AI credits based on the models and nodes used. You can set spending limits and view detailed usage in the workflow settings. Check the Usage tab after test runs to estimate costs.
Get Help
Need assistance? We’re here to help:- Check the Core Concepts to understand workflow fundamentals
- Review Best Practices for workflow patterns
- Contact support at support@langdock.com