Triggered Email to Contacts does not work

Hi,

I implemented the tutorial and code mentioned here https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-contacts

However, when I try to send an email, I am getting an error contactId does not match current session contact (401)

I am not sure what I am missing here - I checked each aspect of the code but couldnt find any issues. I have an open downloads page where I have an email and button for submission. I want the user to get an welcome email when they submit their mail id. I have a email input and button and its connected to a dataset. I can confirm that the data is going to my dataset.

I would appreciate any help in what I am missing here or is this a bug with the Wix CRM?

Thanks
Titash