How to add a 'flag link' in an email?
With the following code I managed to create the flag link to embed in the email body:

global $base_url;
$flag_url = $base_url . base_path() . 'flag/confirm/flag/my_flag/' . $nid;