Thanks for your reply 
It’s the first time I’m trying to implement a form that posts to a database. So I was trying to use the Svelte Form Action to post to the database, and use the built in Netlify form functionality for easy e-mail notifications when a form is submitted. In case if one would fail, I would still see the submission in one place or the other.
So I tried it through a submission-created.js
but it’s not posting to the database anymore. Any idea where it’s failing? Submissions arrive in the Netlify Form Dashboard though, so that works again 
const {Client} = require("@notionhq/client")
exports.handler = async function (event) {
const notion = new Client({ auth: process.env.SECRET_NOTION_TOKEN });
const formData = JSON.parse(event.body).payload.data;
const formName = formData.get("form-name");
const name = formData.get("name");
const email = formData.get("email");
const address = formData.get("address");
const order = formData.get("order");
const total = formData.get("total");
const note = formData.get("note") === "" ? "—" : formData.get("note");
const delivery = formData.get("delivery");
const confirm = formData.get("confirm");
const new_row = {
parent: {
type: "database_id",
database_id: process.env.SECRET_DATABASE_ID,
},
properties: {
Name: {
title: [
{
text: {
content: name,
},
},
],
},
Email: {
email: email,
},
Address: {
rich_text: [
{
text: {
content: address,
},
},
],
},
Order: {
rich_text: [
{
text: {
content: order,
},
},
],
},
Total: {
number: parseFloat(total),
},
Note: {
rich_text: [
{
text: {
content: note.toString(),
},
},
],
},
Delivery: {
select: {
name: delivery,
},
},
Confirm: {
checkbox: JSON.parse(confirm),
},
},
};
await notion.pages.create(new_row);
return {
statusCode: 200,
};
};