Help With Creating Shortcut to do an Emotional Diary

If you are calling Day One from Drafts with a simple URL call…

Drafts can set custom tags - kind of like a variable. See setTemplateTag().

You could assign the content of the draft to that tag and pass that instead of the draft content as the parameter to Day One. This would allow you to also clear the ontent of the draft before calling out to Day One.

e.g. as a script step

draft.setTemplateTag("fordayone", draft.content);
draft.content = "";
draft.update();

If you are calling Day One from Drafts with an x-callback URL call…

Once you are returned to Drafts, if you have set the option to wait for a response, the Draft will continue execution of the action. Adding an action step after the x-callback to clear the content of the draft would be a simple addition.

As a script step in the action:

draft.content = "";
draft.update();

Hope that helps.

1 Like

Wow, thanks a lot. I’m too much a novice at this and barely understood a word of you wrote :anguished: :grinning:

If there’s parts that don’t currently make sense to you that you want to understand more about, and you can’t figure out on your own, just post here. I’m sure I or someone else would be able to clarify. But a bit of research on your part will go a long way in forming your own understanding.

The second section is about as straight forward as it gets, but it does need you to understand Drafts actions, and in particular the very basics of script steps.

2 Likes

Hi everyone. I updated my “Emotional diary” a little bit. And I need some help with just finishing it the right way.

There is a link to it here: https://www.icloud.com/shortcuts/93b5b3131ce749758cee271e4e79b5d8

The first prompt asks me, “how do you feel right now?”

Then there is a list where I can select a feeling.

Then a new prompt opens to ask me: what is the underlying feeling?

And then is a much longer list of feelings.

But Drafts only stores the last text input from the shortcut. I would like to have it appear like this in the Draft note, for example:

“Time stamp”: “First emotion”: “second emotion”

Can any one help me do that?

Just include the variables in a single text entry.

https://www.icloud.com/shortcuts/811741de18d141908d24116df0aeb02a

1 Like

Hi suddenly I’m getting this error when running my shortcut. Can anybody help?

I keep getting the above error. Can anyone help out with how to solve this error?

If I run the Shortcut above, with a UUID of my own, that is available in my Drafts app, it runs just fine. No error for me.

Have you put in visual messages to show where you have got to, to narrow down the action that is failing?

If you have, does that action fail if you use it in another shortcut?

1 Like

Thanks @sylumer I figured it out!

I actually want to move this task from Drafts to Bear, which means substituting Drafts for Bear in this Shortcut https://www.icloud.com/shortcuts/23edac11602d4b2cb649dfc36bd4b8e5

Bear has note links and note unique identifiers, but I’m stuck here at this step bringing the text field into the Bear notes as it is possible with the Drafts action where it says “Add text to draft”. Does anyone know if that’s possible with Bear?

Okay, switching apps is quite a key bit of information!

Have you looked at the following Shortcuts actions for Bear?

  1. Create Bear Note.
  2. Add to Bear Note.
  3. Open Bear Note.

If you are desperate to do interact with Bear using a URL scheme, the documentation is readily available on the Bear web site.

1 Like

I really can’t figure out how to do it the way it works in Drafts. The result I keep getting is this, instead of the text field that I compiled from the list

That’s the symptom, but we can’t see what you have done. Can you share what your shortcut is currently?

At the moment I can’t for sure if you chose to go back to URL schemes, or if you chose to just use the simpler approach of using the Bear actions as I suggested above.

1 Like

So this how it looks in Drafts at the moment

And this is how my attempt to recreate it with bear looks at the moment

Unfortunately screenshots are not easily tested. Could you consider sharing using the usual sort of link to download? This saves a lot of manual effort trying to re-enter, and it also ensures that any translation based on localisation is automatically carried out for the actions (if not the contents).

Once thing I can immediately see is that you are using URL schemes. Did you try using the built in actions? If not, would you consider trying that?

This is the link to the way it is now with Drafts: https://www.icloud.com/shortcuts/fd20f94455c345aca3529e4457503924

This is the link to the way it is with Bear: https://www.icloud.com/shortcuts/02c1b787185c4acabe1f64b66dd8e39f

I am trying to using the built-in actions from Bear. The problem is getting the text field incorporated into the Bear action like it is in the Draft action

That’s the same link posted twice… :frowning_face:

1 Like

Sorry, I didn’t wait long enough for that link copied animation :slight_smile:

Okay, looking at the shortcut I could confirm what the screenshot suggested in that you were passing in a URL to bear rather than the data. I think you just needed to drop that URL action.

Try this and see if it does more what you are expecting - https://www.icloud.com/shortcuts/731e40e91e774ad797eb7b0a45582ff5

I note that the note ID is static and the date format being included in the note is just the time. How are you planning on tracking the day in Bear that any entries relate to? Are you going to share it out to Day One each day and clear the Bear note down to nothing again?

1 Like

Thanks sylumer that work perfectly!! Now I’m eager to learn what the fastest way to that accumulated Bear note to a new entry in Day One at the end of the day. Any suggestions?

Two step Shortcut?

  1. Use the Get Contents of Note (using the note ID), Bear action to get the contents you have built up.
  2. Use either the Day One Create or Append actions as appropriate to put the content from Bear in Day One.