How to create a new topic link with pre-filled information

Discourse now supports composing a new (pre-filled) topic via URL! To compose a new pre-filled topic, modify URL params like this:

https://discourse.example.com/new-topic?title=topic%20title&body=topic%20body&category=category/subcategory&tags=email,planned

This will open composer window pre filled with topic title, body, category and tags.

Breaking down the link / URL to show the available options, we have:

  • the base URL / link: https://discourse.example.com/new-topic
  • the ? URL operator to add the different options
  • the topic title: title=topic%20title
  • the & URL operator to include multiple options
  • the body of the topic: body=topic%20body
  • the & URL operator again to include multiple options
  • the category and subcategory separated by a backslash / if you want to include them: category=category/subcategory
  • the & URL operator again to include multiple options
  • and the tags separated by comma(s) , if you want to include multiple tags: tags=email,planned

Try it out live, here on meta! :smile:

https://meta.discourse.org/new-topic?title=topic%20title&body=topic%20body&category=support/wordpress&tags=wordpress

Also, instead of providing category/subcategory name, you can also specify a numeric category_id, like:

https://meta.discourse.org/new-topic?title=topic%20title&body=topic%20body&category_id=3&tags=wordpress

This feature also supports “Start a topic by pasting a link (like Reddit)”, provided that the body is not present, for example:

https://meta.discourse.org/new-topic?title=https://www.xkcd.com/556

Want to create / compose a new pre-filled personal message instead? See: How to create a new personal message via a link with pre-filled information

62 Likes
Start creating a new topic via link?
Link that pre-populates the composer?
Fill in post for user?
What is the best way to integrate member applications?
How to open reply window via URL
Unlisted categories
Link to create a new topic with parsed values in GET-method data?
How to open reply window via URL
How Coinbase Uses Discourse to Educate Customers and Improve SEO
Rename @discobot's start new user command
Bookmarklet or chrome extension for posting links to a Discourse
Open Composer with Prefilled information
Add one button for topic create with pre-filled content without composer or API?
Feature request: Topic-specific reply template
Feature request: Topic-specific reply template
Feature request: Topic-specific reply template
How to add a "button" which composes a pre-filled topic
Versatile Banner
How to create a post clicking a link?
Start a topic by pasting a link (like Reddit)
Pre-filled topics don't recognize subcategories anymore
Is there any link to open composer (for hyperlink)?
Problem in sso redirection for compose a new pre-filled topic via URL
"push" sso users to discourse?
[PAID] extra input fields for new topic
How to "replace" +New Topic with a custom button that brings up the composer
Post commits via webhook inside a topic as reply
Was this Article helpful? Yes or No
Category-specific "new topic" email address/url in notification email?
How to create a new personal message via a link with pre-filled information
Discourse Tab Bar for Mobile
[Solved] In plugin: opening the composer without changing the route
Any Direct URL To New Topic Page?
Have url for creating topic with specific title
Topic Templates
DiscourseConnect - Official Single-Sign-On for Discourse (sso)
Is there a way to make an input form for structured data?
Create new topic in category with specific tag via URL
New Topic Create URL is not working for Subcategory
URL to start new post
How do I create a link which opens Create Topic?
How do I create a link which opens Create Topic?
Open new topic composer in a separate window
Gitter: Post notifications to chat, post transcripts to forum
Chrome/Firefox extension "Share to discourse"
How to add%{post_url} in customize URL
How to auto set topic title?
How can I create a new topic in Discourse via a link or direct the person to the topic if it exists
Link to New Topic?
Create new topic via URL and set tag or category
Wording for private/secure categories
Feature request: Topic-specific reply template

Great feature!

Is it possible to include variables like a pre-filled username ?

e.g.: set the Topic Title to “Hi! I am %username%” which will output “Hi! I am Erik Molenaar!

Thanks for listening!

2 Likes

Apologies for bumping post.
Is there u chance to pass param to composer open in full screen mode ?
image

3 Likes

hmm I am not against adding an option here

7 Likes

Hello, was this question addressed? Thank you!

3 Likes

Nope… Unfortunately not
:frowning:

1 Like

There was a question over here: How to open reply window via URL that referred to this topic.

Is it possible top open a reply window to a specific topic via URL parameter? or is it only possible to start new topics via URL parameter?

Would it take a lot of extra work to make this possible, if it’s not already?

In that other topic I offered some suggestions of why this would be valuable for us.

I see this as being especially valuable when just getting a community started by simplifying the “ask” that we have of some brand new members.

Once they’ve created a reply, they will get notified when replies come to that thread, thus pulling them back into the community, which will incentivize them to get more active. But we want to minimize the barriers to entry as we try to help new members get engaged in the community.

2 Likes

When you create a /new-topic?category=something the current page is /c/something.

Is there any way to make it render the /tag/something page when creating a /new-topic?tags=something?

Is this something that would get accepted as a PR or is this possible in a custom plugin?

5 Likes

Definitely. PR is 100% welcome!

8 Likes

I’m facing an issue: the tags parameter isn’t working on the mobile devices I tried using Chrome, while category works just fine. The tag field isn’t pre-filled.

Any idea why this could be happening?

Thanks!

Hi, I didn’t know about this feature, I like the idea. It can pretty much replace a support ticket system is well done.

Does anyone know if the fullscreen option has been implemented?

It seems not, since I digged a little bit, and this feature is probably managed in routes

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/routes/application.js#L228-L241

But I wanted to ask to be sure. It’s not a necessity at all, was mostly curious.

Hi @techAPJ !

This feature also supports “Start a topic by pasting a link (like Reddit) ”, provided that the body is not present

When I try using that feature, it just creates a new topic each time the link is clicked on, rather than creating a single one on the first time and bringing each new click on the existing topic. Is that a bug?

Thanks.

1 Like

That is not a bug, the feature is to create a new topic, that extra feature is just to create a new topic with a link.

5 Likes