I am attempting to create a Flow that updates Order metafield with a value from Company Location. The intent is to capture a Bill To Email on orders.
The trigger is Order Created
The Action is Update Order Metafield
Metafield namespace: custom
Key: bill_to_email
Value: I am attempting to pull in a metafield value from Company Location. This seems to pull the correct value.
{% for metafields_item in order.purchasingEntity.PurchasingCompany.location.metafields %}
{{metafields_item.value}}
{% endfor %}
Type: Single line text (Both the source and target metafields are also single line text)
The correct value is pulled however it returns the following error. (both the source and target metafields are single line text and the value looks to me like it is single line text)
Got error updating metafield: “Value must be a single line text string.” For value: “\n kara@tinkercoffee.com\n”, Type: single_line_text_field
SOLVED: This thread solved the issue and removed the /n.



