Mechanic is a development and ecommerce automation platform for Shopify. :)
Email Pirate Ship exports to Mechanic and add those shipping costs to orders with Report Toaster.
Runs Occurs when your Mechanic account receives an email. Configuration includes email subject, order name column, prepend pound sign to order name, and shipping cost column.
Email Pirate Ship exports to Mechanic and add those shipping costs to orders with Report Toaster.
Did you know your store has its very own email address for triggering Mechanic tasks? A store at example.myshopify.com can receive email at example@mail.usemechanic.com.
One or more attachments can be sent and will be processed as long as they meet the following requirements:
Each attachment will be parsed and sent to Report Toaster.
Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Shopifolks, everybody.
That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.
(By the way, have you seen our documentation? Have you joined the Slack community?)
mechanic/emails/received
{% comment %} An opinion about option order {{ options.email_subject__required }} {{ options.order_name_column__required }} {{ options.prepend_pound_sign_to_order_name__boolean }} {{ options.shipping_cost_column__required }} {% endcomment %} {% assign updates = array %} {% if event.preview %} {% assign update = hash %} {% assign update["name"] = "#1234" %} {% assign update["shipping_cost"] = 1.23 %} {% assign updates[updates.size] = update %} {% assign email = hash %} {% assign email["subject"] = options.email_subject__required %} {% endif %} {% if email.subject == options.email_subject__required %} {% for attachment in email.attachments %} {% assign shipments = attachment.content | decode_base64 | parse_csv: headers: true %} {% for shipment in shipments %} {% assign order_name = shipment[options.order_name_column__required] %} {% assign shipping_cost = shipment[options.shipping_cost_column__required] %} {% if order_name != blank %} {% if options.prepend_pound_sign_to_order_name__boolean %} {% assign order_name = order_name | prepend: "#" %} {% endif %} {% assign update = hash %} {% assign update["name"] = order_name %} {% assign update["shipping_cost"] = shipping_cost %} {% assign updates[updates.size] = update %} {% endif %} {% endfor %} {% endfor %} {% endif %} {% if updates != empty %} {% action "report_toaster" %} { "operation": "update", "Order": {{ updates | json }} } {% endaction %} {% endif %}
Shipping Costs
Order ID
true
Cost