The Create comment on task action adds a comment to the specified Asana task. The action also provides an option to pin the created comment to top of the comment thread.

Overview

In Asana, comments are referred to as stories and are identified by a story GID. The Create comment on task action adds a comment to the task in plain text format or HTML format. The HTML format option provides the option of adding a comment with rich-text features. The comment must be added in HTML format with appropriate tags for formatting. The following HTML tags are supported:

  • Numbered list - <ol> with <li>.
  • Bulleted list - <ul> with <li>.
  • Clickable link - <a href>.
  • Code block - <pre>
  • Inline code - <code>
  • Strike through - <s>
  • Underline - <u>
  • Italic - <i>
  • Strong - <strong>
  • Bold - <b>

Once the comment is added, the action returns the story GID of the created comment.

Settings

The following settings are available in the Create comment on task action:

Session
Specifies the Asana session that the Connect action creates. Choose one of the following options as per the Connect action settings:
  • Session name: Select the string variable that stores the session name or enter the session name manually in the text box.
  • Variable: Select the Asana session variable that holds the session name.
Task GID
Specifies the GID of the Asana task to which the action adds the comment.
Comment
Specifies the text that the action adds as the comment. Choose one of the following options for adding the comment:
  • Text: Enter the comment in plain-text format. You can also define a string variable with the comment text and select it using Insert a value option.
  • HTML Text: Enter the comment text in HTML format. Ensure that the HTML tags are formatted correctly.
Pin comment (optional)
Specifies the toggle to pin the comment to the top of the comment thread. Choose one of the following:
  • True: Select to pin the comment to the top.
  • False: Select to leave the comment unpinned.
  • Variable: Select to insert a boolean variable whose default value determines whether to pin the comment or not.
Assign response to a variable (Optional)
Specifies the output variable that stores the response data after the action adds the comment to the task. The action returns the following response data:
  • storyGid - The unique GID of the comment.
  • text - The comment text as specified in Comment.
  • is_pinned - The pin status of the comment as specified in Pin comment.

For more information about all the keys available in the response data, see Asana stories response data. Use one of the following options to store the response data:

  • Multiple variables: Create and specify individual variables to store specific response data.

    Use the Add variable mapping option to specify the key and corresponding variable type to store the specific response data.

  • Dictionary: Create and specify a dictionary variable to store the entire response data.