Tables & Flows Integration
Integrating Tables with Flows
One of the most powerful features of AutoCRUD is the ability to connect your tables with automated workflows. This guide shows you how to use flows to automate operations on your tables, creating powerful data-driven applications.
Understanding Table Automation
By connecting tables with flows, you can:
- Trigger workflows when table data changes
- Automatically update records based on conditions
- Process data and perform calculations
- Connect your table data with external services
- Build complete business processes around your data
Table-Related Flow Triggers
Record Created Trigger
Start a flow when a new record is created in a table:
- Create a new flow
- Select “Record Created” as the trigger type
- Choose the table to monitor
- Configure any additional options (filters, etc.)
- The flow will run each time a new record is created
Use cases: Send welcome emails, create related records, initiate approval processes
Record Updated Trigger
Trigger a flow when a record in a table is modified:
- Create a new flow
- Select “Record Updated” as the trigger type
- Choose the table to monitor
- Optionally specify which fields to watch for changes
- Configure any additional filters
Use cases: Notification systems, status updates, audit logging, data synchronization
Record Deleted Trigger
Run a flow when a record is deleted from a table:
- Create a new flow
- Select “Record Deleted” as the trigger type
- Choose the table to monitor
- Configure any additional options
Use cases: Cleanup related records, archive data, send notifications
View Button Trigger
Add a custom button to a table view that triggers a flow:
- Create a new flow
- Select “View Button” as the trigger type
- Choose the table and view
- Configure the button appearance and behavior
- The flow will run when users click the button
Use cases: Bulk operations, custom actions, process initiation
Table Operation Nodes
AutoCRUD provides several nodes for interacting with tables in your flows:
Create Record Node
Add new records to a table:
- Add a “Create Record” node to your flow
- Select the target table
- Map data to the fields you want to populate
- Configure additional options (error handling, etc.)
Example: Creating a customer record after a form submission
{
"name": "{{trigger.data.name}}",
"email": "{{trigger.data.email}}",
"createdAt": "{{now()}}"
}
Find Records Node
Query tables to find specific records:
- Add a “Find Records” node to your flow
- Select the table to query
- Configure filter conditions
- Specify sorting and limits if needed
Example: Finding all overdue tasks
{
"where": {
"dueDate": { "lt": "{{now()}}" },
"status": { "ne": "Completed" }
},
"limit": 100,
"sort": [{ "field": "dueDate", "direction": "asc" }]
}
Update Record Node
Modify existing records in a table:
- Add an “Update Record” node to your flow
- Select the target table
- Specify how to identify the record(s) to update
- Define the fields and values to update
Example: Marking a task as completed
{
"where": { "id": "{{trigger.data.recordId}}" },
"update": {
"status": "Completed",
"completedAt": "{{now()}}"
}
}
Delete Record Node
Remove records from a table:
- Add a “Delete Record” node to your flow
- Select the target table
- Specify how to identify the record(s) to delete
- Configure confirmation and safety options
Example: Deleting old archive records
{
"where": {
"createdAt": { "lt": "{{addDays(now(), -365)}}" },
"status": "Archived"
}
}
Common Automation Scenarios
Data Enrichment
Automatically enhance records with additional data:
- Trigger on record creation/update
- Use HTTP Request nodes to fetch external data
- Update the record with the enriched information
Example: Adding company information to a contact record by looking up their email domain
Approval Workflows
Create multi-step approval processes:
- Trigger when a record status changes to “Pending Approval”
- Send notification to approvers
- Create approval tasks or records
- Update the original record based on approval decisions
Data Synchronization
Keep multiple tables or systems in sync:
- Trigger when records change
- Transform data as needed
- Update corresponding records in other tables or external systems
- Log synchronization activities
Notifications and Alerts
Send alerts based on table conditions:
- Trigger on record updates
- Check if conditions meet alert criteria
- Send notifications via email, Slack, or other channels
- Update record to acknowledge the alert
Advanced Table Automation Techniques
Batch Processing
Process multiple records in a single flow run:
- Use a scheduled trigger or manual button
- Find records matching your criteria
- Loop through the records
- Process each record with your business logic
- Update processing status
Conditional Record Creation
Create records based on complex conditions:
- Trigger on an event
- Evaluate conditions using If nodes
- Create different record types based on conditions
- Link the new records appropriately
Cascading Updates
Update related records automatically:
- Trigger when a parent record changes
- Find all related child records
- Update the child records based on parent changes
- Optionally trigger further workflows
Form to Table Automation
Create complete data collection workflows:
- Design a form view for data entry
- Trigger a flow when the form is submitted
- Validate and process the submitted data
- Create records in multiple related tables
- Send confirmation notifications
Best Practices
Performance Considerations
- Limit the frequency of triggers for high-volume tables
- Use indexing for fields used in filtering
- Batch operations when possible
- Implement error handling and retry logic
- Monitor flow execution times
Data Integrity
- Validate data before creating or updating records
- Implement transaction-like patterns for multi-table updates
- Create audit trails for important changes
- Use rollback mechanisms for failed operations
Maintenance and Monitoring
- Document your automations
- Set up monitoring for failed flows
- Review flow execution logs regularly
- Test flows thoroughly before deployment
- Use descriptive naming for flows and nodes
Troubleshooting
Common Issues
Issue: Flow not triggering on record changes Solution: Check trigger configuration and ensure it matches the expected changes
Issue: Record updates not working Solution: Verify record identification conditions and field mappings
Issue: Flow running too slowly Solution: Optimize database queries, reduce complexity, batch operations
Issue: Circular update issues Solution: Implement guards against recursive triggering
Next Steps
Now that you know how to integrate tables with flows, explore: