Hello, I’m looking for some guidance on the formatting for custom arguments using Cobubble’s Sendgrid plugin.
My variables contain information on a number of movies, and this info is pulled from a list that users will create, so I can’t predict how many variables will actually be sent in the email. However, the email will contain a poster and information for each movie that the user includes in their list, and I’ve filled out the maximum number of variables (40), in case a user’s list is that long.
What I’d like to do via the custom arguments is to tell Sendgrid that if there are only 4 items in the list, for example, do not make any substitutions beyond item #4. How would I write this into the value for the arguments?
Right now my test email looks like this, where you can see the broken links for where images are supposed to be, and you can see the dividers I’ve input to separate some of the dynamic data, because the list is only 2 items long, and Sendgrid is expecting 40 items:
I tried this custom argument where I specify that if a list’s count is less than a certain number, the value is a certain substitute, but I figure that this is off base, and although I didn’t receive an error message from Sendgrid when I tested this, the email didn’t come through:
If the custom arguments can’t accomplish this, any info on what can would be greatly appreciated!
This text will be hidden