Changelog

Follow up on the latest improvements and updates.

RSS

We're excited to announce two new actions that bring Google Workspace integration to Mechanic: the
Google Drive action
and the
Google Sheets action
!
Google Drive Action
Upload files in Google Drive directly from your Mechanic tasks. The Google Drive action supports:
Example usage:
{% action "google_drive" %}
{
"account": "user@example.com",
"uploads": {
"overwrite": true,
"simple.txt": "This is a simple text file",
"report.pdf": {
"pdf": {
"html": "<h1>Monthly Report</h1><p>This is a PDF generated from HTML</p>"
}
}
}
}
{% endaction %}
Google Sheets Action
Interact with the Google Sheets API!
1. Append Rows
Add new rows to existing spreadsheets:
{% action "google_sheets" %}
{
"account": "user@example.com",
"operation": "append_rows",
"spreadsheet_id": "your-spreadsheet-id",
"sheet_name": "Sheet1",
"rows": [
["Column1", "Column2", "Column3"],
["Value1", "Value2", "Value3"]
]
}
{% endaction %}
2. Create Spreadsheet
Create new spreadsheets with initial data:
{% action "google_sheets" %}
{
"account": "user@example.com",
"operation": "create_spreadsheet",
"title": "New Spreadsheet",
"rows": [
["Column1", "Column2", "Column3"]
]
}
{% endaction %}
3. Export Spreadsheet
Export spreadsheets in multiple formats:
{% action "google_sheets" %}
{
"account": "user@example.com",
"operation": "export_spreadsheet",
"spreadsheet_id": "your-spreadsheet-id",
"file_type": "xlsx" # Supports xlsx, csv, pdf, html, ods, tsv
}
{% endaction %}
Getting Started
To use these actions:
  1. Navigate to your Mechanic account settings
  2. Click on Authentication
  3. Connect your Google account
These actions follow Google's rate limits and best practices, ensuring reliable performance for your automation tasks.
For detailed documentation and more examples, visit our docs.
Check out the demonstration tasks in the task library: Google Drive and Google Sheets.
When preparing event webhooks to send to apps like Mechanic, Shopify uses payloads as defined by a specific version of their Admin API.
Effective immediately, Shopify events in Mechanic now use webhook payloads from version 2024-10 of the Shopify Admin API.
⚠️ Historically, Shopify has based these payloads on REST Admin API resource representations. Per Shopify: The REST Admin API is a legacy API as of October 1, 2024. Moving forward, webhooks have their own definition and documentation, located at https://shopify.dev/docs/api/webhooks.
Breaking changes
Shopify has not noted any breaking changes to event webhook payloads in this version.
Read more
Hey everyone! Shopify is
deprecating parts of the Admin REST API
, starting with product and variant endpoints. These endpoints will stop working on
February 1, 2025
.
🔄
What’s changing?
  • Shopify is moving away from REST and focusing on
    GraphQL
    . By Feb 1, 2025, task code using product and variant REST liquid objects
    must switch to GraphQL
    .
  • GraphQL brings
    better performance and scalability
    —it’s great for large product catalogs and allows for
    more efficient data retrieval
    . Most complex tasks are already using GraphQL, so this change aligns with where Shopify is headed.
🎉
Library tasks—easy upgrade:
  • If you’re using
    library tasks
    , the transition will be
    simple
    . In most cases, you’ll just need to
    click a button
    to upgrade them.
  • We’ve already updated the first batch of tasks—check them out here: https://github.com/lightward/mechanic-tasks/pull/393
đź› 
Custom tasks—here’s what you need to do:
đź—“
You’ve got plenty of time to update before February 1, 2025
, and the community is here for you if you have questions! You can join our Slack community here: https://learn.mechanic.dev/resources/slack.
  • csv filter
    : Now accepts an optional
    delimiter
    argument, defaulting to a comma.
  • parse_csv filter
    : Now accepts a
    delimiter
    option, defaulting to a comma and a
    headers
    option to interpret the first line as headers.
Example Usage
csv filter
Default usage
(no arguments):
{% assign csv = rows | csv %}
With custom delimiter
:
{% assign csv = rows | csv: ";" %}
parse_csv filter
Default usage
(no arguments):
{% assign orders = csv_string | parse_csv %}
With headers only
:
{% assign orders = csv_string | parse_csv: headers: true %}
With custom delimiter only
:
{% assign orders = csv_string | parse_csv: delimiter: ";" %}
With headers and custom delimiter
:
{% assign orders = csv_string | parse_csv: headers: true, delimiter: ";" %}
[edit] It looks like this change has varying impact. For community discussion on this, join this Slack thread.
Read more
For all future edits to tasks, the staff member’s name will be listed in the version history. Previously, these edits were attributed to “a Shopify user”. This update makes it easier to track changes made by specific team members, and is particularly valuable to those developing custom tasks for merchants.
When preparing events to send to apps like Mechanic, Shopify uses resource representations from specific versions of their REST Admin API.
Effective immediately, Shopify events in Mechanic now use resource representations from version 2024-07 of the REST Admin API.
Breaking changes
Shopify has not noted any breaking changes to REST resource representations in this version.
However, this release does introduce the deprecation of Checkout, which has impact for shopify/checkout/* events.
Read more
The "date" filter in Mechanic Liquid now supports these additional options:
  • beginning_of_year, end_of_year
  • beginning_of_quarter, end_of_quarter
  • beginning_of_month, end_of_month
  • beginning_of_week, end_of_week
  • beginning_of_day, middle_of_day, end_of_day
  • advance
The "advance" option is worth special mention: it allows for timezone-aware date calculations that start from any provided time (or from
"now"
). The date value may be advanced positively or negatively, using any combination of years, months, weeks, days, hours, minutes, and seconds. Years, months, weeks, and days are all treated as variable-length intervals, appropriate for the relevant timezone.
With this change, the "date" filter no longer requires a format argument. If one is not provided, the filter outputs the date formatted per ISO8601.
This extension came straight out of the Futures board. Thanks Brad!
Read more
When preparing events to send to apps like Mechanic, Shopify uses resource representations from specific versions of their REST Admin API.
Effective immediately, Shopify events in Mechanic now use resource representations from version 2024-04 of the REST Admin API.
Breaking changes
Shopify has not noted any breaking changes to REST resource representations in this version.
However, this release does introduce important deprecations:
Read more
Mechanic's Events screen has new capabilities:
  • Sorting by time: newest to oldest, oldest to newest
  • Filtering by date: after a certain time, before a certain time
  • Filtering by error types: event errors, task errors, action errors
  • Filtering by event topic: exact matches, prefix matches
  • Filtering by task: task ID, errors associated with that specific task ID, actions generated by that specific task ID
  • Filtering by keyword search: event IDs, Shopify global IDs, webhook request IDs, excerpted event data
  • Cmd/Ctrl/Shift-click support for opening event results in new tabs or windows
  • Keyboard shortcut (M) for loading more events
All view parameters are reflected in the browser's address bar, allowing for easy bookmarking and sharing of event query results.
I'm excited to give this to y'all. :) Happy Friday from New Zealand! -Isaac
Load More
→