I am not sure I captured the code process well, how do I get the Email ID and get this to work?
Website code
export async function pdfButton_click ( event )
wixCRM . createContact ({
“firstName” : $w ( ’ #text1860 ’ ). text , //first name of exixting user from login contact list to help wix recognise the user
“emails” : [ $w ( ’ #text1861 ’ ). text ], //email of this existing user from login contact list to help wix recognise the user })
. then (( contactId ) => {
wixCRM . emailContact ( “EMAIL ID” , contactId , {
“variables” : {
“contact.Name.First” : $w ( ’ #text1858 ’ ). text , // Name from a different database not contact list
“invoice-number” : itemrr . reference ,
“preview-link” : pdfUrl //the pdf link
}
})
. then (() => {})
. catch (( err ) => {
});
});
}
Email from wix triggered email