Using newly inserted values in trigger function in PostgreSQL
Within the trigger function you can use NEW.column_name to refer to the newly inserted / updated value.  In the reverse, OLD.column_name will refer to the value prior to the update / delete.

More info here: https://www.postgresql.org/docs/current/static/sql-createtrigger.html

Hope that helps.