I saw a post in the Flowmattic Facebook group about adding notes to FluentCRM using Flowmattic and knew this was possible given how expandable FluentCRM is and the work i’ve done on tag manager etc for SureCart.
Given how flexible Flowmattic is too with its PHP function integration that was how I choose to do this so after checking the documents and looking at the models in the docs https://developers.fluentcrm.com/database/models/subscriber-note/ i knew it was \FluentCrm\App\Models\Subscriber
and then FluentCrm\App\Models\SubscriberNote
I would need to do this I settled on the following snippet
function add_custom_note_to_fluentcrm_user($user_input, $note_content, $note_type = 'custom', $note_title = 'Note') {
if (!class_exists('\FluentCrm\App\Models\Subscriber')) {
return new WP_Error('fluentcrm_missing', 'FluentCRM is not active.');
}
// Normalize input to email
$email = '';
if (is_numeric($user_input)) {
$user = get_user_by('ID', $user_input);
$email = $user ? $user->user_email : '';
} elseif (is_object($user_input) && isset($user_input->user_email)) {
$email = $user_input->user_email;
} elseif (is_string($user_input) && is_email($user_input)) {
$email = $user_input;
}
if (!$email) {
return new WP_Error('invalid_user', 'Invalid user input provided.');
}
// Get the contact
$contact = \FluentCrm\App\Models\Subscriber::where('email', $email)->first();
if (!$contact) {
return new WP_Error('no_contact', "No FluentCRM contact found for email: $email");
}
// Create the note
\FluentCrm\App\Models\SubscriberNote::create([
'subscriber_id' => $contact->id,
'type' => $note_type, // group/category (e.g. 'invoice')
'title' => $note_title, // visible label (e.g. 'Invoice Sent')
'description' => $note_content,
'created_by' => get_current_user_id(),
]);
return true;
}
PHP
Now adding a new PHP Function integration setup like below is all i need to be able to add a note to any contact using just there email address in any of my workflows.

You can view the code in action and watch me build this out in the video below