Hi there,
I have an automation rule in place that checks maintenance end dates from Insight and sends an email with some information.
The problem is I want to add the details to one email and then have it sent off, currently what is it doing is sending an email 'per' line so I end up with a heap of emails.
I have a check for the lookupObjects.size being greater to 0, then a for each: smart value {{ObjectList}} to send an email which I get is doing what it should, but I just want them all in the one email.
What do I need to tweak to have all the info listed in the email body then send to the recipients.
thanks.
Check this tutorial that may help you: https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Jira-Automation-Video-Tutorial-on-how-to-send-customized-emails/ba-p/1861508
Regards
Nice, heading there right now - will loop back with questions if you don't mind.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Fabian Lim Hmmm, I sort of have something happening but not quite.
I used this in the content for the send email (remembering I am pulling values from Insight)
{{#lookupObjects}}
{{ObjectList.Product Name}} - {{ObjectList.Quantity}} - {{ObjectList.Maint End Date}}
{{/}}
Now I get an email containing the right amount of lines, but the email is just fill of
- -
AND I an getting that email for the same number of items. So it is adding something to the body of the email, but also sending the email on repeat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you are using the wrong smart value syntax. You should be using lookup objects instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmmm I use ObjectList. as the step before has Advanced Branching that has the smart value of {{lookupObjects}} and it is turned into the ObjectList variable. Other send emails I have where I don't need to loop through the results all work like this.
I'll check the link to see if there is something else wrong. The email is still being sent dozens of times also so I think the automation is wrong in general somewhere.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Fabian Lim I have this working now using this;
{{#lookupObjects}}
* {{Product Name}} - {{Quantity}} - {{Maint End Date}}
{{/}}
BUT, I still get an email with all the combined output for each item. So my test returns 15 lines in the email, but I get that 15 times?!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the for each object component is causing it to go 15:times. You should remove it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yep makes perfect sense when you see it written out?!
Thanks, of course if it is doing that same thing for each returned instance it was going to email that many times - all good now and only sending the one email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure you accept the answer this one is a very good example that others can use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.