How to send unique id in email

Step 1 Insert record?
Step 2 Send email?

If so check out what I posted here using RETURNING