Command tags version 1.0

Command Tag Description

A "command tag" is a string you can put into an email which gives the sender a great deal of control over the content being created in Confluence. It overrides other settings found elsewhere in the email as well as the default settings found in the admin area. Command tags are stripped from the content before that content is created in Confluence.

For cases where a user wants to send email to create content but only has a standard email server not supporting 'plus addressing' or a 'catchall account' it is still possible to control everything about how and where that emails is used to create content in Confluence.

The app searches for a "command tag" in the email subject and then in the body if not found in the subject. 

A command tag looks like <M2P:space=TS=My New Page:contentType=page>

  • Each parameter in the command tag is a key/value pair separated with an equals sign (key=value)
  • Separate multiple parameters with a colon (key1=value1:key2=value2)
  • Correct format is: <M2P:key1=value1:key2=value2>
  • The tag should be on one line of text
Mixing up the colon and = sign is easy to do and the primary source of reported issues with the command tags.
Colons : and equal signs = cannot be used in parameter values
Notice that the tag ends with ">", not "/>" but "/>" is also valid

Supported parameters:

  • space - Space key.  if this is not included the default space specified on the admin screen will be used
  • title - overrides the title found in the "to:" or subject (we do not currently support colon (:) or equals (=) in titles.
    • used only when creating content.  Never used to find existing content.
  • parent - format: "page name" or page ID.  Page ID is preferred.  Do not use page name.  Future versions may require page ID. If this is a 'blog' then this option is ignored.
    • This is the page that will be operated on.  For example, an email with attachments could attach them to the specified page with this command tag in the subject or body of the email: <M2P:parent=12779714/>
  • contentType - blog or page, defaults to page
  • labels - comma-delimited list of labels to add to the page
    • <M2P:labels=label1,label2,label3>
  • not implemented:
    • templatePage (not yet implemented) -this will look to use a page in the same space for a template unless "templateSpaceKey" is defined at which point we'll look in that space.
    • templateSpaceKey (not yet implemented) - defines what space to look for the templatePage in.


<M2P:space=MySpaceKey:title=This Is A Page Title>

<M2P:space=MySpaceKey:title=This Is A Blog Title:contentType=blog>

Future features:

  • We are planning to implement an admin feature that lets you define alias keywords that are translated into a specific command tag.
    • For instance you might simply have an alias string such as "Marketing" where you just want to add this:
      • <M2P:marketing>
    • and have it translate to this:
      • <M2P:space=marketing:parent=Marketing Emails:templatePage=Marketing EMail Template>

Other notes:

If the target page/blog already exists then the command tag is disabled because it's likely this is a reply to another email.
Characters to keep an eye on in page titles: ":" and ","

Precedence - How the system decides what instructions to use:

page/blog title:
command tag, email subject, email address (plus addressing)

content type (page or blog):
command tag, matching content type for content with title found in email address (plus addressing), admin setting for "Default Content Creation Choice"