Blank Emails when using the Microsoft Teams Channel


my demo chatbot keeps a “to-do list” for its user - like a shopping list.

I am using the Send Email skill to email the list back to the user. The emails are coming through, that part is configured fine and working :+1:.

The strange issue is that when I use the emulator the email subject and body are populated, see here -

When I use the same chatbot through Microsoft Teams the email subject and body are empty, see here -

As you can see the email subject is just plain text with no parameters.
The body is using “user memory” like this,

Hi {{}}, Here is your to-do list: {{{user.printOut}}}

Why does using this chatbot via Microsoft Teams cause this problem? Is is security related?

Thanks, Mark.

Hi @marktrinder,

Welcome to the Botpress Community Forum! Hope you will share your chat building experiences with us :confetti_ball:

I think your issue is related to how you populate the and user.printOut properties, the whole e-mail might get empty if one of these is undefined. I know that channels other than the channel web (which the emulator is based on) are returning data in a different way, for example you might find answers in event.payload.payload.payload.text, instead of event.payload.text. Make use of the bp.logger methods from the SDK to make sure the user properties are defined.

Hope this helps!
Happy Bulding :robot:

1 Like

Hi @Maxime_Joannette ,

thank you for the reply!

I decided to take my code completely out of the situation. I have created a simple bot, here -

I can send you this simple code if you need - but you can see it is very simple.

The email skill is not using any parameters other than the email address it gets from the user. All text is static.

When I use the emulator the email comes with the text.

When I use Microsoft Teams the email comes through with empt text.

Hopefully this is enough for you to see that there is definitely a weird behaviour with integration with the Teams Channel.

The last thing I tried (for your curiosity) is having a static email address in the Email Skill, here

I still get empty text in the email when using Teams.

I’m happy to do anything you need further to diagnose this. Can you replicate my simple example and confirm you get the same results?

Also, could it be some security problem with nodemailer?

Cheers, Mark.

Unfortunately, I can’t validate, but if you don’t mind, I’ll use your example to open an issue on GitHub:

I assumed you are using the latest version of Botpress, feel free to edit the issue if that is not the case.
Additionally, can you confirm there are no error logs related to that in Botpress?


1 Like

Thanks @Maxime_Joannette,

I also wanted to let you know that I enabled the Telegram Messenger channel on my Email Tester and it is working fine. So right now the WebChat & Emulator and Telegram channels are sending the email correctly. The Teams channel is still sending the blank emails. There are no error messages in the logs.

Thanks, Mark.

1 Like