Mechanic
πŸ“£ Shopify REST Deprecation
  • ⛩️Introduction
  • πŸ€“Hire a Mechanic developer
  • πŸ’―status.mechanic.dev
  • πŸ“£Shopify is deprecating the REST API
  • πŸ™‹"I need something custom!"
  • πŸ§‘β€πŸ’»"I need help with my custom task!"
  • πŸ€–"I need help with my AI-written task!"
  • Resources
    • ⬇️Install Mechanic
    • πŸ§‘β€πŸ’»Task library
      • Contributing
      • Requesting
    • πŸš€Slack community
    • 🀝Partner directory
    • 🧠Tutorials
      • Video walkthroughs
        • Auto-tag orders by originating staff member
        • Maintain a tag for orders processed today
        • Auto-tag orders with their tracking numbers
        • Sync inventory for shared SKUs
        • Auto-tag products when their SKU(s) change
        • Auto-publish new products
        • Email a report of customers who haven't ordered in X days
        • Upgrading a Mechanic task: Adding a time delay
        • Email the customer when tracking numbers are added to their order
        • Adding an optional time delay to your Mechanic task
        • Delete all orders
        • Send an email when a specific product is shipped
        • Send recurring reminders about unpaid orders
        • Send an email when a product's price goes below its cost
        • Auto-tag customers by sales channel
        • Creating products in bulk
      • Creating a Mechanic webhook
      • Practicing writing tasks
      • Triggering tasks from a contact form
      • Creating scheduled CSV feeds
      • Fetching data from a shared Google sheet
    • πŸ†Converting tasks from Shopify REST to GraphQL
      • Conversion: Single resource lookups
      • Conversion: Resource loops to paginated queries
      • Conversion: Connections from a resource
      • Conversion: Metafield lookups from a resource
      • Conversion: Resource lookups in task option fields
  • Core Concepts
    • Events
      • Topics
      • Parent and child events
    • Tasks
      • Subscriptions
      • Code
        • Environment variables
        • Action objects
        • Error objects
        • Log objects
      • Options
        • Custom validation
      • Previews
        • Defining preview events
        • Stub data
      • Shopify API version
      • Advanced settings
        • Documentation
        • JavaScript
        • Perform action runs in sequence
      • Import and export
      • User Form
    • Actions
      • Cache
      • Echo
      • Email
      • Event
      • Files
      • Flow
      • FTP
      • Google Drive
      • Google Sheets
      • HTTP
      • Integrations
        • Report Toaster
      • Shopify
      • File generators
        • Base64
        • PDF
        • Plaintext
        • URL
        • ZIP
    • Runs
      • Scheduling
      • Concurrency
      • Ordering
      • Retries
    • Interacting with Shopify
      • Responding to events
        • Reconciling missing events
      • Reading data
        • ⚠️Liquid objects
        • πŸ†GraphQL in Liquid
        • Bulk operations
        • The Shopify action
      • Writing data
      • Shopify admin action links
      • API rate limit
      • API versions
  • Platform
    • πŸ”†Policies
      • Data
      • Plans
      • Pricing
      • Privacy
    • Cache
      • Cache endpoints
    • Email
      • Receiving email
      • Custom email addresses
      • DMARC
      • Email templates
    • Error handling
    • Events
      • Event topics
      • Event filters
    • GraphQL
      • Basics
        • Shopify Admin API GraphiQL explorer
        • Queries
        • Mutations
        • Pagination
      • Bulk operations
    • Integrations
      • Appstle Subscriptions
      • Google Drive and Google Sheets
      • Judge.me
      • Locksmith
      • Report Toaster
      • Shopify Flow
      • Run links
    • Liquid
      • Basics
        • Syntax
        • Data types
        • Variables
        • Comments
        • Filters
        • Operators
        • Control flow
          • Condition
          • Iteration
        • Whitespace
      • Liquid console
      • Mechanic filters
        • Deprecated filters
      • Mechanic keyword literals
        • array
        • hash
        • newline
      • Mechanic objects
        • Action object
        • Cache object
        • Event object
        • Options object
        • Task object
        • ⚠️Shopify REST Admin API
          • 🚫Article object
          • 🚫Blog object
          • 🚫Collection object
          • 🚫Customer object
          • 🚫Discount code object
          • 🚫Dispute object
          • 🚫Draft order object
          • 🚫Fulfillment object
          • 🚫Fulfillment order object
          • 🚫Fulfillment event object
          • 🚫Gift card object
          • 🚫Inventory item object
          • 🚫Inventory level object
          • 🚫Line item object
          • 🚫Location object
          • 🚫Metafields
            • Metafield object
            • Metafield representation object
            • Metafield collection object
          • 🚫Order object
          • 🚫Order risk object
          • 🚫Price rule object
          • 🚫Product object
          • 🚫Product image object
          • 🚫Refund object
          • 🚫Shipping zone object
          • 🚫Shop object
          • 🚫Theme object
          • 🚫Theme asset object
          • 🚫Transaction object
          • 🚫Variant object
      • Mechanic tags
        • liquid
        • action
        • assign
        • error
        • log
      • Mechanic code snippets
    • Shopify
      • Custom authentication
      • "Read all orders"
    • Webhooks
  • Techniques
    • Preventing action loops
    • Writing a high-quality task
    • Tagging Shopify resources
    • Debouncing events
    • Responding to action results
    • Working with external APIs
      • JSON Web Signatures
      • AWS request signatures
    • Finding a resource ID
    • Migrating templates from Shopify to Mechanic
    • Securing Mechanic webhooks
    • Monitoring Mechanic
  • FAQ
    • The app isn't loading. What do I do?
    • How do I stop a large batch of runs?
    • A Shopify event is missing. Where is it?
    • Does Mechanic have an affiliate program?
    • Can non-owners install Mechanic?
    • Can I replace Shopify's order emails with Mechanic?
    • Can I manually set Shopify permissions for Mechanic?
    • Does my theme need to be updated for Mechanic?
    • Do you have a plan for development stores?
    • Why don't I see any events in my task's activity?
    • Can I read data back from my webhook submission?
    • My task added a tag, but now the tag is missing – why?
    • How do I add an unsubscribe link to my emails?
    • How do I send images with my emails?
    • Can I re-send order confirmation emails with Mechanic?
    • Why am I seeing a different price than on the app store?
    • Do you have a Partner-friendly plan?
    • Why are my tasks delayed or not running?
    • My task is failing because of a permissions problem. Why?
    • How do I preview email attachments?
    • Can I query external APIs?
    • Why can't I access the Shopify API during preview mode?
    • How do marketing preferences work with Mechanic?
    • Can I send data to Google Sheets?
    • What's possible with timeline comments?
    • I'm getting a "query param length is too long" error when using GraphQL.
    • Can my Mechanic concurrency limit be raised?
    • What IP address does Mechanic use?
    • Can Mechanic read or manage customer subscriptions?
    • Why is everything harder now?
    • Can task content be translated into multiple languages?
    • Can I add a time delay to my task?
    • Can I add another store to my existing Mechanic subscription?
    • How can I reduce memory usage of my task?
    • How do I connect PayPal to Shopify with Mechanic?
    • How do I add a Shopify access scope to my task?
    • Can I have my Mechanic data retained for more (or less) than 15 days?
Powered by GitBook

Important Updates

  • πŸ“£ Shopify REST Deprecation
On this page
  • Can Mechanic help me?
  • How does Mechanic work?
  • Tasks, events, and actions
  • Liquid
  • Run queues

Was this helpful?

Edit on GitHub
Export as PDF

Introduction

I'm glad you're here. :) –Isaac

NextHire a Mechanic developer

Last updated 1 year ago

Was this helpful?

Mechanic is a Shopify development and automation platform.

  • for an off-the-shelf solution

  • for a task that fits you perfectly

  • if you need something else

Find Mechanic on the Shopify App Store:

Can Mechanic help me?

Mechanic is a Shopify development and automation platform, which comes with a rich – and our users write their own custom tasks every day. Let's find out if Mechanic might work for you.

  1. Are you working on something Shopify-related?

    • Mechanic is only available for Shopify.

  2. Is what you're looking for already available from ?

    • We have hundreds of common scenarios already handled with pre-written, open-source, modifiable, off-the-shelf tasks.

  3. As far as your problem concerns Shopify data, is what you want to do supported by the ?

    • Mechanic's toolkit goes beyond Shopify's APIs, but a Mechanic task can only interact with Shopify data in ways that Shopify supports.

  4. Are you open to ?

    • Whether you need a developer or already have that covered, the path to creating a custom Mechanic task is well-established.

That list wasn't exactly a formal flowchart, but we hope it's helpful as you're evaluating Mechanic for your purposes. At its best, Mechanic is a platform and toolkit that you go to, and return to, when you hit the limits of the Shopify admin. And it's a community that collectively has learned how to solve many, many kinds of problems. (Join our !)

How does Mechanic work?

Tasks, events, and actions

Liquid

Run queues

Got a question you need answered now? πŸ’¬

A developer writes – Mechanic's term for a piece of automation. These tasks can respond to many different , like a Shopify webhook, a manual trigger, a regular interval (e.g. hourly, daily), or an incoming email. Tasks use to signal their interest in specific event types.

When a task receives an incoming event, it can choose to generate an – an operation that has an effect.

The action makes changes to a Shopify store, like tagging, publishing, creating or deleting resources. It provides direct and complete access to Shopify's admin API, with support for both REST and GraphQL.

The action is for sending email. It supports custom templates, and attachments.

The action is for uploading files to an FTP or SFTP server. These files may be generated by the task, or can be fetched from external locations.

The action performs any request, to any HTTP endpoint. This facilitates integration with third-party APIs.

The action generates a variety of file formats, including PDF, CSV, ZIP, and anything retrieved from a public URL. Files generated this way receive a temporary URL of their own, and can be fed into other tasks for further processing.

For a complete list of supported actions, see .

Mechanic makes heavy use of – a template language created by Shopify. Its primary use is in . In the same way that a Liquid theme receives browser requests and renders HTML, a Mechanic task receives events, and renders actions (by defining them with JSON).

In Mechanic, our Liquid implementation includes additional support for constructing and , and includes many useful , making data processing more efficient.

Mechanic performs work using queues of , with no limit on how large each queue can become. If there is a sudden surge of incoming events for a Shopify store, the store's dedicated Mechanic queue could become delayed. This is an important difference between Mechanic and many other systems: in a high-traffic period, Mechanic will never refuse incoming events for a store; instead, it will process each one as soon as possible, by putting them into a run queue. The rate at which Mechanic processes work varies, depending on and the .

⛩️
Search the task library
Learn about "going custom"
Ask in our community Slack workspace
apps.shopify.com/mechanic
library of pre-written automation tasks
Mechanic's task library
Shopify Admin API
going custom
community Slack workspace
Join our Slack workspace.
tasks
events
subscriptions
action
Shopify
Email
FTP
HTTP
Files
Actions
Liquid
task code
runs
concurrency
Shopify API rate limit
filters
arrays
hashes