Here is a tutorial on how to make a workflow to move text from Drafts 4 to a journal entry in Day One verison 2. The Drafts action itself is quite simple but I am providing step by step screenshots for anyone new to this.
For anyone who just wants the Drafts action you can download it here. Just make sure to visit on the device that is running Drafts!
(Optional): Create a new Action Group
To make it easier to keep your own actions separate from the ones that come with Drafts you may want to create a group for them. This is done by swiping left on the group names until you see the pencil icon. Tap that and then the + icon to create a new group. Here I have created one called demo.
Step 1: Create a new Action
Pretty simple. Select the Action Group you want the action to appear in (or All if you don’t want it in a group) and tap the + icon.
Step 2: Name the Action
Here is the main Action screen. This is where the steps that make up the Action are added and configured. Name it whatever you like then we’ll add our steps. Note that if you tap the small icon to the left of the Action name you can change the main icon for the Action.
Step 3: Action Steps – Add a journal name prompt
Here is the main screen which lists the steps for the Action being edited. Tap the + icon to add the journal name prompt.
We are going to add a Prompt which will let us enter a journal name that will be used when creating the entry. The Prompt can have a title, multiple buttons, a cancel button, and a text field.
The Key field will hold the value the user is going to type into the text input field that will be included. The name that will be used in the URL will be
[[key_text]]. You must include the “_text” when referencing it in the URL later.
Make sure to enter something descriptive in the Title field.
Also make sure to enable the switch labeled Include text field. This will let a journal name be entered. A default value can also be entered here if you find that you are typically using one journal more than others.
It is a good idea to include a cancel button as shown here. This lets you get out of sending the draft to Day One if you forgot something or made a mistake.
After creating the Prompt the Action Steps screen will look like this:
Step 4: Add a URL
Now we’re going to create the URL that is used to call Day One and pass in the name of the journal we’re adding an entry to as well as the text of the entry itself.
The URL we will be using is:
As you can see here we are referencing
journal_text which we set in the step above. That is the text that came from the text field in the Prompt that was used in the previous step.
The rest should be self-explanatory. For reference here is information on the Day One URL scheme as well as the Drafts tags that can be used when creating a URL:
Here is the Action Steps screen after we add the URL. We are now done creating Action Steps.
Step 5: Finish the Action setup
There is one more thing to consider when creating Actions and that is what will happen to the draft after the Action has completed running. Those options are shown in the screenshot. Default is whatever you have selected in the main app settings for Drafts.
Step 6: Test it!
The final step is to test our new Action. Create a new draft, enter some text, tap the box icon in the upper right corner, and select the Action you just created.
Enter your journal name and tap OK. The Action will run and you will be brought to the correct journal in Day One with a new entry created with the text of the draft.