Very often you need more control on input and output data for your n8n workflow, i.e. store input data in tabular format, execute n8n workflow on some specific part of your data, store new fields from n8n workflow output, etc. In other words you need some kind of UI for your n8n workflow. Google Sheets is very popular and easy way to do it and also it's well intergrated with n8n. Let's create a simple Google Sheet with the fields Color, Status and Number:
Here Color is just a color name, Status can be READY or DONE and Number is a string length of Color name.
We will use this Google Sheet as UI for our n8n workflow, Color will be input data, Number will be output data and Status will control which data will be used as input data on the next execution and show which data already has an output.
Let's switch to n8n workflow and first add Google Sheets node to read all the rows with Status READY:
Now let's add a Loop node and Set node within it:
Set node should pass row_number value to output and return length of Color name which we will put into Google Sheet as Number. Also we want to update Status to DONE:
Finally let's add Google Sheets node again but for updating the rows:
It will map columns automatically and also use row_number for matching rows:
Well, let's execute and check the output:
Looks as expected and now let's check Google Sheet itself:
Nice! Google Sheet has been updated as well.
If we execute our n8n workflow again, nothing will be done because there are no more rows with Status READY. So this way we can control input values for our n8n workflow. And also we can see output values and Status.
Google Sheet for this tip is available here.