Skip to content

MySQL Actions

Actions are the operations (or API operations) that you can perform on MySQL database application.

You can simply drag and drop elements and values from input trigger, derived values using formulas or desired constant that you may wish to map with MySQL.

You can automate the MySQL query executions which you do manually otherwise.

As shown below in Figure 1, you can Create, Update, Delete, and Upsert records in database tables based on response of the trigger event.

Actions for MySQL Application on Connect iPaaS

Figure 1. Actions for MySQL Application on Connect iPaaS

Create Record

Create records in the selected database table when an event triggers.

  • Select the table from the database in which you have to create a record. After the table selection, all the Not Null columns of your tables will be shown as required fields.
  • Add optional fields of the table using the + button. You can map field data using the data coming from the trigger or use excel functions. You can also use the evaluate functionality to map values for enum type columns.

For example in below Figure 2, values of multiple column fields of MySQL table are mapped to attributes from ServiceNow.

MySQL Create record

Figure 2. MySQL Create Record Action

Delete Record

Delete one or multiple MySQL database records in response to the event trigger. You can filter records based on the selection criteria.

  • Select the table in your database from which you want to delete the records.
  • Use the Choose where condition to add the conditions for selecting the records to be deleted. You can construct complex logic of AND and OR conditions to select the records.

For example, in Figure 3 below, from the table Incident, all the records which have incident name same as the category of ServiceNow incident and incident_state equal to closed will be deleted when an incident is updated in ServiceNow.

MySQL Delete record

Figure 3. MySQL Delete Record Action

Update Record

Update one or multiple MySQL database records in response to an event trigger. You can update the record from the table based on some condition.

  • Select the table in your database which you want to update.
  • Add the conditions to select the records that will be updated. You can construct the logic of conditions using complex conditional OR and AND.
  • Select the updates that you want to perform on the selected records. You can use data Mapping and Transformation and excel functions. You can also use the evaluate functionality to map values for enum type columns.

In the figure below, whenever Incident updated on ServiceNow, a record is updated in MySQL database. The database table's Incident Description and Incident Name columns are directly mapped to attributes from ServiceNow.

For incident_state column, the current date and time is added using the excel function Now().

The column incident_state is an enum data type column in the MySQL database. You can either type in the value of the incident_state or you can map the value of this field using the evaluate functionality as shown in the figure.

MySQL Update record

Figure 4. MySQL Update Record Action

Upsert Record

Upsert operation is the combination of Update and Create(insert) operations.

Connect iPaaS will find if a record with matching Primary Key is present in the table. If a record is found, the record will be updated with the data provided. If a record is not found, Connect iPaaS will create a new record with the data provided. The Primary key can either be a single column or a combination of columns.

In the figure below, whenever an Incident is updated on ServiceNow, a record is updated or added in the MySQL database. The database table Incident Name column is mapped to attributes of ServiceNow and act as the primary key.

The Incident Description field is populated using short description from ServiceNow and the value of current time comes from the excel style function Now().

The column incident_state is an enum data type column in the MySQL database. You can either type in the value of the incident_state or you can map the value of this field using the evaluate functionality by enabling the Evaluate checkbox.

MySQL Upsert record

Figure 5. MySQL Upsert Record Action