If (Condition)

Learn how to create conditional workflows

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

Before you begin, ensure you have:

  • A configured project in DBSync Cloud Workflow.

  • At least one flow created where you want to implement the "If Condition."

Step-by-Step Process

  1. Add the If Condition Action: Drag and drop the 'If Condition' action from the left panel into your flow.

  1. Click Configure to set up the condition.

  2. Define the Condition: In the configuration panel, specify the condition to be evaluated. This could involve checking if a field equals a certain value, if a number is greater than a specific threshold, or any other logical condition based on your workflow needs. 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 * (e.g., *report) to match any filename ending with "report".

    • Suffix with * (e.g., invoice*) to match any filename starting with "invoice".

    • Use * on both sides (e.g., *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 (e.g., 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 (e.g., 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 (e.g., 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.

  1. Add Actions for True and False Outcomes: Define actions for both the True and False outcomes below the condition.

  2. Drag and drop the desired actions (e.g., sending an email, updating a record, or executing another flow) into the respective sections based on the expected outcome of the condition.

  3. Save the Flow: After configuring the If Condition and adding the necessary actions, click Save to save your flow.

  4. Run the Integration: Click the Run icon to execute the flow. Monitor the console output to verify that the If Condition is evaluated correctly and that the appropriate actions are taken based on the condition.

  5. 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.

  6. 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.

  7. 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.

PRO TIP

Use nested "If Conditions" to build complex decision-making logic within your workflows. This allows for granular control over the actions executed based on multiple criteria.

  • Always use the asterisk ‘*’ as indicated to cover partial matches.

  • Combine multiple conditions (such as file_type AND source_file_name) for granular control.

  • Use the Debug action to inspect the evaluated values and ensure correct filter setup.

Frequently Asked Questions (FAQ)

  1. Can I use multiple conditions in a single "If Condition" block?

Yes, you can combine multiple conditions within a single "If Condition" block using logical operators like AND and OR to create more complex logic for your workflows.

  1. What types of operations can I perform based on an "If Condition"?

You can perform various operations, such as executing different actions, triggering workflows, or modifying data based on the evaluated conditions.

  1. Is it possible to trigger notifications or alerts based on "If Conditions"?

Yes, you can set up notifications or alerts by configuring actions like sending emails or messages based on the outcomes of "If Conditions."

  1. What applications or data sources can I use with "If Conditions"?

"If Conditions" can be used with any supported data sources or applications integrated within DBSync Cloud Workflow, including Salesforce, databases, and other connectors. 5. Can I use wildcards to filter files by name or type? Yes, by including * before or after the filter identifier with file_type or source_file_name In your condition.

  1. Does this work for all integrated storage sources? File filtering by file_type and source_file_name works on all supported storage connectors in DBSync Cloud Workflow.

  • 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