Upload to dropbox and get the link

I need to:

  1. Copy file to the dropbox folder on my Mac (no to the browser)
  2. Get the link to this file on Dropbox when it's uploaded (as there is no link generated until it finishes the upload)
    Is it possible?

Update: Seems it generates link instantly but I still can't figure out how to select it and get the link after the copying

Maybe I can somehow select the last added file to the dropbox folder?

I guess I have figured out how to get the path to the file.

Tha last step: I need to get the dropbox link from the filepath.

I created a Macro for my personal workflow that contains the part to get the Dropbox link. Works reliable in my environment for many years now.

The steps are (with the folder selected):

  1. Simulate a right click onto the folder (using a script I got from a forum member)
  2. Pause until the sub menu shows "Copy dropbox link" (using "If the screen contains … image… "
  3. Simulate a click on this menu entry
  4. Copy link to a named clipboard

As follows a screenshot of that part of my macro:

1 Like

Yes I did something like that in the end. I though it could be done silently with no menus.

Is it possible to get the dropbox link with no menu loading? Apple script? Shortcuts maybe?

I haven't used Dropbox in years, but the challenge with this (as I recall) is that when you select that menu item in Finder it actually generates the link (or maybe retrieves it?) in real time. It's not something stored directly with the file, it seems.

I asked ChatGPT about it, and it said that there's an official Dropbox command line client available. Once that's installed, you can get a link via AppleScript with this:

tell application "Finder" to get the URL of the selection

Here's the ChatGPT transcript so you can see what it said:

As noted, I stopped using Dropbox a long time ago, so I can't test this, but it makes logical sense. Of course, it's a LLM so there's a 72.57% chance the answer is completely fictitious. :slight_smile:

-rob.

1 Like

Closer to 100% -- the official Dropbox command line client is Linux-only, and I've a feeling the homebrew installer is the usual Mac Dropbox app with no CLI/scripting provision.

I would love to be proven wrong about that. Please? Someone?

1 Like

I've tried this solution from chat GPT but it doesn't work. Seems Dropbox CLI doesn't work on a Mac.

Hello Rustam (@Rustam_Himadiiev):wave:

Here is a CLI tool you might consider to use….

Greetings from Germany :de:

Tobias

2 Likes

Ah dang, I bet all the cool stuff broke when Dropbox switched (when Apple essentially made it required to do so) to using the file provider API, which is very much tied to the GUI. Sorry :(.

-rob.

1 Like