Triggered email problems

Hello community
Slowly understanding code with your help… but … I am having issues with Triggered Emails. I was able to create most of it, but apparently, I am doing something wrong since the trigger won’t go.

I want my clients’ customers who request a quote to fill in a WIX FORM on the website and I want to send an email (created with Triggered Emails) to be sent to someone in the company. Below is my code (which doesn’t seem to show any errors).

Apparently, this version is to send to a member, but I didn’t get how it knows “which member”. When I try changing it to enter a member’s ID, it does an error.

Thanks in advance for your time

import { triggeredEmails } from ‘wix-crm’ ;
import { currentMember } from ‘wix-members’ ;

$w . onReady ( function () {
$w ( “#dataset1” ). onAfterSave ( async () => {
const member = await currentMember . getMember ()
if ( member ) {
const memberId = member . _id ;
triggeredEmails . emailMember ( “quoteRequest” , memberId , {
variables : {
input21 : $w ( “#input21” ). value ,
input11 : $w ( “#input11” ). value ,
input8 : $w ( “#input8” ). value ,
input2 : $w ( “#input2” ). value ,
input10 : $w ( “#input10” ). value ,
input15 : $w ( “#input15” ). value ,
input4 : $w ( “#input4” ). value ,
input20 : $w ( “#input20” ). value ,
textbox1 : $w ( “#textBox1” ). value ,
input24 : $w ( “#input24” ). value ,
input3 : $w ( “#input3” ). value ,
input14 : $w ( “#input14” ). value ,
input13 : $w ( “#input13” ). value ,
input18 : $w ( “#input18” ). value ,
input17 : $w ( “#input17” ). value ,
dropdown2 : $w ( “#dropdown2” ). value ,
input23 : $w ( “#input23” ). value ,
dropdown1 : $w ( “#dropdown1” ). value ,
input9 : $w ( “#input9” ). value ,
input12 : $w ( “#input12” ). value ,
input22 : $w ( “#input22” ). value ,
input5 : $w ( “#input5” ). value ,
input19 : $w ( “#input19” ). value ,
}
})
}
});
});