Markdown Link to Appended Clippings

I have a macro to append copied text to the system clipboard, and when finished pasting the clips as copied. I would like to append a markdown link title to the article from which the clips were taken as the last item, i.e., clip 1 + clip 2 + clip3 + [title]&(url). If this can be done, would someone kindly tell me the macro for it? I can't figure it out.


Hey William,

You'll have to be a bit more specific about your process.

For instance – what app are you working in?

If you haven't read this it's worth a couple of minutes of your time.

Tip: How Do I Get The Best Answer in the Shortest Time?


Assuming you are copying your clips from one of the KM supported Web Browsers, this is easy using the FrontBrowser tokens.

When the web page is frontmost, use your existing or another Macro to create a KM Variable:


Then when your destination app is frontmost:


@JMichaelTX, thanks; I added your two macros to my existing macro. When I attempted to paste it all in my destination app, I expected to see all my clippings followed by Title & URL; only the Title and URL was pasted; none of my clippings appeared.

You can easily add the Markdown link to the Action that sets the Clipboard before you paste.

So, your workflow would be:

  1. Manually select and Copy first clip
  2. Manually select and Copy second clip
  3. Trigger a Macro that has just one Action:
    • image
  4. Switch to Your Destination App and Paste.

Of course, this workflow could be further automated, but it shows you how to include the Markdown link when the source web page is still frontmost.

For more info, see Clipboards article in the KM Wiki.

@JMichaelTX, it feels like the solution is near, but not yet. I added your macro, and the result is that the Title/URL appears after every clip except the first, see below. How do we get the Title/URL to appear only after the last/third clip?

Here is is as shown after pasting in Obsidian:

first clip:That action could deepen Facebook’s challenges over time and inspire other countrie

second clip: “The fact that Facebook took the position they did, some governments view that as a wake
Facebook’s Hardball Move in Australia Comes With Risks - WSJ

third clip: The decision to remove news from its platform in Australia was the climax of the social-
Facebook’s Hardball Move in Australia Comes With Risks - WSJ

@ccstone, I'll go read the article, but in the meantime: KM 9.2; MacOS 11.2.1; clipping from Safari 14.0.3; pasting into Bear 1.8.2.

Did you read the Wiki article on Clipboards that I gave you?
Every time you do a COPY, the KM Clipboard History stack is pushed back by one.
So if you select and copy 3 times, the FIRST copy will be %PastClipboard%2%

So you would have:

%PastClipboard%2% -- 1st Copy

%PastClipboard%1% -- 2nd copy

%SystemClipboard% -- last (third) copy

%FrontBrowserTitle% -- Markdown link


Get the pattern?
Do you know how to display the Clipboard History Switcher ?
Can you take it from here?

@JMichaelTX, thanks, I'll work on this some more. Really appreciate your help.

1 Like