What development environment do you use for building scripts?

I’m curious what everybody is using to develop their scripts within Fibery? I’m starting to get much deeper into it and think the possibilities are amazing. However, the current limits debugging are brutal. Only see to work when triggered through automation, buttons don’t output to the console.

I see a number of scripts posted within the community that are wonderful ways to learn but the limits of debugging feel so crippling presently.

What is the best process and what are the best tools to use to write these scripts? I’m going a bit nuts getting generic errors during button execution without being able to get real details about what is wrong.

I admit this is the deepest I’ve ever dove into Javascript and GraphQL and I’m struggling to make consistent progress without some method of output to understand what I’m doing wrong at each iteration.

And here is a vote/request for the feature of git/version control integration into the scripting engine. I would love to be able to have the power of git behind the scripts and templates I’m building giving the ability to have development, test, and production branches (example) of each script would be powerful.

Actually Buttons do output from console.log() to your browser console - but Rules do not.

But you are correct - this is the most painful dev environment I have dealt with in 30+ years. :sob:

1 Like

To be fair, the intention is that things that are frequently achieved via scripting should become possible using no-code actions, so it makes more sense to devote resources to adding no-code features than to improving the scripting experience.

2 Likes

FYI: any console logging in automation rules will show up in the activity log

image

5 Likes

The best advice I received so far was to develop Rule scripts as Buttons first, so you at least have the console output capability.

It would make a huge difference to have the javascript Error object stack trace, but sadly it is not available.

3 Likes

Having worked with Google Apps Script for a while I’ve gotten used to not being able to run/debug code locally.

Basically my workflow is like this:

  • Console log to get sample records and responses specific to Fibery
  • Replace the Fibery requests with the sample records/responses
  • Open up VS Code with Quokka to write the logical / functional code
  • Copy paste back into the Fibery script to do some final debugging (aka console.log all the things)
6 Likes

Thank you all so much!

I realized the issue with my logging output problem. Total user error. I now know it works from the script types but not the overwrite rich text type within the javascript.

I also thought the logging was captured to the javascript console not the activity log. It didn’t matter though, neither were outputting because I wasn’t executing the code through the script type. The activity log is great for my needs. Thank you!

Perhaps I misunderstand but If I have append content to Meeting Notes for example, the console.log(‘hello’); does not output.

A similar button was created but instead of appending content, I selected script and reran it.

The output is as expected with an entry in the activity log. Note: the failed entry in the picture is because I test to make sure it didn’t require rendering (<%= %> to output, but as expected this failed.

Is this the expected behavior or should I see the log entry with appending content also?

Thanks again!

1 Like