Is it possible to know if folder name is created in Google Drive already?

Describe the issue/error/question

I have no idea about how can I do the next process. Could someone help me please? I will be appreciated any help :kiss:
I want to save in a folder the attachments of emails. But the name of folder it is inside of email. So it is possible that folder already is created or it will be needed to created it.
I have seen that I can create several folders with the same name. I suppose that it is because Google Drive use IDs for his folders. But that is not what I want to do. I want to read the attachment, read into the email the name of folder where I must upload the attachment file and check if the folder exists. If the folders exists, then upload the file there and if folder not exists then create it and upload the file there.

What is the error message (if any)?

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.180.0
  • Database you’re using (default: SQLite): N/A
  • Running n8n with the execution process [own(default), main]: own
  • **Running n8n via [Docker, npm,, desktop app]:**, desktop app

Hey @franchogarcia,
I used Google Drive’s File List operation with these filters to find a folder:

Make sure to always ouput data to continue the workflow if no folder was found.

Example Workflow

1 Like

Thank you very much @marcus!!! Your solution runs properly!
But I want to search several folders but using your solution only check the first one.
This is an example of that:

The folder with name “101010” not exists into my GDrive, but the folder with name “10001” exists.
If you check my attached flow then you will see that only check the first folder name.
How can I do to search all folders @marcus ?
Thank you very much for your time and patient!!

Hey there,
can you mark my answer as a solution to help future readers :smile:?

Normally n8n runs your nodes with all input items, but there are some nodes that require you to do loops. Those exceptions are listed here and google drive is one of them.

Your workflow with looping

1 Like

Hello @marcus,

Thank you very much for your solution! you are the best!! :slight_smile:
I didn’t know that some nodes require to do loops. Nice to know it, thanks a lot to teach me that! Every day I love N8N more. Their community is amazing!! thx a lot for your patience and time.
Ah, one thing, your workflow show me the next error:

Do you know what is the problem?

1 Like

Hey there,
what version of n8n are you using. This should be fixed in recent versions of n8n. Can you update?

I use the desktop version 0.180.0 but also I use it with the localhost with chrome.

You are right @marcus, I have installed the new version (0.182.0) and now it is running without errors.
Thank you a lot for you support and help!

1 Like