Upsert
DynamoDB Plugin – Upsert Action
Summary (SEO Meta Description):
The DynamoDB Upsert action in WeHub allows you to insert or update items in AWS DynamoDB tables.
Use this action to add new records or update existing ones in a single workflow step.
Overview
The Upsert Action combines Insert and Update operations for a DynamoDB table.
If the item already exists (based on the primary key), it will be updated.
If it does not exist, it will be inserted automatically.
Typical Use Cases:
- Ensure customer or patient records always exist (insert if missing, update if found)
- Keep IoT device states up to date in real-time
- Maintain consistent transaction or order records
⚙️ Configuration
| Field | Description | Type / Options | 
|---|---|---|
| Label | Custom name for the action | String | 
| Select connection | Choose an existing DynamoDB connection or create a new one | Dropdown | 
| Table name | The DynamoDB table where the upsert will run | Dropdown | 
| Inputs (Manual) | Define fields for insert/update (name + type) | Name + Type (NUMBER, STRING, BYTE, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY) | 
| Truncate Fields | Option to truncate large fields during operation | Toggle | 
| Schema | Map workflow data to schema fields (optional) | Schema Selector | 
FAQ
Q: How does Upsert decide between insert and update?
A: It checks the primary key. If the key exists, the record is updated. If not, a new record is created.
Q: When should I use Upsert instead of Insert or Update?
A: Use Upsert when you’re not sure if the item exists and want a single action to handle both cases.
Keywords: DynamoDB Upsert, WeHub DynamoDB Plugin, Insert or Update DynamoDB, Workflow Database Upsert