Mechanic Get Mechanic
Task library

Auto-tag orders when paid

This task watches for newly-paid orders, and adds a configurable tag to each one.

Try this task

When it runs

Occurs whenever an order is paid

What you choose

Order tag to apply

Task code and subscriptions

You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.

Subscriptions

shopify/orders/paid
How task subscriptions work

Option types and flags

Task code

{% action "shopify" %}
  mutation {
    tagsAdd(
      id: {{ order.admin_graphql_api_id | json }}
      tags: {{ options.order_tag_to_apply__required | json }}
    ) {
      userErrors {
        field
        message
      }
      node {
        ... on Order {
          tags
        }
      }
    }
  }
{% endaction %}
Mechanic Liquid reference

Default option values

Order tag to apply
paid