The IMAP Read Email node doesn’t give the Message ID that you can use with the Gmail node. However, there is a workaround. You can use the Get All operation and use the Query option. You can use a query to get the message that you received from the IMAP Read Email node.
Yeah that’s what I thought, however I’m having some trouble in finding the right query
Do you have any query examples that I could use as a guide? It doesn’t have to be an exact query for my problem, just some example that I could use to figure out how to do queries.
I used this query from:{{$node["IMAP Email"].json["from"]}} subject:{{$node["IMAP Email"].json["subject"]}} You can even add is:unread to make sure that you get only the email that is unread.
Yeah, I got to find the query documentation by accident and was able to reach a similar query than yours!
The query I’ve used, and it seems to be working for my use case is: in:INBOX is:unread from:{{$node["IMAP Email"].json["from"]["text"]}} subject:{{$node["IMAP Email"].json["subject"]}}
This is no longer relevant for my problem, but taking the opportunity to share my opinion:
While this works nicely for Gmail, I do expect to connect the IMAP Email to a protonmail bridge, this same solution won’t work for that use case I believe. It would be nice to have an IMAP manipulation node in the future. I’m not sure if node-imap allows for search + delete labels operations, but that could be a start, even if we have to pull emails twice (once to receive the email, and then to search and mark as read)
That’s a good suggestion. Can you make a feature request for this? We can collect more insights from other members, and learn from their use-case as well! Once we know how the community wants this feature to be (and if it possible with node-imap) we can implement this.