Email different content sections if row meets certain criteria

I know it’s possible to email an entire esction. But what If I’d like to email one section or the other if the row meets certain criteria. For example, if this row is tagged “Green”, the emails body would have the green section. Same if it were tagged, “Red”.

It seems I can add a section as body, but it’s not working within a conditional “If green, email this section, otherwise, this other section”. I’m placing the sections within brackets [Green Section] but it’s not taking.

Any ideas?

You’re right. Sections are supported if only a section is in the body content. Any formula there will break this functionality. I believe this is due to more styling being done with sections verses other items.

A way to make this work though is to create two buttons, one for each scenario. Then you can set the “Disable If” on each of them, so only one shows up as enabled per row.

Lastly, to make it easier to use, you can create a “Push Button” that will push either of the other two, or both if you have one disabled. You can hide the other two buttons so you only ever see the one push button.

1 Like

Given what @BenLee said, maybe you could try writing your IF outside of the GMail::Send formula, e.g.:

Type.Switch(
  "Red", GMail::Send(..., Section Red,...),
  "Green", GMail::Send(..., Section Green,...),
  "Blue", GMail::Send(..., Section Blue,...)
  ...
)
1 Like