ouplex 🐺
ouplex 🐺5mo ago

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:
I think I found the problem: function parseCellReference1({cellReference}) so probably these curly braces made the type to be 'object' rather than string.
Jump to solution
7 Replies
Gaurav Chadha
Gaurav Chadha5mo ago
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.
ouplex 🐺
ouplex 🐺5mo ago
@Gaurav Chadha Could you specify which variable is not in the correct type?
Gaurav Chadha
Gaurav Chadha5mo ago
On cell, if it is not a string then match() method won't run and will result in the above error.
ouplex 🐺
ouplex 🐺5mo ago
@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
ouplex 🐺
ouplex 🐺5mo ago
I think I found the problem: function parseCellReference1({cellReference}) so probably these curly braces made the type to be 'object' rather than string.
Gaurav Chadha
Gaurav Chadha5mo ago
The curly braces here does the destructing. Does by simply removing it fixed the issue?
ouplex 🐺
ouplex 🐺5mo ago
I removed them and I tested it 2 times and it worked. So i think maybe the curly braces were the problem.