Sendgrid email custom action help

Hi guys,

I hope you’re well.

Not a coder here so please bear with me.

Ive got a custom action on my app that pulls info from a database and sends it to sengrid. Two of the data items are email addresses, one as a to: and one as CC:.

I require that if one of the fields is blank, it’ll go to the other, is this possible? They could both be TO: or CC:, it doesn’t matter to me, but currently I’m getting the error as per the below vid.

Also here is another vid showing my code:

Thanks for your help in advance, Ive only got this far with help from here and by logicing my way through it :rofl:

You could have separate custom actions and separate buttons. Then have custom visiblity on buttons. So first button is only visible if to = empty, and the second button is if to = not empty. Then you send them to the correct custom action as a result of which button they pressed.

Thank you, that sounds like a reasonable workaround, however when I copy the button with the custom action on and change the code, it changes it for both the copied button and the original! This must be a bug??

It’s how it works. Make a new custom action for the separate button.

Ok, is there a simpler way than copying out all the code again?

I think you need to copy it out unfortunately

Ok no worries, thanks for your help :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.