util.getURL() error when attempting to retrieve file from Ragic

Continuing the discussion from problem with downloading files:

Using Ragic’s Javascript workflow, I’m attempting to get a file stored in Ragic, then send it to a system external of Ragic.

I’m attempting to read the file content into a variable using this code line:

var file_content = util.getURL("https://na3.ragic.com/sims/file.jsp?a=mycompanyname&f=" + file_name);

When I execute the code within my Ragic sheet, I get this error:
URL-error

If I copy this URL and paste it into a web browser tab, it successfully shows the file.

Yes, I am familiar with the rule that an authentication must occur before attempting to retrieve a file. I am able to successfully authenticate then download the file using Postman.

Perhaps the problem is that the Javascript workflow is executed internally on Ragic’s servers whereas my Postman activity comes from outside Ragic.

Can someone please guide me on using Ragic’s Javascript to retrieve a file and store its contents in a variable?

Thank you.

1 Like