It wasn’t the function of creating the notification I was having trouble with it was the triggering of the function. I needed it after the activity was created so I could get the ID. I figured out that $wpdb->insert_id works though on the bp_activity_add hook. So I got that figured out. Thanks for the reply though!