I need to choose a sheet, depending on who is a user
Spreadsheet has many sheets that names corresponds their tg_id
how to bind the name of sheet with it’s ID in the moment of creating this sheet
or may be ahother way to use names of sheets?
Describe the issue/error/question
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
Database you’re using (default: SQLite):
Running n8n with the execution process [own(default), main]:
Running n8n via [Docker, npm, n8n.cloud, desktop app]:
Perfect so I think with Google Sheets the API requires the ID of the sheet to be used. But depending on which operation you are using we might ask you to select the sheet from a dropdown box which might be easier.
So are you trying to use the SheetId from the output you have there in another google sheet node so you can use it as a sheet or are you trying to set the tg_ID field in your document with a title field and it isn’t doing it?
At the moment, I checked if I have this user in my list (it works). If not, then I create a sheet with the same name as the user ID (it works). If there is already such a user, then I do a search on the sheet that I created for him. Now I’m stuck on the fact that I can’t copy data from another sheet to this created sheet. Apparently I need to first create columns on this empty sheet (I can’t do it) and then use Merge
You got it so yeah you would need to create the columns manually as I can’t see an option to just add data to a sheet. I have just asked internally if anyone has any ideas on this one but it could be a feature request to add it.
Good news, It turns out this is possible to do. You need to set the data you want to use and pass it to the sheet node and use the Auto Map feature. If the sheet is empty this will create the columns based on the data you pass to it.
You can find an example workflow for this below, Hopefully it helps.