I have a question that perhaps some of the JXA gurus can help me with.
@8isnothing is helping me to write an API to access DT3 via the web and via Zapier. (I will post details here to share when done.). We have the download API endpoint working and are very close to having the upload endpoint working. But the uploaded documents are going into the root of the desired database instead of into the Group identified by UUID.
This is Python code which calls JXA inside the API:
This is the JXA script which is called by Python:
We know that this script correctly receives data from Python since it can identify the correct database and can also correctly add tags and custom metadata. But the problem is that DT is recognizing the UUID but importing the files to the root folder of the desired Group instead of to the desired Group itself.
Interestingly however this is a standalone JXA script which uses the same logic. If we run this script from Terminal or Keyboard Maestro or Textexpander, then the file does go to the correct Group. It only fails to go to the correct Group when the process is initiated from Python to JXA.
Any thoughts on this behavior?