Uncanny Automator 5.1 releases are now available for download! We're excited to introduce several new…
Uncanny Automator 4.6 is now available with a new feature that will completely transform how many of our advanced users work with recipes and data. It adds a new concept called “action tokens” that allow you to pass data from one action to another. Let’s explore how it works with some examples.
What are Action Tokens?
Right now, Uncanny Automator uses a powerful token system to take data from your triggers, users and posts, and use that data in your recipe actions. Suppose a recipe has a form submission trigger; you can pull data from the form fields that were submitted using our token system. Or maybe you want to use information about the user that submitted the form in your actions; that’s easy too with our standard user tokens.
But let’s say your action in a recipe is to create a post, then after creating the post, you want to share it on Facebook. Somehow you need information about the new post (that the action created) in order to post something on Facebook. One common workaround here was just to create 2 recipes: the first to create the post, the second to fire when a new post is created (so watching for the first recipe to create the post) and then running the action. Having 2 connected recipes is confusing though and introduces more risk.
The ideal situation is being able to merge what’s needed into a single recipe, and now you can. Now, when you look at the available tokens for new actions, you will see data associated with existing actions in the same recipe now available. Create a new user in a recipe? You can return the user ID and look up user records, or even send an admin a link to the new users’s edit page in /wp-admin/. Create a post? Return the post URL and ID. Create a group or forum topic? Return their respective IDs and URLs.
Here’s what the updated token section looks like inside an action:
At the top of the token list, you’ll see the standard list of tokens available everywhere. Common tokens related to user details and the site, Date tokens are for date/time data, Advanced covers elements like post and user meta, Modifiers allow calculations, then we have the sections for tokens related to the triggers in a recipe and tokens related to other actions in the recipe.
Let’s go back to an example where maybe a form submission creates a new blog post and we want to share the new blog posts submitted via the form automatically to a Facebook group. Here’s what the actions might look like:
In the image above, you can see how we’re using the Post URL as well as the Post Title that are created from the “Create a post” action in our new Facebook message. It’s that easy! This new feature will slash the number of recipes most sites require and it’s a lot more efficient.
There are some situations where filters and some action types might affect the availability of action tokens when the actions run, but to make things as easy and simple as possible, there are new instructional messages and visual aids to help out.
There are dozens of new action trigger options in the free release and you’ll find them to be of most value in recipes that involve the creation of posts (in WordPress or elsewhere, like social media) or users.
With so many token options now available, we also have a new Knowledge Base article about managing tokens that’s worth a read.
Big improvements to webhooks
Webhooks can sometimes be hard to troubleshoot when they fail. The website you’re sending data to might be down or return some type of error, but until now, the specific error details weren’t available for easy review in the Automator logs. In Automator 4.6, webhooks that run into some type of error or notice will now return the full details, like this:
This enhancement makes it a lot easier to identify and trace webhook errors.
The next change is much bigger, and also more advanced. Let’s start with some context.
There are situations where another system receiving data requires fields to be in a certain format. It might even be appropriate to flag something as a null value, so not just blank or zero, but intentionally null. Until now, Automator didn’t offer a way to specific data types for each key, nor did we have a way to effectively pass null values. A “value” was always required, and sometimes this created an issue for systems expecting a null record.
We’re adding a new column to rows in webhook records to support data types, and this is what it looks like:
We know this complicates things a bit, and for the vast majority of use cases, leaving the default “Text” data type is completely fine and expected. Your existing recipes with webhooks will just inherit this option by default.
The new options give advanced users a way to choose the correct data type and to leave Value blank if a null value is appropriate.
The Events Calendar Attendee data
Working with standard and custom attendee data has been a challenging (but common) request, and with The Events Calendar 6.0 release we have been able to expand our support of additional field types. Where previously we couldn’t support custom fields for attendee information, Automator now has support for pulling those records, including text fields, radio buttons and checkboxes.
Please note that The Events Calendar 6.0 or higher is required for this expanded field support.
New triggers, actions and tokens
There are a handful of important new additions in this free release of Uncanny Automator.
Uncanny Groups for LearnDash users get 2 new tokens:
- A number of seats greater than, less than, equal to or not equal to a number are added to an Uncanny group
- A number of seats greater than, less than, equal to or not equal to a number are removed from an Uncanny group
It was an interesting use case from a customer that led to these additions, specifically being able to keep an audit record of changes to seat counts by Group Leaders and admins. Now it’s possible to use a Google Sheet as a way to track when seat count increases and decreases happen and by whom.
WP Simple Pay adds a new trigger for when a subscription from a form is created.
For WooCommerce users, there are lots of new tokens for order fees, order shipping and product price. You asked, we listened!