Send Email from Template block - Blank template values

This started last night. I have not changed the code related to any of the places I’m getting this error.

I did a quick test in one place to confirm it is not the code -

When this runs, I get two emails. The first email is just the values I would expect from the object (weekNumber, shipmentTotal, savings, averageSavings, savingsShipments).

The second email comes with the template text, but all the places the template values should be are blank.

Thanks,
Tim

Hi Tim,

Is the problem that the template values are blank?

Regards,
Mark

Yes. The emails get sent with blank values.

Could you please add some logging to record the template values and make sure the values are actually there?

I did. If you look above I send myself an email with the values and those come through.

Also. This is not an isolated issue with this logic. It’s happening in several places. And this isn’t new code. It has been working for months.

Could the “shipmentCountList” and “shipmentSavingsList” be changed by some other logic?

The test of sending an email with the values does not technically prove that the data is there. By the time logic gets to the “Send Email from Template”, the underlying lists could have been modified by some other logic.

Alternatively, you could save the object you create for “Send Email” in a variable and use that variable in “Send Email from Template”.

I added the “create text with” blocks, and it now works.

Did you change anything? I have other logic that also uses the Send Emial from Template block that sends me an email every hour so I can pinpoint the day and hour when it stopped working.

Tim

Glad it works. We changed absolutely nothing.

It is really strange. I also didn’t change anything.

Looking at another example, you can see in the middle of the night (for me), the code stopped sending template values that are not strings -

Look at Completed and Rows where I highlighted. The emails sent at 1:55 and 2:55 both show “Competed” as true (boolean) and Rows (numeric). At 4:55 am “Completed” and “Rows” are blank.

Hello @Tim_Jones

Let me clarify - is sending email currently working as you expect?

Regards,
Vladimir

No, it is not working as expected. I can only send text values to the template. That is not what the docs say, and not how it use to work.

https://backendless.com/docs/js/email_send_email_with_templates_api.html

New API I created to test this -

Email template -

Resulting email -

image

Am I missing something?

Tim

Hello @Tim_Jones

I was able to reproduce the problem. I opened a ticket for the team to investigate the problem.

Regards,
Vladimir

Thanks @Volodymyr_Ialovyi. Please let me know what you find out.

Tim

If this update on your slack channel was in real-time, it happened just after the 7.0.5 version was released. This announcement was from 10/26 at 4:10am. My 4:55 am update no longer showed non-string values.

Hello @Tim_Jones

Our developers have already made a fix. Once our QA checks it we release it to the prod and notify you here on the topic.

Regards,
Inna

Thanks for the update!

Hello @Tim_Jones

We’ve just updated cloud servers with a fix for the issue you described above. Could you kindly let us know whether fix works for you well?

Regards,
Inna

Thanks for letting me know. I tested it, and it works!

Can you provide any more information about what happened?

Tim

Hi @Tim_Jones ,

The issue you encountered was related to a recent update where we introduced a new feature for email notifications. Unfortunately, it led to an unintended regression. We have since rectified the problem, and your confirmation that the fix worked is greatly appreciated.

Regards,
Viktor