Email trigger help

Hello, I’m having some trouble to setup the email trigger on a filling form.
I want that, after the submission of the form, the user will receive the triggered email I made by using the email the just submitted.
But I’m not that good with coding and I’m having troubles, someone can help me on this by giving the code to copypaste?

This is the code of the trigger email:
importa wixCRM from ‘wix-crm’;
//…
wixCRM.emailContact(‘RFfcCVj’, );

IDmail RFfcCVj

This is the page:
https://www.thehypegrow.com/instagram-course

Hi,

View these articles about triggered email:

Best,
Sapir

I already read both of them but still I’m not able to do it. I copy paste that code but it doesnt work. This the reason I made the post… I read all of this, I tried 2-3 times with different codes but it doesnt work

Hi,

Is this the triggered email?
Where the “name” and the “interest_area” variables?

Sapir,

Yes that’s the email. What do you mean with that question? I didnt understood

I understood your question, but that’s not my issue. Because I’m not able to send the email in the first place. The name and area_interest is to customize the email for each user, but for now I’m focusing on getting the email submitted and use it

I used the sample code on the guide and changed some variables and the email ID but it didnt worked.

import wixCRM from ‘wix-crm’;
$w.onReady(function () {
});
export function signUpButton_click(event, $w) {
wixCRM.createContact({
“firstName”: $w(‘#input4’).value,
“emails”: [$w(“#input2”).value],
“interest_area”: $w(“#input5”).value
})
.then((contactId) => {
wixCRM.emailContact(“RFfcCVj”, contactId, {
“variables”: {
“name”: $w(‘#input4’).value,
“interest_area”: $w(“#input5”).value
}
})
.then(() => {
// do something after the email was sent
})
.catch((err) => {
// handle the error if the email wasn’t sent
});
});
}
});

I solved my issue. I didnt create the onclick event on property panel.