N
Novu•11mo ago
bjornaer

Can a variant condition read the digest step variables?

can I have an email variant step, which is used if the condition is step.total_count greater than 2 or step.digest Equal true? I tried setting it up, but nothing happened, maybe I need to use {{ }}? Or maybe those values are not accessible by the variant check?
8 Replies
bjornaer
bjornaerOP•10mo ago
happy to share my custom code email
Tomer Barnea
Tomer Barnea•10mo ago
@Engineering can we get your help here today? 🙂
Gali Baum
Gali Baum•10mo ago
It is accessible, but only in the Value side of a condition, not in the Key. Something like this where you add the key in the payload when you trigger
No description
empe
empe•10mo ago
@bjornaer Do you mind sharing the custom code email content?
bjornaer
bjornaerOP•10mo ago
hi everyone, I solved it using if checks directly inside the custom code section, I actually solved it speaking with @Tomer Barnea on Novu's chat widget.
Pawan Jain
Pawan Jain•10mo ago
Hi @bjornaer Thanks for sharing the use case. Currently, conditions based on digest variables are not supported. Only workaround is to use if/else in step content editor as you used
Linear
Linear•10mo ago
Issue DVRL-160 created.
bjornaer
bjornaerOP•10mo ago
understood! thanks @Pawan Jain for clarifying and creating the issue for docs
Want results from more Discord servers?
Add your server