How to use IF and ENDIF conditional statements in Sendgrid app?

Hello Airtable community,
How to use IF and ENDIF conditional statements in Sendgrid app with html ?
I tried :
{% if {name}== null or {name}== ‘’ %}NO NAME CONTENT{% else %}WITH NAME CONTENT{% endif %}
but all the code is shown.

Welcome to the community, @Nadia_Ouali!

You can’t do conditionals with the SendGrid app, because that code is not HTML. That code is some other language:

You could perhaps create an Airtable formula field and write a conditional formula there, and then embed that formula field into the SendGrid app.

If that doesn’t work for you, you can potentially write a custom JavaScript to do what you’d like.

You could also use an external automation tool like Integromat which has full support for SendGrid and Airtable, and gives you the ability to create conditional logic in your automations.

1 Like

Than you ! I will use an Airtable formula field.

1 Like

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