cortni
March 25, 2019, 1:38pm
1
Hey!
Im currently trying to get notifications from a custom form connected to the data collection.
I need to change this code from sendgrid to bombbomb. I cant seem to find the const url for bombbomb. Can anyone help?
Thank you
.js File: sendGrid.js
//sendGrid.js
import {fetch} from âwix-fetchâ;
export function sendWithService(key, sender, recipient, subject, body) {
const url = âhttps://api.sendgrid.com/api/mail.send.json â;
const headers = {
âAuthorizationâ: "Bearer " + key,
âContent-Typeâ: âapplication/x-www-form-urlencodedâ
};
const data = from=${sender}&to=${recipient}&subject=${subject}&text=${body}
;
const request = {
âmethodâ: âpostâ,
âheadersâ: headers,
âbodyâ: data
};
return fetch(url, request)
.then(response => response.json());
}
Just wondering,
Why are you not using automations or do you not know about them?
With Wix Code forms connected to a dataset you can apply wix Automations, to do this go to;
Wix Dashboard
Customer Management
Click automations (under manage).
Add new automation
Wix Code Contact Form
Follow the prompts to set it up
Let me know if im off the mark or there is another reason and we will re visit the code.
Cheers
cortni
March 25, 2019, 4:52pm
4
Thank you for your reply.
This is perfect. I had obviously went off into a bubble following what someone else had said, lol.
Thanks again!
No worries at all,
Tag me in future posts if needed
Hi, I have developed a very simple solution for wix database integration into zapier and from thereon you can put it across to any other app in zapier (such as gmail / crm / spreadsheet etc)
An example of the same can be found at â https://jaosh8.wixsite.com/wixsite