X-callback-url Support and Reference

shortcuts
xcallback

#54

Your workflow sounds fine to me.

There is not really one way to use the app. It depends on the “granularity” of your projects as to what is best. For example, if you were finding that your notes for each project you have were getting really long and ungainly, you might consider making the real life project into an Agenda project, and splitting that really big note over several notes (eg one per week, one per sub-topic etc).

But if you find your notes are workable with the current setup, I think your approach is the right one.


#55

I am trying to set up a x-callback-url which will append a line to a note if it exists. If the note does not exist I am trying to use the &x-error parameter to add the note (with the intent of then putting an &x-success behind that to add the line). This currently works if the note exists, but it does not seem to add the note if it does not. Hoping someone can see what I am doing wrong.

`agenda://x-callback-url/append-to-note?project-title=Travel&title=test&text=testentry&on-the-agenda=true&date=today&x-success=shortcuts://callback&x-error=agenda://x-callback-url/create-note?project-title=Travel&title=test&on-the-agenda=true&date=today`

Thanks


#57

Hmm, we haven’t tested this type of thing, to be honest. You are trying to call into Agenda while Agenda is still handling the previous request. I suspect that could lead to some odd behavior.

A way around may be to go back to shortcuts on error and issue the create-note there.


#58

Ah, and you probably need to “percent encode” the special characters in the error URL, otherwise they could be confused for the first URL. Eg. & and ? etc.

To do this, you can use a web site like this:
https://meyerweb.com/eric/tools/dencoder/

Gives:
agenda%3A%2F%2Fx-callback-url%2Fcreate-note%3Fproject-title%3DTravel%26title%3Dtest%26on-the-agenda%3Dtrue%26date%3Dtoday


#59

To add to Drew’s comment, the Shortcuts app has a URL encode step you can use in your workflow.