Upsert
MSSQL Plugin – Upsert Action
Summary (SEO Meta Description):
The MSSQL Plugin’s Upsert Action allows workflows to insert new rows or update existing rows in Microsoft SQL Server tables.
It simplifies database management by combining Insert and Update logic into a single action.
Overview
The Upsert Action in the MSSQL Plugin enables workflows to add new records or update existing ones in a SQL Server table.
This ensures workflows don’t duplicate data while keeping existing records up to date.
Typical Use Cases:
- Insert a new user or update existing user data in a CRM system
- Maintain product catalogs with updated stock counts and details
- Ensure synchronization between workflow data and MSSQL tables
- Avoid duplicate records when integrating with external systems
⚙️ Configuration
| Field | Description | Type / Options | 
|---|---|---|
| Label | Custom name for the action | String | 
| Select connection | Choose or create a database connection | Connection | 
| Table name | Target table for upsert | Dropdown | 
| Columns | Define which columns to insert/update | String[] + Map | 
| Condition | WHERE clause conditions for updates (optional) | String | 
| Inputs | Define input variables for column values | Manual Toggle | 
| Schema | Validate inputs against a schema | Schema | 
FAQ
Q: What happens if the row already exists?
A: The action will update the row that matches the condition instead of inserting a duplicate.
Q: Do I need to specify conditions?
A: Yes, conditions (usually on primary keys or unique columns) are required to decide whether to update or insert.
Q: Can I map workflow fields to table columns?
A: Yes. Use the Columns → Map feature to map workflow inputs to specific MSSQL columns.
Keywords: WeHub MSSQL Plugin, MSSQL Upsert Action, Insert or Update SQL Server Rows, Workflow Database Automation