I had similar issue but was able to overcome the same.
The error is saying exactly "Not a valid string"
pass variables value as a string and it will work