# Can I use functions inside the GMail Watch Email module?

**URL:** https://community.make.com/t/can-i-use-functions-inside-the-gmail-watch-email-module/49733
**Category:** Questions
**Tags:** connections
**Created:** [August 6, 2024, 1:07pm UTC](https://community.make.com/t/can-i-use-functions-inside-the-gmail-watch-email-module/49733 "2024-08-06T13:07:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vaidab](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/vaidab/32/41931_2.png) [@vaidab](https://community.make.com/u/vaidab)
#### Post date: [August 6, 2024, 1:07pm UTC](https://community.make.com/t/can-i-use-functions-inside-the-gmail-watch-email-module/49733/1 "2024-08-06T13:07:29Z")

</div>

I’d like to filter GMail emails with something like this:

label:business is:unread invoice OR receipt after:{{formatDate(addMonths(now; -1); “YYYY/MM/01”)}} before:{{formatDate(now; “YYYY/MM/01”)}}

Basically take all receipts and invoices from last month. This is not possible, right? I need to use a filter.

---

<div class="post-metadata">

### Author: ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)
#### Post date: [August 6, 2024, 1:15pm UTC](https://community.make.com/t/can-i-use-functions-inside-the-gmail-watch-email-module/49733/2 "2024-08-06T13:15:26Z")

</div>

You cannot do that with the Gmail integration.

To search previous mails with a Gmail filter, you have to use the Email “Get Emails” module.

 ![Screenshot_2024-08-06_210819](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/3/8395ad184b2e282e884be6b0bfb9cea636fa952c.png)

Hope this helps! Let me know if there are any further questions or issues.

— @samliew

---

<div class="post-metadata">

### Author: ![vaidab](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/vaidab/32/41931_2.png) [@vaidab](https://community.make.com/u/vaidab)
#### Post date: [August 6, 2024, 1:27pm UTC](https://community.make.com/t/can-i-use-functions-inside-the-gmail-watch-email-module/49733/3 "2024-08-06T13:27:56Z")

</div>

Thank you for your answer.  
Seems that using a Mail module gets me into another situation: unable to label emails ([Find Gmail message ID - #13 by Donald\_Mitchell](https://community.make.com/t/find-gmail-message-id/13100/13)). I guess I’ll have to filter email after watching them from the GMail module instead of getting them through the Email module.

---

<div class="post-metadata">

### Author: ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)
#### Post date: [November 4, 2024, 2:42pm UTC](https://community.make.com/t/can-i-use-functions-inside-the-gmail-watch-email-module/49733/4 "2024-11-04T14:42:08Z")

</div>


