Overview
Internal workflows automate operational tasks that keep your Consuelo workspace healthy and your team productive. Unlike customer-facing workflows, these handle data maintenance, reporting, and team coordination.
Common Internal Use Cases
Data Maintenance
| Workflow | Trigger | Actions |
|---|
| Stale data cleanup | Daily schedule | Find, notify, archive old records |
| Duplicate detection | Weekly schedule | Identify, flag, merge duplicates |
| Data validation | Record updated | Validate, flag errors, notify owner |
| Backup reminders | Monthly schedule | Create records, notify admin |
Reporting & Notifications
| Workflow | Trigger | Actions |
|---|
| Weekly standup | Monday 9am | Query data, send email |
| Pipeline health | Daily | Calculate metrics, notify if low |
| Win celebrations | Record updated (closed won) | Post to Slack #wins |
| Alert escalation | Record created (high priority) | Send email, assign, notify |
Team Coordination
| Workflow | Trigger | Actions |
|---|
| Handoff notes | Record assigned | Create task, notify new owner |
| Follow-up reminders | Record updated | Delay, create reminder task |
| Approval workflow | Record created | Assign, wait, notify on decision |
| Onboarding sequence | Record created (new hire) | Create tasks, delay, notify |
Workflow Design Patterns
Pattern 1: Scheduled Maintenance
Run cleanup tasks on a schedule:
Example: Archive stale opportunities
- Trigger: Daily at 2am
- Search Records: Opportunities where last activity > 90 days
- Filter: Stage ≠ “Closed”
- Update Record: Set status to “Stale”
- Create Record: Task for owner to review
Pattern 2: Event-Driven Processing
React to changes in real-time:
Example: Flag high-value deals
- Trigger: Opportunity updated
- Filter: Value > $50,000 AND Stage = “Negotiation”
- Update Record: Set priority to “High”
- Send Email: Notify sales manager
- Create Record: Task for VP of Sales
Pattern 3: Multi-Step Approval
Route records through approval process:
Example: Discount approval
- Trigger: Opportunity updated (discount field)
- Filter: Discount > 20%
- Update Record: Set status to “Pending Approval”
- Create Record: Task for manager
- Delay: Wait 24 hours
- Filter: Check if approved
- Send Email: Notify rep of decision
Pattern 4: Data Synchronization
Keep data in sync across systems:
Example: Sync to data warehouse
- Trigger: Daily at midnight
- Search Records: All updated records today
- Iterator: Loop through records
- Code: Format for data warehouse
- HTTP Request: POST to warehouse API
Building Internal Workflows
Step 1: Define the Problem
Ask:
- What manual task are we automating?
- What triggers the workflow?
- What should happen?
- Who needs to be notified?
Step 2: Map the Flow
Sketch the steps:
Trigger → Action 1 → Action 2 → ... → End
↓ ↓ ↓
Filter? Condition? Branch?
Step 3: Build Incrementally
- Start with trigger + one action
- Test thoroughly
- Add complexity gradually
- Add error handling last
Step 4: Test Edge Cases
Consider:
- What if no records found?
- What if action fails?
- What if multiple triggers fire?
- What if workflow is interrupted?
Best Practices
Naming
Use descriptive names:
- ❌ “Workflow 1”
- ✅ “Daily Stale Opportunity Cleanup”
Documentation
Add comments in workflow:
Step: "Find stale records"
Name: "Search opportunities inactive 90+ days"
// Excludes already closed deals
Error Handling
Always handle failures:
- Add Filter after Search (check if results exist)
- Use branches for success/failure paths
- Create error log records on failure
- Notify admin if workflow fails
Testing
Test before activating:
- Use Test button with sample data
- Check each step output
- Verify end result
- Test edge cases (empty results, large datasets)
Monitoring
Monitor workflow health:
- Check Settings → Workflows → Runs
- Review success/failure rates
- Watch for patterns in failures
- Adjust based on real usage
Advanced Techniques
Using Code Actions
For complex logic, use the Code action:
// Calculate custom metric
const deals = previousStep.records;
const total = deals.reduce((sum, d) => sum + d.value, 0);
const avg = total / deals.length;
return {
totalValue: total,
averageValue: avg,
count: deals.length
};
Recursive Workflows
Create workflows that trigger themselves (with caution):
- Trigger: Record created (Follow-up task)
- Delay: Wait 7 days
- Search Records: Check if completed
- Filter: Not completed
- Update Record: Escalate priority
- Create Record: Create new follow-up task
- Loop: This creates another task that triggers the workflow
Risk of infinite loops. Always include exit conditions:
- Max iterations limit
- Time-based cutoff
- Manual review flag
Working with Iterators
Process arrays of records:
Step 1: Search Records (find 50 deals)
↓
Step 2: Iterator (process each)
↓
Step 3: Update Record (inside iterator)
↓
Step 4: Close iterator
↓
Step 5: Send summary email
Iterator limits: Can process up to 200 records per workflow run (Search limit).
Limitations
Concurrency
- Workflows run sequentially, not in parallel
- One record update triggers one workflow
- No bulk workflow triggers (use scheduled workflows)
Rate Limits
- 100 API calls per minute
- Workflow actions count toward this limit
- Use Code action for bulk operations
Delays
- Delays pause execution but consume workflow slot
- Maximum delay: No hard limit
- Scheduled date cannot be in the past
Debugging
- Limited debugging tools
- Check workflow runs for error messages
- Add logging via Create Record actions
- Test thoroughly before production
Examples
Example 1: Data Cleanup
Weekly orphaned contact cleanup
- Trigger: Weekly (Sunday 2am)
- Search Records: Contacts with no company and no activity 30+ days
- Filter: Check if found any
- Branch:
- Yes: Update status to “Review”
- No: End
- Create Record: Task for data steward
- Send Email: Daily summary to admin
Example 2: Alert Routing
Route high-priority tickets
- Trigger: Record created (Support Ticket)
- Filter: Priority = “Critical”
- Update Record: Assign to on-call engineer
- Send Email: Notify on-call (SMS if possible)
- Create Record: Escalation task
- Delay: Wait 30 minutes
- Search Records: Check if resolved
- Filter: Not resolved
- Send Email: Escalate to manager
Example 3: Content Publishing
Publish content workflow
- Trigger: Record updated (Content, Status = “Ready”)
- Delay: Wait until scheduled publish date
- Filter: Check date reached
- HTTP Request: Post to CMS API
- Update Record: Set status to “Published”
- Create Record: Social media task
- Send Email: Notify content team
Troubleshooting
Workflow Not Triggering
| Issue | Check |
|---|
| Workflow inactive | Toggle to Active |
| Wrong trigger type | Verify trigger conditions |
| Filter blocking | Check filter logic |
| API rate limit | Review usage in Settings |
Actions Not Executing
| Issue | Check |
|---|
| Previous step failed | Review run logs |
| No data to process | Search returned empty |
| Branch not taken | Verify branch conditions |
| Timeout | Complex queries may timeout |
Unexpected Results
| Issue | Solution |
|---|
| Wrong records affected | Review filter conditions |
| Data not updated | Check field permissions |
| Wrong email sent | Verify variable substitution |
| Loop didn’t close | Ensure iterator is properly closed |