Prompt for slug when posting to WordPress?

Hi all,

I am a podcaster, and have set up an action with two steps. One step posts to the email list people can subscribe to for information about upcoming episodes, and the other step posts to my WordPress blog.

I wonder if it is possible to have the action prompt me to enter the slug for the WordPress post? WordPress will supply its own, but I have maintained a system where each post refers to its episode number, so ideally i would like to keep that as users know how to get to a specific post based on its episode number.

I see that you can specify the slug when configuring the WordPress action steps, but obviously this is going to change with each post.

Thanks for any help.

The value for the slug in the WordPress step can take template tags for it’s value, that are evaluated dynamically.

If you put a “Prompt” step before the WordPress step, and configure it to include a text field, you could enter a slug, then use the tag [[prompt_text]] as the slug value, it will send your input as the slug.

You could also type the slug in the text of the draft. You might structure your drafts like:

# Title of the Draft
slug-to-use

Body of the draft.

Then, use line index tags to insert the values in the email and WordPress steps, like [[line|1]] for the title, [[line|2]] for the slug and [[line|4..]] for the body templates.

Thank you so much for the very prompt and helpful reply, this is absolutely epic and I have the prompt method working now.

Am I correct that the WordPress support doesn’t convert Markdown from Drafts into HTML? In my test post, I used a couple of heading tags and the markdown just showed up in the body of the post.

Is there a conversion step I should include somewhere?

Drafts does not automatically convert the Markdown to HTML. There are ways to handle that conversion in your WordPress install (not a WordPress person, so don’t know the details) - or if you want Drafts to do the conversion before posting, just wrap the post content template in %%, which is special markup in Drafts templates for doing Markdown > HTML. So, something like %%[[body]]%%.