Skip to main content

Automatically Mention Users in Jira Comments Using ADF

Automate user mentions in Jira comments for streamlined communication.

Updated over 5 months ago

Mention users in Jira comments using the Add Comment Using ADF Document step. This step uses the Atlassian Document Format (ADF), which provides a consistent, rich-text structure across Atlassian products.

  1. Add the ADF Comment Step: Add the Add Comment Using ADF Document step to your workflow.

  2. Retrieve the User ID: To mention a user, you’ll need their unique user ID. Use the Search Users step and input an asterisk (*) to list all users or filter by specific criteria to target certain users.

  3. Verify the JSON: You can construct and validate your JSON in the ADF Builder Playground before providing it in the Comment document field.

  4. Example Mention: Below is a code sample that mentions two users mid-sentence. The resulting comment will appear in Jira as shown below:

    {
    "version": 1,
    "type": "doc",
    "content": [
    {
    "type": "paragraph",
    "content": [
    {
    "type": "text",
    "text": "This task was assigned to "
    },
    {
    "type": "mention",
    "attrs": {
    "id": "your_User_id",
    "text": "@John Doe",
    }
    },
    {
    "type": "text",
    "text": " and reviewed by "
    },
    {
    "type": "mention",
    "attrs": {
    "id": "your_User_id",
    "text": "@Jane Doe",
    }
    },
    {
    "type": "text",
    "text": " ."
    }
    ]
    }
    ]
    }
Did this answer your question?