Bot for institute

Hello everyone, my first language is russian, so i ask you to not think why im talking strange)

i develope bot for institute, my goal is to make a bot in telegram which should save documents of students, and when they will lost them, give it them, i developing it for 4-5 days, im new

in n8n, please help me in my logic, or if somebody could do it, im gonna pay if its necessary.

There is trigger, then switch, if start, bot greets

if any button, bot goes to swtich and there goes to exactly button by understanding by - is equal to request docs/ save docs.

and e.t.c

i achieved:

  1. bot saves name of student,

2. bot does all logic in workflow

i cant:

  1. bot should take my file and if folder with name of student is exist, then upload file to folder, if not then create folder with name of student, and upload file to folder. ( i did logic with creating folder with name, but i couldnt do it at once, with file and name, or it can be like this: student sends his name, bot search for folder, it is not exists, bot creates folder, and then student sends file, and bot SHOULD UNDERSTAND that it file should be uploaded to folder with THAT Name. Help please)

Hey @shoma757 hope all is good.

Welcome to the community.

If I understand correctly, you are trying to upload a file to a folder with the name equal to the current user, where if such folder does not exist, it needs to be created first.

Here is a short example of how this could be implemented:

First run (the folder doesn’t exist:

Second run (folder now exists:

Drive folder after both files were uploaded:

It should be safe for students, so they should write their names, and then send files, with their names should be created folders, and in that folders should be uploaded docs, also i need to do it safe as i said, so if every student will have his password or unique id, Thank you @jabbson for reply, what do you think about it?

I think relying on students manually typing their names in the chat is a straight way to failure. They will make typos, they will type it differently every time, they will check how many names they can create on the server just for fun, I don’t think that will work very well :slight_smile:

mhm, you are right. you can advice something?

Every message comes from a unique telegram user id. You cannot use somebody else’s id, so technically you could name the folders based on the this unique telegram user id. That is if you really feel like handling it through telegram is the best idea (as opposed to having some sort of a file server).

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