I have a workflow that polls gmail for messages with “invoice paid” in the subject. When it finds one a message is sent to gchat. That all works great. I want to add a new step:
When an “invoice paid” message is received I still want it to send the message to gchat, but I also want it to look for a specific phrase in the body: “starter package”. And when it matches both to perform another action: send an email (I can figure that out.) This is where I am stuck. I’m assuming I’d use an IF node but I can’t seem to get that to work. It doesn’t seem to be looking at the body of the message.
I’d appreciate any advice!
What is the error message (if any)?
No error messages
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
A better way I’ve found to approach this is to use a google mail filter to check if the message contains the text, then put it in a folder/label in gmail. Then have your Gmail trigger search for new items in that folder. Once the processing is done, remove the label in gmail via n8n, and move it to a different folder/label so you know n8n processed it. I find it easier to do the logic in gmail and then query the folders/labels needed to form a kind of queu.