[ { "label": "Save customer emails to Arigato database based on tags", "trigger_type": [ "customer_created", "customer_updated" ], "object_type": "customer", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "customer.tags_array", "settings": { "multiple": "any", "operator": "equals", "value": "my-tag", "long_value": "", "token_object_type": "customer", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "shop.database", "settings": { "multiple": "any", "key": "special_customers", "operator": "not_equals", "value": "{{ customer.email }}", "token_object_type": "customer", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "database_key_value", "settings": { "wait": "0", "custom_wait": "", "resource_type": "shop", "resource_id": "", "key": "special_customers", "value": "{% set special_customers= shop.database['special_customers'] %}\r\n{{special_customers}},{{ customer.email }}", "token_object_type": "customer" }, "weight": 999, "target_key": "customer" } } } }, "shared_workflow_id": 38893 }, "description": "This automation will cumulatively save customer emails to database field if they contain a pre-defined tag" } ]