Macros

In many cases it appears that the user wants to ask the same questions on different documents. That was possible to do with the PDF upload, but it took valuable time. That’s how the macros were introduced. Macros are repeatable action sequences which can be executed on multiple files or even folders.
Macros are visible on the Chat UI page and can be configured in the Macros section in the project settings page. The macros can be only activated if the PDF Upload is activated. More about the activation of the PDF Upload in the following section: Agent Overview Section.
Once activated the macros can be created in the Chat UI clicking the ‘Manage macros’ button. The macros can be imported or created from scratch. There is an option to export the macro in order to save some state or use it for further purposes.
When creating a macro, different fields are needed to be filled, such as name, description, scope (Admin - only for admins, Organization - accessible in all projects in the organization or Project - accessible only in the project), state (Development - still in progress or Production - ready to use and to be run) and Type (Document Message Queue - running macros on one/more uploaded files or Folder Message Queue - running macros on all file within the uploaded folder). The screenshot below shows that, the last part is the ‘Questions’ part where the user can set all the questions that will be sequently run on all uploaded files or all files from the uploaded folder. To make this core part more understandable, there is a visual representation where the questions can be added using ‘dragging nodes’. The order of the nodes represents the order of the questions that will be ran. Additionally there is an option to add child questions which can be simultaneously ran. With all the data that is set, the macro can be successfully created.
Screenshot 2025-04-03 at 17.54.30.png
Screenshot 2025-04-03 at 17.56.11.png
The macros can be edited, deleted, showed in a different view and in the end the user can see the results of the macro execution. The macros can be only run if they are in a Production state.
Screenshot 2025-04-03 at 17.57.59.png
The macros are executed when clicking on the button ‘Run macro’ and the following modal is opened:
Screenshot 2025-04-04 at 09.10.24.png
Depending on the type the user can see the list of all macros: macros on files or macros on folders and upload the corresponding data.
The execution of macros can take some time, and the results of the macros are displayed in the following view:
Screenshot 2025-04-04 at 09.12.41.png
On the left side, the user can customize some visual changes for the main table, selecting which macros the users wants to be displayed and delete some macros if they are not needed anymore.
On the right side the user can see the table with the asked questions per file/folder and the answer to the questions(response in the Chat UI). Additionally, the user can directly navigate to the conversation, in order to continue the chatting, can see and open the facts and export the table data as CSV.
On this screen there is an API button which is a function to run macros via API. Macros via API is available for both files and folder, the tokens can be created directly in the functionality and the idea behind this feature is to run macros locally without using the user interface.
To sum up, macros are really helpful for use cases where the same questions needs to be executed on multiple files/folder, ex. questions for invoices. They show a great and easy to use user experience where the user saves time and effort.