How to send unique id in email

I have a public website form that upon send triggers the webhook.
I want to be able to send the auto incremented ID of my postgres database entry in the subject line of the email alert i'm sending. All of this works fine. I'm just unsure what approach to take to get the ID of the entry that's triggered, then send it in the email.

Step 1 Insert record?
Step 2 Send email?

If so check out what I posted here using RETURNING

Thank you for that direction! This works for me.
Just curious if this is a good practice or not on how I'm accomplishing this?

Seems fine except note the error you should have
return requestIdVariable in that JS

1 Like