How to read user_metadata inside trigger function when new user is created?

begin insert into public.profiles(id, username) values(new.id, new.user_metadata.username); return new; end;
This doesn't work. It says that user_metadata doesn't exist in new.

On signUp, I send data: { username }
Was this page helpful?