Error adding note to a category with space by using x-callback

What I did:
I tried to add a note via x-callback-url to category containing a space. I used %20 for the space in the url like in the agenda examples. I use shortcut app for that

What happened:
Error message
The operation could not be completed. (InterchangeCall-backErrorDomain error 0)”.

What I expected:
Should work in the same way without space. Tried it with a category without space and it works then. Adding a space and use %20 for that in the url causes this error

Things that might be helpful to know (Agenda version, OS and model, etc): all latest versions

I’m not that experienced with the shortcut app, but afaik the shortcut app either adds the encoding for you, or you need to add a specific URL encode step in your shortcut. We have no further control over what internally Shortcuts does. If however you manually create URLs, or do so in other apps/scripts etc, then you need to add the encoding yourself, as shown in the example.

In your case it sounds like you are adding the encoding of the space (%20) yourself while the shortcut apps then does it again, essentially encoding the percent with another percent encoding, which means that upon decoding Agenda reverts that back to %20 instead of a space.

Also keep in mind that you can create a project to a category and a note to a project, but not a note to a category.

I just tried it again to double check and this URL works as expected, with both a space in category as well as project title:


Which means the issue is the URL that comes out of Shortcuts app, not an issue with how the Agenda side processes the URL.

I use a url object in shortCuts that does not allow spaces, so you are forced to use %20. But also when I enter the url directly in the in the calling object, it fails with blank and without.

However, this issue is only for the create new note url. Create a new category causes no issues doing it the same way.

Others might chime in how they deal with url encoding in shortcuts, @heyscottyj do you happen to have encountered this issue? My guess is that you need a step before creating the url that does the encoding.
Also note that there are quite a few example shortcuts people have written and posted on this community, perhaps a good idea to check some of them out. Finally, if you happen to run iOS14 already I have seen some reports of issues possibly related to this. Others might be able to chime in on this as well.

Could be I do something wrong in this case. Did not use Shortcuts App often in the past :laughing:.


Just to reply to that. Sorry, I mean add a Note to a Project of course :wink:

This sounds weird, I don’t see why this wouldn’t work. Any chance the Shortcut could be shared here and I’ll take a peek?

One of the things that I always have to remember for create-note is that there has to be a project existing in Agenda correctly named in the URL, because a project won’t be automatically created tor the note if there isn’t.



Well, I don’t know why, but it works now. Habe not changed it directly, but maybe there was any issue with an variable I have used as part of the title.

Thank you

1 Like