If Condition
Learn How to Add If Condition in your DBSync Workflow
Introduction
The "If Condition" action in DBSync Cloud Workflow allows you to implement conditional logic within your workflows. This feature enables you to execute different actions based on specific criteria, enhancing the flexibility and functionality of your integrations.
Prerequisites
A configured project in DBSync Cloud Workflow.
At least one flow created where you want to implement the "If Condition."
How to Configure the If Condition
In the Flow screen, drag the Flow Icon from the Actions palette on the left and drop it in the center of the screen.
Click Configure on the flow panel to configure the flow.
In the Flow configuration panel that opens on the right side, enter the required description for the flow and click Save.
Add other required actions from the left panel to the center of the screen.
Add the If Condition Action: Once you have added the required actions, drag and drop the 'If Condition' action from the left panel into your flow.
Click Configure to set up the condition.
Define the Condition: In the configuration panel, specify the condition to be evaluated. The conditions may involve checking if:
a field equals a certain value,
a number is greater than a specific threshold, or
any other logical condition based on your workflow requirement.
Click Save after defining the condition.
Filter Files by Type or Name
When filtering by file type or file name in the "If Condition":
In the configuration panel, choose file_type or source_file_name as the variable for condition evaluation.
To match patterns instead of exact names or types, use the asterisk (‘*’) wildcard before or after your filter identifier:
Prefix with * (for example, *report) to match any filename ending with "report".
Suffix with * (for example, invoice*) to match any filename starting with "invoice".
Use * on both sides (for example, data) to match filenames containing "data" anywhere.
This approach ensures flexible matching and helps filter files even when names or types follow variable patterns.
Example Scenarios
Suffix Matching (for example, invoice*) To trigger logic for monthly invoice files such as "invoice_Jan.pdf", "invoice_Feb.pdf", or "invoice_2025.xlsx", use invoice* with the source_file_name variable to capture all of them.
Prefix Matching (for example, *report) If your team exports reports with names like "sales_report.csv", "inventory_report.csv", or "customer_report.xlsx", use *report with the source_file_name variable to run actions whenever a file ends with "report".
Contains Matching (for example, data) For files like "customer_data_backup.zip", "data_summary.txt", or "bigdata_metrics.csv", set the condition to *data* with the source_file_name variable to trigger actions on all files containing "data" anywhere in their name.
Configure True / False Outcomes and Run
Add Actions for True and False Outcomes: Define actions for both True and False outcomes below the condition.
Drag and drop the desired actions (for example, sending an email, updating a record, or executing another flow) into the respective sections based on the expected outcome of the condition.
Save the Flow: After configuring the If Condition and adding the necessary actions, click Save to save your flow.
Run the Integration: Click Run
to execute the flow.
Monitor the console output to verify that the If Condition is evaluated correctly and that the appropriate actions are executed based on the condition.
Debugging: If needed, add a Debug action before the If Condition to inspect the values being evaluated.
This helps ensure that the condition is set up correctly.
Review Results: After running the integration, check the console output for any errors or confirmation messages.
This will help you understand if the If Condition worked as intended.
Iterate and Optimize: Based on the results and any issues encountered, make necessary adjustments to the condition or actions.
Repeat the testing process until the workflow operates as expected.
FAQ
Related Content
Query: In DBSync cloud workflow, you can easily add and configure queries to fetch data from multiple sources. This functionality allows you to customize search parameters and obtain specific results tailored to your business needs.
Debug: Learn how to effectively use the Debug action to troubleshoot and validate your workflows.
Logs: Troubleshooting common errors in DBSync cloud workflow.
Last updated