Cloud Workflow
Raise an IssueJoin Community
  • Getting Started
    • Introduction
    • Integration Basics
    • Sign Up and Get a License
    • Features and Benefits
  • DBSync Platform
    • Core Components
    • System Requirements
    • AppCenter
      • Company and User Management
    • Development Studio
    • Security Features
  • iPaaS
    • Home
    • Apps
    • Extend
      • Functions
    • Administration
      • User & Role Management
    • Logs
    • Remote Agent
    • Published Templates
  • Create your Workflow
    • Project
    • Task
    • Flow Builder
      • Standard Functions
    • Actions
      • Flow
      • Variable
      • Transform and Write
      • SQL
      • Restructure
      • Query
      • Debug
      • ReST
      • Conditions
        • If (Condition)
        • For (Loop)
      • Storage
        • Dropbox
        • File
        • CSV
        • Google Drive
        • FTP
        • S3
      • Flow Management
        • Flow
        • Logs
        • Notification
        • Schedule
        • API
        • Webhook
        • Forms
    • Configuring DBSync Environment
  • Connectors
    • Amazon S3
    • Authorize.NET
    • ChannelAdvisor
    • Database
    • Dropbox
    • FTP
    • Google Drive
    • Google Sheets
    • HubSpot
    • JIRA Cloud
    • JIRA Service Management
    • Linnworks
      • Creating the DBsync Application on Linnworks Developer Instance
    • Mailchimp
    • Microsoft Dynamics 365 Business Central
    • Microsoft Dynamics 365 Finance and Operations (D365 F&O)
    • Microsoft Dynamics CRM Online
    • Microsoft Dynamics GP
    • Microsoft Dynamics NAV
    • monday.com
    • Narvar
    • NetSuite
      • NetSuite Connector Settings
    • OpenAPI
    • PointClickCare
    • QuickBooks Desktop
    • QuickBooks Online
    • Sage Intacct
    • Salesforce
    • ShipStation
    • Shopify
    • SkuVault
    • WooCommerce
  • Template Library
    • Salesforce to QuickBooks Online Order to Cash
    • Salesforce to QuickBooks Desktop Order to Cash
    • Salesforce to FTP Integration
    • QuickBooks Online to Salesforce Accounts Receivable
    • QuickBooks Desktop to Salesforce Accounts Receivable
    • QuickBooks Online to Business Central Integration
    • QuickBooks Online to ShipStation Orders
    • QuickBooks Desktop to Shipstation Orders
    • QuickBooks Desktop to monday.com Integration
    • QuickBooks Online to monday.com Integration
    • Shopify to QuickBooks Online
    • Shopify to QuickBooks Desktop
    • Linnworks Orders to QuickBooks Online
    • Linnworks Orders to QuickBooks Desktop
    • Linnworks to Salesforce Integration
    • Salesforce Litify and QuickBooks Online
    • Salesforce Litify and QuickBooks Desktop
    • HubSpot to QuickBooks Online Order to Cash
    • HubSpot to QuickBooks Desktop Order to Cash
    • SkuVault Orders to QuickBooks Desktop
    • SkuVault Orders to QuickBooks Online
    • SkuVault and Salesforce
    • ChannelAdvisor Orders and Salesforce
    • ChannelAdvisor and QuickBooks Online
    • ChannelAdvisor and QuickBooks Desktop
    • Shopify Orders to Dynamics365 CRM
    • Shopify Orders to Salesforce
    • ShipStation to Dynamics 365 CRM
    • ShipStation Orders to Salesforce
    • ShipStation to QuickBooks Online Orders
    • ShipStation to QuickBooks Desktop
    • Target Recruit to QuickBooks Online
    • Target Recruit to QuickBooks Desktop
    • QuickBooks Online to Database
    • QuickBooks Desktop to Database
  • Troubleshooting
    • Common Errors & Fixes
    • Adding Trusted IP Address in Salesforce
    • Installing QuickBooks Web Connector
    • QuickBooks to Salesforce Data Migration
    • Setting Password in QuickBooks Web Connector
    • Starting QuickBooks Web Connector
    • Update Salesforce Password & Security Token in DBSync
  • Additional Resources
    • Billing Information - Auto Renewal
  • Tutorials
    • Salesforce and QuickBooks
      • Account Hierarchy in Salesforce and QuickBooks
      • Account Owner Mapping
      • Resolving Email Fields Sync Issues in QuickBooks Online
      • Mulitple Price Levels in Salesforce QuickBooks Integration
      • Multicurrency in QuickBooks to Salesforce Integration
      • Multicurrency in Salesforce - QuickBooks Desktop Integration
      • Multicurrency in Salesforce QuickBooks Online Integration
      • Product Hierarchy in QuickBooks and Salesforce
      • QuickBooks Data Extraction Queries
      • QuickBooks File Backup and Recovery Process
      • QuickBoooks Reports to Salesforce Integration
      • Recurring Transactions to Accounting System
      • Retrieve Value from custom Field of QuickBooks Online
      • Salesforce Opportunity to QuickBooks - Disabling Jobs
      • Salesforce QuickBooks Custom Mappings
        • Use Case
      • Salesforce QuickBooks Integration with Multiple QuickBooks
      • Syncing Standard Group Line Items in QuickBooks Desktop
    • Using Date Function in DBSync Integration
    • Salesforce and Database
      • Database to Salesforce Integration
    • Database to Database
      • Database to Database Integration
Powered by GitBook
On this page
  • Introduction
  • Use Cases
  • Key Features
  • How to Configure SQL Action
  • Example: Dynamic Query
  • Output & Execution
  • Best Practices
  • Troubleshooting
  1. Create your Workflow
  2. Actions

SQL

Learn how to use the SQL action item to build your workflows

PreviousTransform and WriteNextRestructure

Last updated 1 month ago

Introduction

The SQL Action in DBSync Cloud Workflow enables you to interact with databases directly within your integration flows. Use it to write custom SQL queries that retrieve, insert, update, or delete records in supported databases — whether cloud-based or on-premise.

Use Cases

  • Fetch records from a database to feed into the data stream.

  • Update records dynamically based on workflow logic.

  • Insert new data from integrated apps.

  • Delete outdated or unnecessary records.

Key Features

  • Works with any connected database (e.g., MySQL, PostgreSQL, SQL Server, Oracle).

  • Supports dynamic queries using Fx-enabled variables.

  • Real-time query results or update counts.

  • Customizable batch size for optimized performance.

  • Code editor with SQL syntax highlighting.

How to Configure SQL Action

Step 1: Add SQL Action to the Flow

  1. Open the Cloud Workflow Development Studio.

  2. Drag and drop the SQL Action into your flow.

Step 2: Select a Data Source

  1. Choose a database from the Data Source dropdown.

  2. Only adapters of type DatabaseAdapter will be shown.

Step 3: Write Your SQL Query

  1. Use the SQL editor (with CodeMirror) to build your query.

  2. You can insert dynamic fields using the Fx Panel (right-hand side).

SELECT * FROM customers WHERE created_at > '{{last_sync_date}}'

Supported Query Types

Query Type
Result

SELECT

Tabular output in data preview

INSERT

Count of rows inserted

UPDATE

Count of rows updated

DELETE

Count of rows deleted

Use {{...}} to reference dynamic variables in your query.

Example: Dynamic Query

SELECT id, name FROM orders WHERE status = '{{order_status}}'

This pulls orders with a status provided by an earlier step in the workflow.

Output & Execution

  1. Click Run to preview the results.

  2. SELECT → Displays data in tabular format.

  3. INSERT/UPDATE/DELETE → Shows how many records were affected.

Batch Size

You can control processing by setting a custom Batch Size. Useful for large data syncs.

Best Practices

  • Use Query Preview before saving changes.

  • Sanitize dynamic inputs using filters/validation.

  • Keep queries optimized to avoid long-running transactions.

  • Leverage batch control in high-volume flows.

Troubleshooting

Problem
Likely Cause
Solution

No results returned

Filters too narrow

Check query logic and variable values

Column not found

Column name mismatch

Check column names in database

Access denied / auth error

Connector credentials invalid

Re-authenticate the connector

The SQL Action is a powerful addition to your DBSync Cloud Workflow, enabling direct and dynamic access to your databases within any flow. Use it to automate data syncing, enrichment, and control—all from a single visual interface.