Execute scripts when invitations are created or accepted.