Automation Action – Update A Database Using Extracted Fields | ThinkAutomation

Automation Action: Update A Database Using Extracted Fields

Automatically update a SQL database using extracted fields parsed from the incoming message.

Update a database with fields extracted from the incoming message.

This action can be used to automatically insert or update a record in a database based on the Extract Field actions defined in your Automation. The tables and column names used in the SQL commands are specified on the Database Update tab on each individual Extract Field Action. ThinkAutomation will then create the necessary SQL commands automatically.

Select a Database Type to connect to from the list. You must specify a Connection String that ThinkAutomation will use to open the database. Click the ... button to build the connection string. Click the Test button to verify that ThinkAutomation can connect to the database.

The UPDATE and SELECT commands will only be created if you have defined one or more of your Extracted Fields as Key Fields. ThinkAutomation will then first check if a record exists with the key field values by issuing a SELECT * FROM … command. It will then execute the UPDATE command if a record is found or the INSERT command otherwise.

You can have only have one Update A Database Using Extracted Fields Action in your Actions List since the SQL statements are automatically created based on your Extract Field actions. If you want to update multiple tables within the same database you can specify different table names against each Extract Field action in the Update Table Name entry – ThinkAutomation will then create separate SQL commands for each separate table being updated. You need to add your Update A Database Using Extracted Fields action below your Extract Field actions to ensure each extracted field has a value.

The result of the update can be assigned to a variable. Select a variable from the Assign Result To list. The variable will receive either ‘Inserted’,’Updated’ or an error message if the update failed.

If you need to update multiple separate databases within the same Automation then you can use the Update A Database Using Custom SQL Action. You can have any number of Update A Database Using Custom SQL Actions within your Automation.
This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, documents, local files and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.

You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.

Download Free 30 Day Trial

Back To Automation Actions List

ThinkAutomation Home