Search code examples
javascriptzapier

Want to shorten links using bitly api with js


So, I am using Zapier.com for my High school project. in which inside the zapier it has a Node js server which provides a async fucntion to runs some codes. I want to shorten urls using javascript code in the code by zapier pathway so that any links provided will get shortened. Inputs have no problem . I get the links and can produce them in the output. but when i use js with bitly api unable to get an output . Errors encountered are : [object OBject] OR undefined.


Solution

  • Hello Mikey!

    [object Object] is the default value that you get when trying to stringify an object. To debug this I recommend console logging the object, this will show you all the properties that it contains!

    undefined means you are trying to access something that is not defined (hence the name), To fix this, once again: try to log the entire object and then navigating yourself from there!

    Hope this helped :)