SWITCH or IF node after gmail

Hello everyone! Just discovered n8n the other day. Love it so far but i’m trying to figure out a couple of things. The one that got me stumped is this.

I have a workflow with the following.
A gmail node that checks for unread mails with a specific label
I import the attached CSV file to a spreadsheet node
I upload the csv data to a mysql database
A second gmail node to remove the label from the message
and at the end i do a http request to a webhook to start another workflow

Now my question is, how can i put an IF or SWITCH node after the first gmail node that triggers the rest of the flow only if there was an email found?

Cheers

If no email is found (The Gmail node did not return items), the workflow will stop, which means that by default, it should do what you described. If you want to override this behavior, you can do it by setting the parameter Always Output Data in the node settings.

@RicardoE105 Thanks for the quick reply!

I just discovered this myself :slight_smile:

I always discover the simple stuff a minute after i post a question somewhere…

1 Like