skip to Main Content

New Integration: Database Query

Uncanny Automator has always been an extremely powerful way to work with data for plugins and apps that we integrate , and also for data stored in user and post meta tables. But for plugins and tools that we don’t yet integrate with and that use custom tables to store their records, there has never been an easy way to access that data. Your only options were to build your own integration, wait for us to build it, or build custom functions to call the data. Until now.

Introducing the Database Query integration

In the Uncanny Automator Pro 5.8 release, we have made it significantly easier for advanced users to query any data they want—with absolutely no code.

For most users that requested direct SQL query support, the need was for a tool that could retrieve data that could be used in recipes. To make this as easy as possible, there’s a brand new action to run a SELECT query. We made this as intuitive as possible, where Automator builds the query safely and all it does is retrieve data based on parameters you set. This is what a new Database Query action looks like:

WordPress Database Select Query

In this action, you can see that we target a specific table, set criteria for what rows to return, define the columns to be returned, and control how the results are ordered. It’s very straightforward and the action works efficiently with large data sets.

Of course, your next question will be, “But how do I use potentially thousands of returned records?”. And for that, we have lots of new tokens that allow you to output your records in a variety of formats, including:

  • [Individual column values]
  • Results (CSV)
  • Results (JSON)
  • Results (Serialized Array)

Whatever your data needs, we’re confident that one of these options will provide the data in a format that meets your requirements.

For expert users, we have a new action to run an SQL query where you can do whatever you want with the database. It looks like this, and yes, there is full token support:

Run an SQL Query

We would, of course, advise a lot of caution with this action. It unlocks a lot of power, and changes made are instant and permanent; there is no undo option. You will see that we disable words like DROP, ALTER, EXEC, CREATE, and TRUNCATE to mitigate some risk, but the tool can still be used to make significant database changes.

For power users, this new action will unlock unlimited use cases for all types of plugins and data we don’t natively support.

New triggers

The Automator Pro 5.8 release includes new triggers and actions for 11 different integrations, so let’s break down what’s new by trigger, action, and then category.

First up is WPCode, which gains a new trigger for “A snippet is deactivated”. This might be used to alert a dev team when someone deactivates a key piece of code or when one is deactivated automatically because of an error.

Woo Memberships gets a trigger for “A user’s access to a membership plan is changed to a status”. This one came from a ticket where a user wanted to change some behaviours when a user paused their membership for a hiatus, so we could trigger actions based on that status change.

New actions

Code Snippets users can now create a code snippet via an action, including defining the scope, adding the code, setting priority, and even setting the status.

FluentCRM gets a new action to remove a contact from lists. Perhaps when a user is removed from a membership then they’re all removed from all mailing lists.

Gravity Forms gets one new action: “Submit an entry for a form”. We already had “Create an entry for a form”, so how is this different? There were some third-party plugins that watch for an actual submission of an entry, so our existing action wouldn’t trigger workflows in the other plugins when Automator created the entry. This new action adds more options for integrating Automator-creator entries into other Gravity workflows.

MailerLite adds support for creating or updating a subscriber.

Finally, MemberPress gets a new action for cancelling a user’s recurring membership.

New conditions

GamiPress adds a new condition for a user’s points type meeting a condition, like perhaps only running actions if the user has above or below a certain number of points.

Our Tin Canny Reporting integration gets a condition for a verb being recorded in a module. A user case here might be something like only sending a user a course evaluation if they recorded a “Passed” verb for an uploaded Articulate Storyline module.

And the rest

Beyond the updates above, here are some other highlights of the Automator Pro 5.8 release:

  • Sample data is now shown in fields when testing incoming webhook triggers
  • Email domain conditions are no longer case sensitive

We hope you find the new additions useful!

author avatar
Ryan Moore Director
Ryan Moore (MA, PMP, BCom) is the Cofounder and Director of Uncanny Owl, creators of Uncanny Automator and a suite of popular add-ons for LearnDash. Since 2013, Ryan has helped thousands of companies add elearning and automation capabilities to their WordPress websites.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This page may contain affiliate links. Once in a while, we may earn a commission from those links. But with or without commissions, we only recommend products we like.
Back To Top