Read iCloud file outside Scriptable directory

Isn’t possible to read a file from iCloud that is outside the Scriptable directory? I’ve written a text file from Shortcuts and I want to read it in with Scriptable. Is that possible?

I know there are other ways to send data to Scriptable like with copy/paste or the url scheme but I’d like to do it this way if possible.

1 Like

The usual iOS sandbox rules regarding iCloud would apply. You should be able to browse to select the file using the document picker, but you won’t be able to reference the file directly by a path.

1 Like

Okay, so there’s no “shared space” for iCloud? That makes sense. So the only way to have a file written by Shortcuts and automatically read by Scriptable would be to use the Dropbox api it sounds like. That’s not going to be worth it.

Thanks for your reply.

I have an idea to make this more elegant. The idea is to support “bookmarking” folders in Scriptable from the app settings. Adding a bookmark would make the folder accessible from code but due to restrictions in iOS the bookmark is only accessible from within the host app, ie. not from Siri or the Share Sheet Actions.

I’m curious to know if this would be sufficient in your use case?

4 Likes

Would this allow shortcuts to write directly to the scriptable directory or the other way around?

Right now I have Shortcuts run javascript on a page and get some JSON that is then written to a file that I want to have Scriptable read in. (I’m using the url scheme right now with base64 encode, but I sometimes need to run the script several times from the same data so it would be nice to read from a file instead of running from shortcuts each time.) If the bookmarking would let me read from a file that shortcuts writes then that would work for me.

Thanks for replying!

1 Like

Hi. Sorry for the late reply :disappointed: Bookmarking allows Scriptable to read from Shortcuts’ directory and not the other way around.

File bookmarks is part of the current beta of Scriptable 1.3. If you’re not yet on the beta and would like to try it out, just send your mail in a DM and I’ll be sure to add you to the beta.

1 Like

This works great! Reading from the shortcuts directory worked great, now I don’t need to have a document picker pop up.

2 Likes