N
Novu3mo ago
Kelvis

Is it possible to send an email to a different email address than the subscriber one?

I want to create a workflow with two email steps: one for the subscriber and another for its superior. Is it possible?
11 Replies
Ask Inkeep
Ask Inkeep3mo ago
Hi @Kelvis, I'm an AI assistant for Novu. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Angular * Variants * Start Point * Bulk create subscribers -----------------------------
Ask Inkeep
Ask Inkeep3mo ago
Answer Yes, it's possible to create a workflow with two email steps in Novu, one for the subscriber and another for their superior. You can utilize the Variants feature to create multiple versions of an email step within a workflow, tailoring each variant to specific conditions or recipients like a subscriber and their superior (1) .
Sources [1] Variants
Kelvis
Kelvis3mo ago
While it is possible to use variants to create two different content and templates for the email, it will require triggering it twice, which I'm trying to avoid.
Ask Inkeep
Ask Inkeep3mo ago
Got it. Tagging @Support for additional help.
Tomer Barnea
Tomer Barnea3mo ago
Hey @Kelvis you can also use override (https://docs.novu.co/channels-and-providers/email/overview#sending-email-overrides), and override the email address in run time (trigger)
Pawan Jain
Pawan Jain3mo ago
@Kelvis Are you looking to send different content to these two emails or same content?
Kelvis
Kelvis3mo ago
Thanks for the response. The override does not work because it will send the message on both steps to the same recipients as the override for email concatenates the field 'to' instead of override it. It will be too different content. TRIGGER -> EMAIL TO TEAM MEMBER (Hey, you have some news) -> EMAIL TO SUPERIOR (Hey, the team member {{name}} received some news) I believe it would only be possible if we had a way to override/specify the subscriber per step
Tomer Barnea
Tomer Barnea3mo ago
@Kelvis in this case it would likely be two triggers. cc @Paweł T. @Dima Grossman
Pawan Jain
Pawan Jain3mo ago
@Kelvis Workflow can be triggered to multiple subscribers at once https://github.com/novuhq/novu/tree/next/packages/node#trigger-workflow-to-multiple-subscribers A subscriber has data field, memberType related data can be stored in subscriber custom data field. In the email step template, you can use equals handlebar helper for different content
{{#equals subscriber.data.memberType "normal"}}

normal team member content

{{else}}

superior employee content

{{/equals}}
{{#equals subscriber.data.memberType "normal"}}

normal team member content

{{else}}

superior employee content

{{/equals}}
GitHub
novu/packages/node at next · novuhq/novu
🔥 The open-source notification infrastructure with fully functional embedded notification center 🚀🚀🚀 - novuhq/novu
Kelvis
Kelvis3mo ago
That's awesome! Thanks @Pawan Jain!
Novu_Bot
Novu_Bot3mo ago
@Kelvis, you just advanced to level 2!