Upload file based on the sheet

Hello everyone, I need help with some logic here. The intention is to make a node to automatically place a number in cell B2 then based on the number entered it searches the spreadsheet for the number, downloads the PDF and uploads it to the Google Drive folder. Everything is on the same line where the number was placed in B2. Someone can help me?

Hey, hope all is well.

Everything is on the same line where the number was placed in B2
this is a very confusing statement. A picture worth 1000 words. Would you like to explain?

In general the flow would be some sort / variation of the following flow:

For the following number sheet:

ID	Number	Comment
1	2011	number to use to download pdf
2	23456	
3	34567	

and the following links sheet:

ID	Link
1	https://richardwiseman.wordpress.com/wp-content/uploads/2011/09/jokes1.pdf
2	http://example.com/download_pdf/23456
3	http://example.com/download_pdf/34567
4	http://example.com/download_pdf/45678
5	http://example.com/download_pdf/56789
6	http://example.com/download_pdf/67890

the following code will take the number from B2 of the number sheet, find the link with that number in the links sheet, download it and upload to Drive.

Hi @TI_BBZ,

I understand your use case. I just need to confirm one thing:

Are you referring to creating a custom node in n8n specifically for this task?

If not, no worries!

I know this is the n8n community, but honestly, for your use case (if it is not regarding creating a custom node), it might be much simpler to achieve this using Google Apps Script (you can even ask ChatGPT or another LLM to help you with the script).

Of course, if you’re planning to do more in n8n beyond what you’ve described, then building it there could still make sense.

Hi everyone, tks for the replys

I’ll explain the origin of the problem so it can be easier. Every operation I want to automate is in a spreadsheet, each row is a building and in that row there is all the information about the building including the Google Drive folders and the email of the person who manages the building. I wanted that whenever something was changed in the red column that says “GERENTE” it would automatically change everything, such as the permissions of the Google Drive folders where the email column is.

About the forum title. My biggest problem is being able to tag the information that I need to automate, for example in the case above. I need to get column 2 (number that goes in cell B2) and column 11 which is the PDF upload folder. I hope that was clear and thanks for your help.

Here de sheet for example

If the value of red column is the same until changed - schedule the trigger to pull all rows every x minutes (hours, days…), iterate over all rows, check the value in B column, if not a default value (in your example sheet the logic could be for instance if the value doesn’t start with “TEST”), take the value of column 11 and do whatever is necessary…

and then filter it:

If the value in B column is NOT a default value that changes, on the other hand, you would need to save the last executions to a database or something and then pull it and compare to the new one on each execution.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.