Google sheet node error
I have a strange problem for me in a workflow with google sheet nodes. Sometimes when I execute the workflow I do not get this error and works but sometimes I get it and it does not work. Why it is like that? What is the reason sometimes there to be this error and sometimes not? What could cause this?
Solution:Jump to solution
I think I found the problem: function parseCellReference1({cellReference}) so probably these curly braces made the type to be 'object' rather than string.
7 Replies
Hi @ouplex 🐺, The issue seems around the custom logic of the modified Google Sheets node. The error: ".match is not a function" occurs when the input it received is not a String from the above add row node. We tested your node's logic with sample values be and it if failed on all the tests. To resolve and debug this you can add type checks to ensure the cell value is a string.
Sent you the modified code logic that adds a type check for all the functions to use 'match' to ensure the input is a string and throws an error when input.
Let me if it works for you.
@Gaurav Chadha Could you specify which variable is not in the correct type?
On
cell
, if it is not a string then match()
method won't run and will result in the above error.@Gaurav Chadha This is strange because I added this line: return typeof actualCell; and it return string
so that means that the parameter I am giving the function should be string
Solution
I think I found the problem: function parseCellReference1({cellReference}) so probably these curly braces made the type to be 'object' rather than string.
The curly braces here does the destructing. Does by simply removing it fixed the issue?
I removed them and I tested it 2 times and it worked. So i think maybe the curly braces were the problem.