# Searching Contact Notes

**URL:** <https://forum.mautic.org/t/searching-contact-notes/6431>\
**Category:** Product Support\
**Created:** [November 3, 2016, 3:35pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431 "2016-11-03T15:35:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgmoney](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kgmoney](https://forum.mautic.org/u/kgmoney)\
**Post date:** [November 3, 2016, 3:35pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/1 "2016-11-03T15:35:58Z")

</div>

Hi,  
  
  
  
Is there a way to search for contact notes? Say for example I meet with a contact and add a note that they were interested in ‘Product X’. Then the next week I can’t remember the name of the contact I spoke with. Can search for ‘Product X’ and find all contacts with ‘Product X’ in their notes?  
  
  
  
Thanks,  
  
Kevin

---

<div class="post-metadata">

**Author:** ![kgmoney](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kgmoney](https://forum.mautic.org/u/kgmoney)\
**Post date:** [November 3, 2016, 3:35pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/2 "2016-11-03T15:35:58Z")

</div>

Hi,

Is there a way to search for contact notes? Say for example I meet with a contact and add a note that they were interested in ‘Product X’. Then the next week I can’t remember the name of the contact I spoke with. Can search for ‘Product X’ and find all contacts with ‘Product X’ in their notes?

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![rbritt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rbritt/32/510_2.png) [@rbritt](https://forum.mautic.org/u/rbritt)\
**Post date:** [December 1, 2022, 2:26pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/3 "2022-12-01T14:26:25Z")

</div>

I also need a way to search for contact notes.

I need to:

1. Filter for contacts with a specific type of notes, e.g. call notes.
2. Search for a specific text in all contact notes of all contacts.

Does anybody know a way to perform this?

If this is not possible, Mautic is not really usable as CRM… that would be sad…

Thanks anyway for any answer.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [December 7, 2022, 5:44am UTC](https://forum.mautic.org/t/searching-contact-notes/6431/4 "2022-12-07T05:44:42Z")

</div>

Hi, you can’t do it right now ☹

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 11, 2024, 11:05pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/5 "2024-01-11T23:05:27Z")

</div>

Any update on this?

How about a script for terminal? @mzagmajster 🧐

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 11, 2024, 11:19pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/6 "2024-01-11T23:19:08Z")

</div>

In concept, it would be possible to do this search through an external automation platform (Zapier/Make/n8n), or through Mautic’s API, although I agree it would be much more user-friendly to have this functionality available directly within Mautic.

It is possible for Mautic to send out a webhook upon a Contact Update event. The question then would be: does Mautic consider a Note added/updated as a “Contact Update” event? I haven’t tested this yet… If yes, you could pull all notes into another log or dataset like Google Sheets with timestamped events, that you could easily search through. Still, would be so much better within Mautic directly…

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 11, 2024, 11:52pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/7 "2024-01-11T23:52:39Z")

</div>

Hi @entrepositive, @rbritt ,

a nice idea for a plugin (although it kind of feels better to extend the core for this).

I am not sure thi is gonna be of much use to anyone, but here is the sql to search the notes:

Search by text:

```auto
SELECT id, lead_id
FROM lead_notes
WHERE text LIKE '%search text%';

```

Search by type:

```auto
SELECT id, lead_id
FROM lead_notes
WHERE type = 'general';

```

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 13, 2024, 3:39am UTC](https://forum.mautic.org/t/searching-contact-notes/6431/8 "2024-01-13T03:39:39Z")

</div>

I confirm: creating a Note will not fire a Contact Update Event webhook. 😢

It is however possible to schedule a recurring API call to GET all Notes, which can then be filtered.

@mzagmajster how is the Note element related to the Contact? Is it related like a custom field? Can Mautic be modified to fire a Contact Update Event when a Note is created?

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [January 13, 2024, 10:56am UTC](https://forum.mautic.org/t/searching-contact-notes/6431/9 "2024-01-13T10:56:02Z")

</div>

Notes are stored in separate table that is connected to the main leads table.

There is a dedicated event in Mautic core that gets triggered when updating notes but as I see it, it does not trigger the webhook event.

Yes, it can be modified so that you get the webhook for this too, but t his approach is not ideal for what you are trying to do.

Best, M.

---

<div class="post-metadata">

**Author:** ![entrepositive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/entrepositive/32/9645_2.png) [@entrepositive](https://forum.mautic.org/u/entrepositive)\
**Post date:** [January 13, 2024, 1:57pm UTC](https://forum.mautic.org/t/searching-contact-notes/6431/10 "2024-01-13T13:57:56Z")

</div>

For my use case, it would be enough to have a custom field bool like _{contactfield=contacted}_ set to TRUE when any note for the contact is created/updated. I would track the first time there is contact made, by the user creating a Note. Then we’d use that binary as a condition in campaigns.

EP
