Skip to main content

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

FieldDescriptionType / Options
LabelCustom name for the actionString
Select connectionChoose or create a database connectionConnection
Table nameTarget table for upsertDropdown
ColumnsDefine which columns to insert/updateString[] + Map
ConditionWHERE clause conditions for updates (optional)String
InputsDefine input variables for column valuesManual Toggle
SchemaValidate inputs against a schemaSchema

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