BApp details: ExtendedMacro
This extension provides a similar but extended version of the Burp Suite macro feature.
The main functionality is that you are able to trigger one or more requests before every request made by Intruder, Repeater, Scanner, Sequencer or Spider. You can extract data from an arbitrary response and replace or add data to the following request (replace CSRF token, session, add new header, etc.).
You can install BApps directly within Burp, via the BApp Store feature in the Burp Extender tool. You can also download them from here, for offline installation into Burp.
Please note that extensions are written by third party users of Burp, and PortSwigger Web Security makes no warranty about their quality or usefulness for any particular purpose.