[ { "version": 1, "label": "Track price changes with Airtable", "trigger_type": [ "product_created", "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "2": { "field": "product.twig_condition", "settings": { "title": "Check if any of the variant prices has changed.", "value": "{% for product_variant in product.variants if product_variant.database.price != product_variant.price %}\r\n true\r\n{% endfor %}\r\n", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "trigger_child_workflow", "settings": { "target_path": "product.variants", "exported_workflow": { "version": 1, "label": "Variant subworkflow", "trigger_type": [ "manual" ], "object_type": "product_variant", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "product_variant.price", "settings": { "operator": "not_equals", "value": " product_variant.database.price", "token_object_type": "product_variant", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "airtable_insert_record", "settings": { "token_object_type": "product_variant", "base_id": "appyKpLxDtDnDh11K", "table_id": "tblNoVLZSXUYLwhQt", "bases_tables_show_disabled_fields": "show", "fields": { "fldCwEkZzBB5BzLJc": "{{ product_variant.product_id }}:{{ product_variant.id }}", "flduFNKKxacbxYy9B": "{{ product_variant.title }}", "fldZREZtljQW5wTD1": "{{ product_variant.database.price|plus(0)}}", "fldcJzhoeBH3XDYJA": "{{product_variant.price}}", "fldPtn0Jmbwl1pBxA": "{{parent.updated_at}}", "fldPtn0Jmbwl1pBxA_additional_form_elements": { "check_date": [] } }, "wait": "0", "cw_timezone": "Africa\/Nairobi", "custom_wait": "" }, "weight": 999, "target_key": "product_variant" }, "2": { "type": "product_variant_set_database", "settings": [], "weight": 1009, "target_key": "product_variant" } } } } } } }, "weight": 999, "target_key": "product" } } } }, "instructions": "To get started, you will need to have the Airtable base and table defined with the specific columns to store the product ID, title, old and new price.\r\n" }, "description": "This workflow is fired every time a product is updated; it checks the current price against a saved value to see if it has changed and exports it to Airtable. With this automation, you can easily track specific product price changes from a single view within Airtable." } ]