X Callback examples

I may just not be reading the documentation very well, but I’m confused on how to actually use the data of the x-callback. Let’s say I create a file and then want to update the metadata to that file. How would I do that?

Welcome to the forum, @acting. I’m not quite sure what you’re getting at …unless you’re talking about Actions URI (the Obsidian plugin) instead of Actions For Obsidian (the app)?

Oh yes I put in the wrong forum my apologies

I just want create a note using templater and then set the metadata with some new added values

Oh yes I put in the wrong forum my apologies

No worries, and you’ve moved the topic already, too! Thanks :+1:t3:

I just want create a note using templater and then set the metadata with some new added values

Actions URI sits on top of Obsidian’s API, which is based on the x-callback-url protocol. Are you familiar with that at all? Because it’s fully asynchronous and a bit more involved than HTTP calls.

If you are familiar with it: The documentation has some examples for creating notes based on templates: /note/create. Please let me know if you need more detailed examples!

But if not: Basically, Actions URI requires you to have a receiver app or server running which takes care of the outgoing calls (i.e., return calls sent by Obsidian). And it also requires you to specify the receiver addresses in the incoming call (i.e., the calls going to Obsidian).

In my own dev environment (macOS) I’ve set up a receiver that logs the calls it receives to a log file. For that, I use an old app, Lincastor v2.4 (note: not Lincastor Browser). It allows you to register custom protocols with macOS, receives calls to those URLs, and hands them to your scripts. For example, I have x-callback-test:// set up on my dev machine which just logs all incoming calls to a file:

Lincastor’s original website is offline by now but still available using the Web Archive: LinCastor App. The download on that page still works, even though it might take a while. I’ve been using it for years, it’s good, it runs on Sonoma w/o issues.

There’s also Lord-Kamina/SwiftDefaultApps: Replacement for RCDefaultApps, written in Swift. which lets you see which apps have registered what URL schemes on your local machine. There might be a text editor or other tool that could be used as an XCU receiver.

That’s sick! I’ll check all of this out and let you know how it goes. I also noticed there’s a rest api plugin within obsidian. Will probably tinker around with that as well. I’m learning JavaScript through obsidian and I’ve had the thought that I get the result of the query through JS and then create an output. Lots of things to play around with.

I also noticed there’s a rest api plugin within obsidian.

Yes, and there’s a fork of my plugin that adds a HTTP server to it:

Its dev and I are in contact about it, too: Adding HTTP server to desktop version · Issue #94 · czottmann/obsidian-actions-uri · GitHub