How to retrieve attachments based on labels using Run macro

This article explains how to input data using a form and retrieve attachments into a Confluence page based on attachment labels using the Run Self-Service Reports for Confluence and Advanced Table for Confluence apps.


  1. In a Confluence page, insert a Run with a user form and parameters macro.
  2. Insert an Attachment Table macro inside the Run macro.

  3. Edit the Attachment macro and perform the following:
    1. Select the relevant filtering options for the Source, Space, and Page parameters. In this example, the Single page, Current space, and Current page options are selected for the respective parameters.
    2. Enter $LABEL in Attachment label regex under the Attachment filtering tab and Save the macro.

  4. Edit the Run with a user form and parameters macro and do as follows:
    1. Click Add my first field in Field settings.

    2. Select the desired Field Type and add LABEL in Field key.

  5. Save the changes and publish the page.
  6. Enter the required label to be retrieved and click Run. Results are shown as per the given label available for the attachments on the specified page. In this example, the output is as shown:

 The $ immediately followed by a Field key (in this case, LABEL) from the Run with a user form and parameters macro is replaced by the values provided in the form.