[ { "label": "Send an email with the warehouse location of each product in an order", "trigger_type": [ "order_paid" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": [], "actions": [ { "type": "email", "settings": { "token_object_type": "order", "to": "[CLICK TO EDIT]", "cc": "", "bcc": "", "reply_to": "", "subject": "{{ shop.name }} - Order Details {{ order.name }}", "plain_text": "1", "body": "{% for line_item in order.line_items %}\r\n{{ line_item.quantity }} X {{ line_item.name }} - {{ line_item.sku }}\r\n[UPDATE ME] \r\nLocation: {{ line_item.product.metafields.custom_fields.warehouse_location.value }}\r\nSet the namespace and key for your metafield.\r\nSee also: https:\/\/custom-fields.docs.bonify.io\/article\/153-developer-info\r\n{% endfor %}", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "order" } ] } ], "shared_workflow_id": 608 }, "description": "This workflow is triggered when an order is paid. It works on the assumption that you already have a product metafield that contains warehouse location values for each product. The automation works by retrieving the metafield value for each line item in the order and sending the location names via email." } ]