Using Google Sign in for Account linking , I have read user email. How do i pass this conversation data to the next intent?
app.intent("Get Signin",(conv , params, signin) =>{
if(signin.status === 'OK'){
const email = conv.user.email
conv.ask(`I got your email as ${email}. How would you like to redeem?`)
conv.ask(new Suggestions(['QR code'],['16 digit code'],['Cancel']))
}
else
{
conv.close("Please sign in to redeem");
}
})
app.intent("numcode",(conv,{num, points}) => {
const mailOptions = {
from: "abc",
to: email,
subject: "YAY!",
html: `<p>Hello !! <br> You have ${points} in (${num}). </p>`
}
transporting.sendMail(mailOptions, (err, info) => {
if(err)
{
console.log(err);
}
})
conv.ask("You have succesfully finished.");
})
I want to send a mail to the user , so what should be replaced with "to: email" or what should be added to my code.