New filter: parse_date

Use this filter to parse a date string, when its exact format is known. This filter is useful for strings that contain an ambiguous date value, like "01/01/01".

Read more

New filter: e164

We've added support for normalizing international phone numbers, with values returned in E.164 format.

Read more

Development videos!

Isaac here. :) I've started recording my development process, for many of the tasks I assemble.

Within Mechanic, you'll start to see YouTube links here and there.

To go directly to the source, you can find the playlist here, on YouTube:

YouTube: Creating Mechanic tasks

Event exports

We now support exporting JSON representations of events, including any associated task runs and action runs.

This is particularly useful for very large events, which may not be possible to display within the Mechanic app.

When such an event is too large to display, the event inspector will display an export prompt:

For all other events, exports are available at the end of the event's details:

Read more

Shopify Plus: Support for custom API passwords

In high-volume scenarios for Shopify Plus accounts, Mechanic's performance can be improved by creating a private Shopify app, having the same permissions that you've granted to Mechanic. Because this private app represents your explicit control and intent, Shopify can – at your request – grant it a higher API usage limit. By providing Mechanic with this private app's API password, you can extend this higher limit to Mechanic.

This setting is now available, for Shopify Plus accounts only.

Read more

Filter recent activity in place

Users may now modify the "Hide events that did nothing" and "Hide task runs that did nothing" options for any list of recent activity. This makes it much easier to quickly determine if events are coming through, or if a task is actually running but has simply decided not to generate any actions.

Find these options by clicking "Add filters", at top of any activity list.

The default values for these filters can be changed in the Mechanic account settings.

Read more

Retries are now available, for task and action runs

In general, Mechanic does not allow overwriting a meaningful result, once it has come into being. We're adding some flexibility to this, in the form of retries.

A retry is only ever available for…

  • … a task run which has failed, perhaps due to an API error
  • … a task run which has not generated any actions
  • … an action run which has failed

The retry button will only appear if a retry is possible.

Read more

New tags: "error", "log"

Mechanic has already supported surfacing task-level errors using {"error": ...} objects, preventing any actions from running and informing the user why. We have also held the convention of using {"log": ...} objects to record data that one might find useful while debugging.

Today, we formalize both usages and make available short-hand Liquid tags for making it easy to render both types of JSON objects. The "error" tag and the "log" tag have identical usage, accepting a single argument, an array of arguments, or a hash of arguments.


{% error "Something went wrong!" %}
{% error calculated_message %}
{% error "Something went wrong!", more_details %}
{% error message: "Something went wrong!", details: more_details %}
{% error %}{{ count | append: "things went wrong!" | json }}{% enderror %}

{% log "Something went wrong!" %}
{% log calculated_message %}
{% log "Something went wrong!", more_details %}
{% log message: "Something went wrong!", details: more_details %}
{% log %}{{ count | append: "things went wrong!" | json }}{% enderror %}

Read more

Liquid performance profiling now available

To help understand why a task script might be taking a long time to run, we now make Liquid's profiling feature available. Enabling this task option results in timing data being recorded for the Liquid rendering of a task run. For each Liquid statement, the line number and render time is recorded, lending insight into where time is being spent across the task script.

Read more

Mechanic now supports publishing to sales channels

Tasks may now publish and unpublish items to any sales channel in Shopify. No special task configuration is needed; simply write GraphQL queries and mutations that address publications.

Example tasks