BUG? Wix Automation Not Working With wix.users API

I have a custom signup/login page that creates a custom user database as well as creating the wix.users login credentials.

I setup up Wix Automations and activated the default: Welcome Your New Members. In the setup I changed the action from “Send email to visitors” to “Get Notified”. I also added multiple email addresses to the officers of the organization.

Here is the code that creates the wix user and the custom user database entries from our custom Sign Up form:

export function SaveToDB() {
let firstName;
let lastName;
wixUsers.register(EmailAdd, PasswordAdd, {
contactInfo: {
“firstName”: Fname,
“lastName”: Sname,
“emails”: [EmailAdd],
“phones”: [Phnum]
}})
.then((result) => {

let toSave = {
“email”: EmailAdd,
“fname”: Fname,
“middle”: Mname,
“lname”: Sname,
“address1”: Add1,
“address2”: Add2,
“city”: City,
“state”: State,
“zip”: Zip,
“country”: Country,
“phone”: Phnum,
“paymentAmount”: payString,
“mem_status”: memberStatus,
“payment_info”: PaymentMethod + " - " + payString,
“expires”: endDate,
“region”: stateRegion
}
wixData.save(“CVOA_Members”, toSave)
.then((results) => {
let item = results;
sendTrigEmail();
})
. catch ((err) => {
let errorMsg = err;
$w(“#image34”).hide();
$w(“#text178”).text = errorMsg;
$w(“#text178”).show();
});
})

Note: the sendTrigEmail notifies the new member. This works just fine.

But, while the wix Automation that notifies the rest of us DOES work, the notification contains NO data? Here is a screenshot of a new member from 6:29 this evening:


The New User WAS successfully created in the wix.users Membership showing his First Name, Last Name and Email Address. The custom CVOA_Members record was also created.

Is this a bug?

That isn’t a issue with your code and no it is not a bug!, that is just because you have simply not included the details on your Wix Automation settings.

Yes I did. I have other automations like a simple contact form that works as expected. The contact form has a Submit button. Referencing the code about the database entry is not added by a Submit button but rather the call to " wixData.save(“CVOA_Members”, toSave) ". I was told by a Wix consultant that this method will not trigger an automation. Here is a screen shot of the automation setup that shows the “include details of trigger” set to on.

Okay, then simply change the Wix Automation to another triggered one that includes the variables that you are wanting in the actual email itself.

Similar to like this.
https://support.wix.com/en/article/corvid-tutorial-sending-an-email-on-form-submission

Thanks, but been there, done that. The free Sendgrid email is flakey at best. Sometimes the mail gets sent other times it does not (get blocked). I have added the sendgrid email servers as CNAME records/aliased to my DNS provider. This has not seemed to help. As stated, the other automations work great and are reliable. Thats why I believe this is a bug. How the heck can you get a Wix developer to look at this. I thought surely that including Bug? in the title might elicit a look!

1 Like

I am having the same or a similar problem:

Automations sent from Wix are being rejected by firewalls. I have two Wix sites and they both send automated e-mail notifications when someone signs up to be a member or registers for and event. It also sends them as event reminders when an event is approaching. Finally, Invoices appear to be sent using the same mechanism.

These particular notifications sent by Wix are getting caught and bounced by SPAM filters. Some are being sent using SITE-MEMBERS. COM and others appear to be using SENDGRID to deliver them. E-mail campaigns go through just fine, it’s just the automated e-mails that get blocked.

These automated notifications do not pass DMARC in many networks so the prospective member/registrant never gets the notification. I added SENDGRID to the SPF record in DNS which installed corresponding CNAME records. Nevertheless, it is still happening.

Can anyone help with this? Thank you!

As mentioned in previous comments, if you are using the free Sendgrid plan, than that might be the problem. You should discuss this problem with the Sendgrid support team. You might need a Sendgrid premium plan.