How to send invoices to a different email via customer metafields?

I want to create a flow that will send an invoice to an email address that’s set in a customer metafield

Lets assume we have a customer metafield called ‘accounts email’

I want a flow set so that when a customer placed an order to check if this metafield exists on the customer

and if so, send an invoice email to the email address set within the metafield

really not sure where to start so would appreciate the help please!

Hello Leigh,
When it comes to triggering emails using specific metafields Shopify Flow’s B2B flows are probably the best place to start. A lot of our Customer Fields clients with B2B tagging needs use our custom field metafield tags and then couple them with the flexibility of Shopify Flow.
I hope this helps.

@LeighVSS Here is how you could do something similar:

  • order created trigger

  • use Foreach action and loop over each Item in order.customer.metafields

  • condition to check metafield Namespace is equal to your key

  • if true use the send email action with {{metafieldsForeachitem.value}} for the recepient email