Skip to main content
Solved

Generate report with comments in case wall

  • December 22, 2025
  • 2 replies
  • 93 views

Forum|alt.badge.img+2

Is there a way where i can generate a report that will include all comments added in the case wall too. 

 

The case report that is generated for cases on SecOps does not include all the comments added to the case wall. 

Best answer by bweidel

To include these comments in a report, you must build a workaround using a Playbook to fetch the data and a Custom Widget to display it.

Here is the step-by-step process to achieve this:

Phase 1: Fetch and Format Comments (The Playbook)

You need a playbook (or a block) that runs before you generate the report. Its job is to grab the comments and turn them into a single block of text or HTML.

  1. Create a New Playbook/Block:

    • Triggers can be manual (e.g., "Prepare Report Data") or automated (e.g., just before Case Closure).

  2. Add a Script Action:

    • Use the Siemplify (Google SecOps) Integration or a standard Python Script action.

    • You need to use the SDK to fetch comments. A simple Python script snippet for this looks like:

      Python

       

      from SiemplifyAction import SiemplifyAction
      from SiemplifyUtils import output_handler

      @output_handler
      def main():
      siemplify = SiemplifyAction()
      case_id = siemplify.case.identifier

      # Fetch comments using the internal API/SDK method
      # Note: You may need to use the RestClient if a direct SDK method isn't exposed for your version
      comments = siemplify.get_case_comments(case_id)

      # Format the comments into an HTML string
      html_output = "<h3>Case Wall History</h3><ul>"
      for comment in comments:
      html_output += f"<li><b>{comment['user']}</b> ({comment['timestamp']}): {comment['text']}</li>"
      html_output += "</ul>"

      # Return the HTML string
      siemplify.end(html_output, 'True')
  3. Save to Context:

    • Take the output of that script action and save it to a Case Context Key.

    • Key Name Example: Report_Comments_HTML

    • Scope: Case

Phase 2: Display in Report (The Custom Widget)

Now that the data exists in a variable (Report_Comments_HTML), you can pull it into a report.

  1. Go to Dashboards & Reports > SOAR Reports.

  2. Create a New Template (or edit an existing one).

  3. Add a Free Text or HTML Widget to the report layout.

  4. In the widget configuration, you generally cannot just type the context key. You often need to use the Dynamic Parameters syntax usually formatted as [Context.KeyName].

    • Note: If the standard report builder is too restrictive, many users use the "HTML Widget" specifically, which renders the raw HTML you saved in Phase 1.

  5. Save the template.

Phase 3: Execution

  1. Run the "Prepare Report Data" playbook on your case.

  2. Verify in the Case Context (the "Context" button in the top right of the case view) that Report_Comments_HTML is populated with your comment history.

  3. Generate the report using your new template.

Alternative: API Export

If you need this for auditing purposes rather than a pretty PDF, it is often significantly easier to pull this data externally via the API:

  • Endpoint: /api/external/v1/cases/comments

  • Method: GET

  • Parameter: caseId={your_case_id}

This will return the full JSON structure of comments, which you can convert to CSV/Excel using a simple script outside of the platform.

2 replies

vaskenh
Staff
Forum|alt.badge.img+13
  • Staff
  • December 23, 2025

Hi ​@ShaliniPerera from what I can gather there is effort to introduce this feature (case wall comments within a case report), but I would defer to someone who could speak definitively on this closer to the product side.  Otherwise, yes this is a current limitation with Case Reports.


bweidel
Staff
Forum|alt.badge.img+1
  • Staff
  • Answer
  • December 23, 2025

To include these comments in a report, you must build a workaround using a Playbook to fetch the data and a Custom Widget to display it.

Here is the step-by-step process to achieve this:

Phase 1: Fetch and Format Comments (The Playbook)

You need a playbook (or a block) that runs before you generate the report. Its job is to grab the comments and turn them into a single block of text or HTML.

  1. Create a New Playbook/Block:

    • Triggers can be manual (e.g., "Prepare Report Data") or automated (e.g., just before Case Closure).

  2. Add a Script Action:

    • Use the Siemplify (Google SecOps) Integration or a standard Python Script action.

    • You need to use the SDK to fetch comments. A simple Python script snippet for this looks like:

      Python

       

      from SiemplifyAction import SiemplifyAction
      from SiemplifyUtils import output_handler

      @output_handler
      def main():
      siemplify = SiemplifyAction()
      case_id = siemplify.case.identifier

      # Fetch comments using the internal API/SDK method
      # Note: You may need to use the RestClient if a direct SDK method isn't exposed for your version
      comments = siemplify.get_case_comments(case_id)

      # Format the comments into an HTML string
      html_output = "<h3>Case Wall History</h3><ul>"
      for comment in comments:
      html_output += f"<li><b>{comment['user']}</b> ({comment['timestamp']}): {comment['text']}</li>"
      html_output += "</ul>"

      # Return the HTML string
      siemplify.end(html_output, 'True')
  3. Save to Context:

    • Take the output of that script action and save it to a Case Context Key.

    • Key Name Example: Report_Comments_HTML

    • Scope: Case

Phase 2: Display in Report (The Custom Widget)

Now that the data exists in a variable (Report_Comments_HTML), you can pull it into a report.

  1. Go to Dashboards & Reports > SOAR Reports.

  2. Create a New Template (or edit an existing one).

  3. Add a Free Text or HTML Widget to the report layout.

  4. In the widget configuration, you generally cannot just type the context key. You often need to use the Dynamic Parameters syntax usually formatted as [Context.KeyName].

    • Note: If the standard report builder is too restrictive, many users use the "HTML Widget" specifically, which renders the raw HTML you saved in Phase 1.

  5. Save the template.

Phase 3: Execution

  1. Run the "Prepare Report Data" playbook on your case.

  2. Verify in the Case Context (the "Context" button in the top right of the case view) that Report_Comments_HTML is populated with your comment history.

  3. Generate the report using your new template.

Alternative: API Export

If you need this for auditing purposes rather than a pretty PDF, it is often significantly easier to pull this data externally via the API:

  • Endpoint: /api/external/v1/cases/comments

  • Method: GET

  • Parameter: caseId={your_case_id}

This will return the full JSON structure of comments, which you can convert to CSV/Excel using a simple script outside of the platform.