Exploring Flow Procedures for Diazonium Formation

The synthesis of diazonium salts is historically an important transformation extensively utilized in dye manufacture. However the highly reactive nature of the diazonium functionality has additionally led to the development of many new reactions including several carbon-carbon bond forming processes. It is therefore highly desirable to determine optimum conditions for the formation of diazonium compounds utilizing the latest processing tools such as flow chemistry to take advantage of the increased safety and continuous manufacturing capabilities. Herein we report a series of flow-based procedures to prepare diazonium salts for subsequent in-situ consumption.


Introduction
The formation and continuous processing of highly reactive or potentially unstable intermediates has proven to be a strong driver for the adoption of flow based chemical synthesis [1][2][3]. Indeed, the ability to continuously prepare transient species using small volume reactor technology and directly couple their formation into a subsequent consuming reaction step has significantly enhanced the safety profile of many chemical sequences [4][5][6][7]. For this reason we are currently experiencing a resurgence of interest in many classical transformations that have historically been relegated to almost obscurity because of inherent batch based safety concerns and an inability to scale the transformation [8][9][10][11][12][13][14][15][16]. The improved mixing efficiencies and greater temperature control imparted through the application of flow based reactor technologies is thus enabling their reinvestigation. From our own repertoire of studies the diazonium functionality has shown particular versatility as a reactive intermediate [17][18][19][20] that benefits from being prepared and directly reacted in a continuous flowing process [21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37]. Within this manuscript we describe a number of methods that can be used to conveniently prepare these species at differing scale and with contrasting processing advantages.

Results and Discussion
We initially started our investigations by evaluating the various methods of forming aryl diazonium salts under flow conditions. These can be broadly classified into three general methods based upon the phases used, namely: aqueous (Section 2.1); organic (Section 2.2) and solid phase (Section 2.3).

Formation of Aryl Diazonium Species under Aqueous Conditions
For the development of the aqueous conditions for preparing diazonium salts in flow we evaluated the classical combination of sodium nitrite and hydrochloric acid. To aid in the rapid optimization of the transformation we incorporated flow ReactIR analysis into the process [38,39]. The reactor setup consisted of six paired HPLC pumps used to deliver three variable concentrations of the different reaction inputs (Figure 1). Stream one contained the sodium nitrite solution, stream two an aqueous solution of hydrochloric acid and stream three the aniline component as its mono-hydrochloric acid salt [40], also dissolved in water. The final configuration of T-mixing pieces as shown in Figure 1 was determined through experimental testing. It was found that mixing the hydrochloric acid and nitrite stream prior to introduction of the aniline gave consistently superior results [41]. It was further observed that altering the delay time between this initial mixing event and subsequent introduction of the aniline stream had no detectable effect on the tested reactions (delay range 1. 2-40 s). In this regard the aqueous acid catalyzed decomposition of inorganic nitrite to nitrous acid and further to nitric oxide is known to be a very rapidly established equilibrium process [42]. The presence of very low levels of a NO triple bonded species as determined by ReactIR at 2190-2215 cm´1 was noted, but it was not deemed useful to quantify its formation (generation of calibration curves) under these equilibrium conditions. Instead monitoring of the subsequent diazonium formation step was examined instead.
Molecules 2016, 21, 918 2 of 23 mono-hydrochloric acid salt [40], also dissolved in water. The final configuration of T-mixing pieces as shown in Figure 1 was determined through experimental testing. It was found that mixing the hydrochloric acid and nitrite stream prior to introduction of the aniline gave consistently superior results [41]. It was further observed that altering the delay time between this initial mixing event and subsequent introduction of the aniline stream had no detectable effect on the tested reactions (delay range 1. 2-40 s). In this regard the aqueous acid catalyzed decomposition of inorganic nitrite to nitrous acid and further to nitric oxide is known to be a very rapidly established equilibrium process [42]. The presence of very low levels of a NO triple bonded species as determined by ReactIR at 2190-2215 cm −1 was noted, but it was not deemed useful to quantify its formation (generation of calibration curves) under these equilibrium conditions. Instead monitoring of the subsequent diazonium formation step was examined instead. To test the range of viable reactant concentrations, 1.0 M stock solutions of the three reagents were prepared; water was used as the diluent for the three makeup pumps. Serial dilution profiles for each reagent stream were systematically produced whilst always ensuring the required theoretical minimum 1:1:1 reagent stoichiometry. It was quickly found that a viable concentration window of 0.2 + 0.25 M aniline, 1.8 equivalents of HCl and 1.3 equivalents of sodium nitrite worked well across a representative subset of anilines (Ar = 4-Me, 2-OMe, 2-F, 4-OMe, 4-Br, 3-NO2, 4-NO2 and 3-CF3). In general higher aniline concentration led to precipitation issues and significant by-product formation (triazine formation with low acid concentration). The use of 1.8 equivalents of hydrochloric acid gave excellent conversions to the diazonium salt in every case (>93% purity), however, using a higher ratio for the more electron rich anilines (Ar = 4-OMe {2.2 M} and 2-OMe {2.0 M}) was found to completely suppress the formation of small quantities of diazo coupled material and other unidentified side products [43][44][45][46][47][48][49]. Importantly, it should be noted that in each instance the first equivalent of the hydrochloric acid was always present as a part of the aniline stock solution (HCl salt), facilitating solubility of the aniline substrate in the aqueous media. Therefore only the further excess (>1 equivalent) is supplied as a separate stream and used in the generation of the reactive nitrosonium cation prior to its combination with the aniline flow stream (Figure 1). This is important because as identified earlier it was found that pre-generation of the intermediate NO+ containing solution prior to its unification with the aniline yielded improved results. This was additionally confirmed by altering the reaction setup to eliminate the separate acid stream and alternatively supply the same quantity of hydrochloric acid as a homogeneous mixture with the aniline starting material. The solutions thus generated although containing only the diazonium intermediate as the primary constituent (by 1 H-NMR, 13 C-NMR and HR-MS analysis) were definitively of lower purity [41]. In addition using these solutions as feeds for the subsequent steps also resulted in lower overall recovery of the desired addition products (see later description). To test the range of viable reactant concentrations, 1.0 M stock solutions of the three reagents were prepared; water was used as the diluent for the three makeup pumps. Serial dilution profiles for each reagent stream were systematically produced whilst always ensuring the required theoretical minimum 1:1:1 reagent stoichiometry. It was quickly found that a viable concentration window of 0.2 + 0.25 M aniline, 1.8 equivalents of HCl and 1.3 equivalents of sodium nitrite worked well across a representative subset of anilines (Ar = 4-Me, 2-OMe, 2-F, 4-OMe, 4-Br, 3-NO 2 , 4-NO 2 and 3-CF 3 ). In general higher aniline concentration led to precipitation issues and significant by-product formation (triazine formation with low acid concentration). The use of 1.8 equivalents of hydrochloric acid gave excellent conversions to the diazonium salt in every case (>93% purity), however, using a higher ratio for the more electron rich anilines (Ar = 4-OMe {2.2 M} and 2-OMe {2.0 M}) was found to completely suppress the formation of small quantities of diazo coupled material and other unidentified side products [43][44][45][46][47][48][49]. Importantly, it should be noted that in each instance the first equivalent of the hydrochloric acid was always present as a part of the aniline stock solution (HCl salt), facilitating solubility of the aniline substrate in the aqueous media. Therefore only the further excess (>1 equivalent) is supplied as a separate stream and used in the generation of the reactive nitrosonium cation prior to its combination with the aniline flow stream (Figure 1). This is important because as identified earlier it was found that pre-generation of the intermediate NO+ containing solution prior to its unification with the aniline yielded improved results. This was additionally confirmed by altering the reaction setup to eliminate the separate acid stream and alternatively supply the same quantity of hydrochloric acid as a homogeneous mixture with the aniline starting material. The solutions thus generated although containing only the diazonium intermediate as the primary constituent (by 1 H-NMR, 13 C-NMR and HR-MS analysis) were definitively of lower purity [41]. In addition using these solutions as feeds for the subsequent steps also resulted in lower overall recovery of the desired addition products (see later description). We next evaluated temperature dependence as a parameter of the reaction outcome. Normally temperatures close to 0˝C are employed in batch diazotization reactions to regulate the exothermic nature of the diazonium salt formation. Our objective was to determine if an operational window closer to ambient (25˝C) could be feasibly used to simplify the chemical processing in flow. It was initially found difficult to quantify the outcome of this assessment. Ultimately, it was found beneficial to compare the effect of temperature on the product output when calibrated against an internal standard. For this purpose we used 2-nitro-5-methoxytoluene (25 mol % wrt aniline) which provided simple calibration using both NMR and ReactIR analysis (placed in the aniline stock solution during processing).
To facilitate investigation of the diazonium stability at various temperatures a Polar Bear Plus flow synthesizer [50] was integrated into the system using pre-cooling incubation loops to regulate the temperature of the input fluids prior to mixing (set at the reactor temperature). It was rapidly determined that even at´10˝C the formation of the diazonium salt occurred rapidly and was complete for all evaluated substrates in less than 2.5 min residence time (flow rate 2.0 mL/min; 0.35 M aniline Ar = 4-NO 2 , 4-MeO and Ph, 1.8 equivalents of HCl and 1.3 equivalents of NaNO 2 ).
An expanded temperature range of´10 to 50˝C was therefore investigated using the same fixed flow rate and reagent concentration to assess stability of the diazonium salt ( Figure 2). Only a small decrease in purity of the diazonium adduct was detected between´10 and 10˝C (Ar = Ph < 0.1%, no aniline starting material was detected). Raising the temperature over the next 15˝C gave a small but incremental increase in the amount of diazonium impurities, measured as a reciprocal decrease in the relative quantity of diazonium detected relative to the internal standard (Ar = Ph ď 1.7%). Further heating then resulted in much higher levels of decomposition and identification of the corresponding phenolic products (as determined by LC-MS). Figure 2 shows the extracted plot of the flow stream as monitored by ReactIR analysis comparing the internal standard against the level of phenyl diazonium salt during a continuous temperature ramp (0.2˝C¨min´1; data points generated by the summation of 20 independent temperature stabilized scans). As can be seen, for temperatures up to 20˝C only minor decomposition occurs, however, a significant onset in the rate of decomposition is seen at around 33˝C. Therefore a compromise cooling solution for this system would be a working temperature of 8-10˝C coupled with a shorter segmentation time before subsequent reaction of the newly formed diazonium species. We next evaluated temperature dependence as a parameter of the reaction outcome. Normally temperatures close to 0 °C are employed in batch diazotization reactions to regulate the exothermic nature of the diazonium salt formation. Our objective was to determine if an operational window closer to ambient (25 °C) could be feasibly used to simplify the chemical processing in flow. It was initially found difficult to quantify the outcome of this assessment. Ultimately, it was found beneficial to compare the effect of temperature on the product output when calibrated against an internal standard. For this purpose we used 2-nitro-5-methoxytoluene (25 mol % wrt aniline) which provided simple calibration using both NMR and ReactIR analysis (placed in the aniline stock solution during processing).
To facilitate investigation of the diazonium stability at various temperatures a Polar Bear Plus flow synthesizer [50] was integrated into the system using pre-cooling incubation loops to regulate the temperature of the input fluids prior to mixing (set at the reactor temperature). It was rapidly determined that even at −10 °C the formation of the diazonium salt occurred rapidly and was complete for all evaluated substrates in less than 2.5 min residence time (flow rate 2.0 mL/min; 0.35 M aniline Ar = 4-NO2, 4-MeO and Ph, 1.8 equivalents of HCl and 1.3 equivalents of NaNO2).
An expanded temperature range of −10 to 50 °C was therefore investigated using the same fixed flow rate and reagent concentration to assess stability of the diazonium salt ( Figure 2). Only a small decrease in purity of the diazonium adduct was detected between −10 and 10 °C (Ar = Ph < 0.1%, no aniline starting material was detected). Raising the temperature over the next 15 °C gave a small but incremental increase in the amount of diazonium impurities, measured as a reciprocal decrease in the relative quantity of diazonium detected relative to the internal standard (Ar = Ph ≤ 1.7%). Further heating then resulted in much higher levels of decomposition and identification of the corresponding phenolic products (as determined by LC-MS). Figure 2 shows the extracted plot of the flow stream as monitored by ReactIR analysis comparing the internal standard against the level of phenyl diazonium salt during a continuous temperature ramp (0.2 °C·min −1 ; data points generated by the summation of 20 independent temperature stabilized scans). As can be seen, for temperatures up to 20 °C only minor decomposition occurs, however, a significant onset in the rate of decomposition is seen at around 33 °C. Therefore a compromise cooling solution for this system would be a working temperature of 8-10 °C coupled with a shorter segmentation time before subsequent reaction of the newly formed diazonium species. As expected due to the electronic factors affecting the subsequent formation of the intermediate carbocation from the 4-NO2 and 4-MeO substituted aryl diazonium these species proved much more stable to decomposition [43][44][45][46][47][48][49]. For these substrates the onset of any detectable decomposition was first observed at >25 °C and was not significant (>0.5%) until >40 °C was attained. Conducting an  As expected due to the electronic factors affecting the subsequent formation of the intermediate carbocation from the 4-NO 2 and 4-MeO substituted aryl diazonium these species proved much more stable to decomposition [43][44][45][46][47][48][49]. For these substrates the onset of any detectable decomposition was first observed at >25˝C and was not significant (>0.5%) until >40˝C was attained. Conducting an investigation of the literature confirmed that orthoand meta-substitution patterns exert a more pronounced effect on the rates of diazonium decomposition leading to the corresponding phenolic derivative. However, conversely such substitution then often retards the subsequent phenol/diazo coupling process meaning the overall rates of decomposition/consumption of the parent diazonium approximates the simple phenyl unit albeit the by-product distribution is significantly different [43][44][45][46][47][48][49].
In summary, diazonium formation occurred very rapidly, requiring less than 1 min to ensure complete conversion of the starting aniline in the flow reactor when a reaction temperature of 10˝C is employed. The stability of the diazonium product was determined to be temperature dependent but showed acceptable processing stability at temperatures ď10˝C over short hold times <5 min.

Flow Rate Analysis
Finally, an investigation into the viable flow rate range was undertaken. The rate determining step for the sequence is the formation of the N-nitrosoamine, however this is still extremely fast. Importantly we had already identified that product decomposition was only an issue as the reaction temperature approached ambient when using long diazonium hold times (see above discussion). Therefore a processing scenario involving fast throughputs seemed to offer an immediate advantage. Using a simplified three pump system we established the modified flow reactor setup as depicted in Figure 3. Initially at high flow rates we experienced poor mixing due to laminar flow resulting in incomplete conversion of the aniline starting material. This was quickly rectified by replacing the simple PEEK T-mixers in the system with dedicated mixing chips [51]. A 0.27 mL internal volume chip was used for the HCl and NaNO 2 solution mixing and a larger 2 mL chip for further combining with the aniline solution at the higher combined flow rate. In addition a 2.75 mL cooling loop was placed directly after the first mixing chip and a 5 mL cooling coil after the second mixing chip. The entire mixing (chips) and reaction zone (tubular coils) was maintained at 10˝C using a single Polar Bear Plus flow synthesizer (a copper plate housing the two mixing chips was attached to the top of the Polar Bear's central cooling column which also supported the 2.75 and 5 mL cooling coils). Using this setup even at high flow rates (X = 5 mL/min) at the limits of the HPLC pumping equipment (pump C operational maximum 10 mL/min) complete conversion to the diazonium salts was achieved across a spectrum of substrates; Ar = 4-Cl (1), 4-Me, 2-OMe, 4-OMe, 4-Br, 3-NO 2 and 3-CF 3 . Furthermore, in each case a clean solution of the product as a yellow/orange liquid was produced without evidence of by-product formation. This was therefore adopted as the reactor setup for all future reactions under these aqueous conditions.
To exemplify the generation of the diazonium salts and the ability to trap in situ the reactive species in a linked flow process a small collection of oxamic acid derivatives were prepared through the reduction of the parent diazonium compound using solutions of ascorbic acid ( Figure 4; total residence time of~34 min) [52][53][54][55]. The final products 1-12 were easily isolated in very high purity using a batch extraction, involving a simple extraction following determination of the crude conversion (Table 1). It was also possible for certain substrates to isolate the intermediate ester (42%-62% yield) prior to hydrolysis (13-18: see Experimental Section), however in each case if the material was left to stand in the reaction mixture for >15 min the principle product in solution was the oxamic acid derivative. In practice the reactor output was left to stand for 1 h to ensure complete hydrolysis of the intermediate before work-up and isolation of the desired oxamic acid product.
this setup even at high flow rates (X = 5 mL/min) at the limits of the HPLC pumping equipment (pump C operational maximum 10 mL/min) complete conversion to the diazonium salts was achieved across a spectrum of substrates; Ar = 4-Cl (1), 4-Me, 2-OMe, 4-OMe, 4-Br, 3-NO2 and 3-CF3. Furthermore, in each case a clean solution of the product as a yellow/orange liquid was produced without evidence of by-product formation. This was therefore adopted as the reactor setup for all future reactions under these aqueous conditions. residence time of ~34 min) [52][53][54][55]. The final products 1-12 were easily isolated in very high purity using a batch extraction, involving a simple extraction following determination of the crude conversion (Table 1). It was also possible for certain substrates to isolate the intermediate ester (42%-62% yield) prior to hydrolysis (13-18: see Experimental Section), however in each case if the material was left to stand in the reaction mixture for >15 min the principle product in solution was the oxamic acid derivative. In practice the reactor output was left to stand for 1 h to ensure complete hydrolysis of the intermediate before work-up and isolation of the desired oxamic acid product. 3-Cl 83 6 4-Cl 90 7 2-NO2 89 8 3-NO2 92 9 4-NO2 90 10 2-OMe 67 11 3-Me 72 12 4-Me 77 A : The products were isolated by basification of the reaction mixture pH ~ 8 followed by extraction with EtOAc. The aqueous solution was then acidified to pH ~ 4 and extracted with EtOAc, the organic phase was dried over MgSO4, the solvent evaporated and the isolated compound characterized.

Formation of Aryl Diazonium Species under Organic Non Aqueous Conditions
We have previously conducted several investigations into the preparation of diazonium salts as intermediates in organic solvents using alkyl nitrites as the corresponding NO+ source [17][18][19][20]. In our previous work we have employed almost exclusively tert-butyl nitrite as the diazotizing reagent  3-Me 72 12 4-Me 77 A : The products were isolated by basification of the reaction mixture pH~8 followed by extraction with EtOAc. The aqueous solution was then acidified to pH~4 and extracted with EtOAc, the organic phase was dried over MgSO 4 , the solvent evaporated and the isolated compound characterized.

Formation of Aryl Diazonium Species under Organic Non Aqueous Conditions
We have previously conducted several investigations into the preparation of diazonium salts as intermediates in organic solvents using alkyl nitrites as the corresponding NO+ source [17][18][19][20]. In our previous work we have employed almost exclusively tert-butyl nitrite as the diazotizing reagent due to its availability and higher safety profile for use in batch mode. However, several other materials exist which become viable alternatives representing a potential cost saving when employed at scale working safely within a flow regime. We therefore decided to test some of these other compounds; namely, n-butyl nitrite (CAS: 544-16-1), isobutyl nitrite (CAS: 542-56-3), isopentyl nitrite (CAS: 110-46-3), pentyl nitrite (CAS: 463-04-7) and isopropyl nitrite (CAS: 541-42-4); the reactor set-up used is shown in Figure 5. Conversion of the aniline starting material was determined by 1 H-NMR analysis against an internal standard (2-nitro-5-methoxytoluene). Each of the tested reagents performed equally well using the general reactor setup as shown in Figure 4, although isopropyl nitrite proved more difficult to handle practically due to its low boiling point. In general it was found that tert-butyl nitrite could be directly substituted in this process without any change in observed yield or purity of the flow stream using 1.1 equivalents of the alkyl nitrite and a reaction temperature of 20˝C. It should be noted that a decreased concentration of the starting materials was needed due to the considerably lower solubility of several of the diazonium species in acetonitrile to avoid the issue of precipitation and blocking of the reactor.
Molecules 2016, 21, 918 6 of 23 due to its availability and higher safety profile for use in batch mode. However, several other materials exist which become viable alternatives representing a potential cost saving when employed at scale working safely within a flow regime. We therefore decided to test some of these other compounds; namely, n-butyl nitrite (CAS: 544-16-1), isobutyl nitrite (CAS: 542-56-3), isopentyl nitrite (CAS: 110-46-3), pentyl nitrite (CAS: 463-04-7) and isopropyl nitrite (CAS: 541-42-4); the reactor set-up used is shown in Figure 5. Conversion of the aniline starting material was determined by 1 H-NMR analysis against an internal standard (2-nitro-5-methoxytoluene). Each of the tested reagents performed equally well using the general reactor setup as shown in Figure 4, although isopropyl nitrite proved more difficult to handle practically due to its low boiling point. In general it was found that tert-butyl nitrite could be directly substituted in this process without any change in observed yield or purity of the flow stream using 1.1 equivalents of the alkyl nitrite and a reaction temperature of 20 °C. It should be noted that a decreased concentration of the starting materials was needed due to the considerably lower solubility of several of the diazonium species in acetonitrile to avoid the issue of precipitation and blocking of the reactor. We next considered the use of nitrosyl halides (BrNO and ClNO) which can also be used as diazotization reagents under anhydrous conditions [56]. These species are gases but can be readily generated in situ by the reaction of trimethylsilyl halides (Br/Cl) with alkyl nitrites, under essentially acid free conditions. This was highly desirable as we had experienced difficulties in achieving high isolated yields of the corresponding diazonium salt when using certain acid sensitive substrates. We therefore wished to evaluate these conditions for use with a particularly problematic substrate, namely tert-butyl 4-aminophenylcarbamate. Under our standard aqueous conditions we identified 16% doubly diazotized material and 53% mono-Boc protected diazonium product, the remaining being unidentified by-products [57]. We found the best reagent combination was 1.15 equivalents of isobutyl nitrite and trimethylsilyl halide in a 2:1 solvent mixture of dichloroethane and MeCN which gave good solubility of the diazonium salt ( Figure 6). Satisfyingly under these conditions no doubly diazotized product was detected with only clean and complete conversion to the desired product being observed. To aid with safe isolation and enable full characterization the intermediate diazonium salt was converted to the tetrafluoroborate salt 19. Due to the gaseous nature of the intermediate diazotizing agent we are currently working on their generation for use in other applications through the adoption of the flow tube-in-tube gas reactor system [58][59][60][61]. We next considered the use of nitrosyl halides (BrNO and ClNO) which can also be used as diazotization reagents under anhydrous conditions [56]. These species are gases but can be readily generated in situ by the reaction of trimethylsilyl halides (Br/Cl) with alkyl nitrites, under essentially acid free conditions. This was highly desirable as we had experienced difficulties in achieving high isolated yields of the corresponding diazonium salt when using certain acid sensitive substrates. We therefore wished to evaluate these conditions for use with a particularly problematic substrate, namely tert-butyl 4-aminophenylcarbamate. Under our standard aqueous conditions we identified 16% doubly diazotized material and 53% mono-Boc protected diazonium product, the remaining being unidentified by-products [57]. We found the best reagent combination was 1.15 equivalents of isobutyl nitrite and trimethylsilyl halide in a 2:1 solvent mixture of dichloroethane and MeCN which gave good solubility of the diazonium salt ( Figure 6). Satisfyingly under these conditions no doubly diazotized product was detected with only clean and complete conversion to the desired product being observed. To aid with safe isolation and enable full characterization the intermediate diazonium salt was converted to the tetrafluoroborate salt 19. Due to the gaseous nature of the intermediate

Formation of Aryl Diazonium Species Using Solid Phase Techniques
In our previous flow work we have found it extremely beneficial to supplement packed cartridges of immobilized reagents into the flow streams to simplify the introduction of reagents or help purify reactions [62,63]. We were therefore interested in the potential of using such an approach to help generate diazonium salts in flow. The simplest approach we could envisage was to utilize a sulfonic acid functionalized ion exchange matrix to act as an acid source and to ultimately form a corresponding aryl-diazonium sulfate species retained by association to the support [64,65]. Interestingly, we found that a related strategy had already been adopted in batch using a sulfonic acid modified silica [66,67]. In addition we and Filimonov et al. had used a polymer bound nitrite source to assist in the formation of various arene-diazoniums [68,69]. Encouraged by these previous results we tested three support materials for the promotion of diazotization reactions in flow, namely, MP-TsOH [70], Si-SA (two forms namely SCX and SCX2) [71], and Nafion NR50 [72]. Glass Omnifit tubes were packed with the different solid supports and placed within the flow path of a Vapourtec R2+/R4 unit ( Figure 7). Several loading approaches were contrasted for simplicity and efficiency. It was decided to pursue a non-aqueous set of reaction conditions because of the variable solubility of the different aniline starting materials at neutral pH in water. First, a solution of the aniline in an organic solvent (EtOH, MeCN, DCE or NMP; 1.15 M, flow rate 0.25 mL/min) was passed through the cartridge of immobilized acid. In general a discernible color change could be observed progressing through the cartridge as capture of the aniline occurred. To further assist with the determination of the extent of loading a UV-Vis detector (Gilson 155) was placed in-line to monitor for aniline breakthrough (scanning mode) [73]. Upon detection of aniline in the output line an automated valve trigger enabled exchange of the input flow to an alternative pure solvent stream. The column was washed using the pure solvent to remove any non-captured aniline, which could be collected for calibration of the loading and if required easily isolated for recycling. Again, this secondary washing process was monitored by UV-Vis to enable automated assessment and processing. Unfortunately, it was found that the results obtained were very inconsistent. Ultimately, it was shown that highly UV active impurities in the aniline starting materials were generating false positive detection signals resulting in premature

Formation of Aryl Diazonium Species Using Solid Phase Techniques
In our previous flow work we have found it extremely beneficial to supplement packed cartridges of immobilized reagents into the flow streams to simplify the introduction of reagents or help purify reactions [62,63]. We were therefore interested in the potential of using such an approach to help generate diazonium salts in flow. The simplest approach we could envisage was to utilize a sulfonic acid functionalized ion exchange matrix to act as an acid source and to ultimately form a corresponding aryl-diazonium sulfate species retained by association to the support [64,65]. Interestingly, we found that a related strategy had already been adopted in batch using a sulfonic acid modified silica [66,67]. In addition we and Filimonov et al. had used a polymer bound nitrite source to assist in the formation of various arene-diazoniums [68,69]. Encouraged by these previous results we tested three support materials for the promotion of diazotization reactions in flow, namely, MP-TsOH [70], Si-SA (two forms namely SCX and SCX2) [71], and Nafion NR50 [72]. Glass Omnifit tubes were packed with the different solid supports and placed within the flow path of a Vapourtec R2+/R4 unit (Figure 7).

Formation of Aryl Diazonium Species Using Solid Phase Techniques
In our previous flow work we have found it extremely beneficial to supplement packed cartridges of immobilized reagents into the flow streams to simplify the introduction of reagents or help purify reactions [62,63]. We were therefore interested in the potential of using such an approach to help generate diazonium salts in flow. The simplest approach we could envisage was to utilize a sulfonic acid functionalized ion exchange matrix to act as an acid source and to ultimately form a corresponding aryl-diazonium sulfate species retained by association to the support [64,65]. Interestingly, we found that a related strategy had already been adopted in batch using a sulfonic acid modified silica [66,67]. In addition we and Filimonov et al. had used a polymer bound nitrite source to assist in the formation of various arene-diazoniums [68,69]. Encouraged by these previous results we tested three support materials for the promotion of diazotization reactions in flow, namely, MP-TsOH [70], Si-SA (two forms namely SCX and SCX2) [71], and Nafion NR50 [72]. Glass Omnifit tubes were packed with the different solid supports and placed within the flow path of a Vapourtec R2+/R4 unit (Figure 7). Several loading approaches were contrasted for simplicity and efficiency. It was decided to pursue a non-aqueous set of reaction conditions because of the variable solubility of the different aniline starting materials at neutral pH in water. First, a solution of the aniline in an organic solvent (EtOH, MeCN, DCE or NMP; 1.15 M, flow rate 0.25 mL/min) was passed through the cartridge of immobilized acid. In general a discernible color change could be observed progressing through the cartridge as capture of the aniline occurred. To further assist with the determination of the extent of loading a UV-Vis detector (Gilson 155) was placed in-line to monitor for aniline breakthrough (scanning mode) [73]. Upon detection of aniline in the output line an automated valve trigger enabled exchange of the input flow to an alternative pure solvent stream. The column was washed using the pure solvent to remove any non-captured aniline, which could be collected for calibration of the loading and if required easily isolated for recycling. Again, this secondary washing process was monitored by UV-Vis to enable automated assessment and processing. Unfortunately, it was found that the results obtained were very inconsistent. Ultimately, it was shown that highly UV active impurities in the aniline starting materials were generating false positive detection signals resulting in premature Several loading approaches were contrasted for simplicity and efficiency. It was decided to pursue a non-aqueous set of reaction conditions because of the variable solubility of the different aniline starting materials at neutral pH in water. First, a solution of the aniline in an organic solvent (EtOH, MeCN, DCE or NMP; 1.15 M, flow rate 0.25 mL/min) was passed through the cartridge of immobilized acid. In general a discernible color change could be observed progressing through the cartridge as capture of the aniline occurred. To further assist with the determination of the extent of loading a UV-Vis detector (Gilson 155) was placed in-line to monitor for aniline breakthrough (scanning mode) [73]. Upon detection of aniline in the output line an automated valve trigger enabled exchange of the input flow to an alternative pure solvent stream. The column was washed using the pure solvent to remove any non-captured aniline, which could be collected for calibration of the loading and if required easily isolated for recycling. Again, this secondary washing process was monitored by UV-Vis to enable automated assessment and processing. Unfortunately, it was found that the results obtained were very inconsistent. Ultimately, it was shown that highly UV active impurities in the aniline starting materials were generating false positive detection signals resulting in premature termination of the loading sequence. To avoid this we instead repeated the loading but employed direct in-line MS analysis (Advion Expression CMS) enabling mass directed triggering [74,75]. This alternative approach allowed us to rapidly calibrate the active chemical loading of the sulfonic acid supports ( Table 2). Beneficially the column washing stage could again be successfully conducted as previously stated monitoring for completeness using the in-line MS analysis. This therefore allowed us to progress a strategy of loading and washing in an automated fashion (Figure 8). termination of the loading sequence. To avoid this we instead repeated the loading but employed direct in-line MS analysis (Advion Expression CMS) enabling mass directed triggering. [74,75] This alternative approach allowed us to rapidly calibrate the active chemical loading of the sulfonic acid supports ( Table 2). Beneficially the column washing stage could again be successfully conducted as previously stated monitoring for completeness using the in-line MS analysis. This therefore allowed us to progress a strategy of loading and washing in an automated fashion (Figure 8). Analysis of Table 2. The relative differences between the theoretical and actual loading for the MP-TsOH and Nafion NR50 resins can be accounted for because of the degree of permeation of the aniline into the micro beads. The MP-TsOH is supplied as 375-575 micron particles, the silica supports as 40-63 µm spheres and the Nafion as large pellets (1.7-3 mm). With larger beads channeling effects can occur as the fluidic flow moves through the packed bed convecting the aniline through the cartridge and reducing the contact time for effective diffusion. In the case of the silica supports the smaller particle size and the fact the materials are only surface functionalized gives easy site access and rapid scavenging. This was shown by first doubling and then quadrupling the tested flow rate and examining the scavenging process (Table 2 data). It should also be noted that changing the solvent from MeCN had a large impact on the capture results for the Nafion resin. Using NMP increased the sequestration rate whereas EtOH gave a correspondingly decrease. This can be rationalized by the expected swelling properties of the Nafion resin in these solvents changing the accessibility to the functional sites, NMP being a much better solvent for swelling the resin. The MP-TsOH being a highly cross-linked macroporous resin would not be affected to the same extent as the pores are more rigidly defined. This is consistent with the observed results.  Analysis of Table 2. The relative differences between the theoretical and actual loading for the MP-TsOH and Nafion NR50 resins can be accounted for because of the degree of permeation of the aniline into the micro beads. The MP-TsOH is supplied as 375-575 micron particles, the silica supports as 40-63 µm spheres and the Nafion as large pellets (1.7-3 mm). With larger beads channeling effects can occur as the fluidic flow moves through the packed bed convecting the aniline through the cartridge and reducing the contact time for effective diffusion. In the case of the silica supports the smaller particle size and the fact the materials are only surface functionalized gives easy site access and rapid scavenging. This was shown by first doubling and then quadrupling the tested flow rate and examining the scavenging process (Table 2 data).
It should also be noted that changing the solvent from MeCN had a large impact on the capture results for the Nafion resin. Using NMP increased the sequestration rate whereas EtOH gave a correspondingly decrease. This can be rationalized by the expected swelling properties of the Nafion resin in these solvents changing the accessibility to the functional sites, NMP being a much better solvent for swelling the resin. The MP-TsOH being a highly cross-linked macroporous resin would not be affected to the same extent as the pores are more rigidly defined. This is consistent with the observed results.
In a further set of experiments it was also determined that the electronic properties of the aniline played a significant role in the scavenging efficiency of the species onto the solid supports. As expected weakly basic anilines such as those with nitro substituents required much longer contact times and often gave lower final loading capacity (Table 3). There was also a pronounced solvent effect with EtOH and NMP showing better uptake rates than MeCN and DCE or DCM. As the pKa value of the corresponding parent solution phase p-toluene sulfonic acid is reported to be much higher in MeCN (8.5) than water (´2.8) or other hydrogen bonding solvents this is again consistent [76][77][78]. Although as previously shown reducing the flow through rate did increase the sequestering efficacy this was not general across all the anilines tested. It was found that even using a flow rate of 0.10 mL/min failed to increase the scavenging capacity >55% for weakly basic anilines such as the 2-or 4-NO 2 functionalised species.
It was determined that in general this supported acid strategy could only be effectively used with the more intrinsically basic aniline substrates. It was therefore not possible to determine a generic set of loading conditions as significant individual optimization was required for each starting material. Preliminary attempts to establish a predictive model based upon a correlation between pKa of the substrate and its loading were also not successful. Therefore although the loading sequence could be performed under automated control and it was possible to establish recycling of the aniline flow streams to increase loading capacities over time we felt this was not a practical approach to synthesis in this instance. However, having loaded a set of reagent columns with different anilines we proceeded to test the subsequent diazotization step as a proof of concept study.
A stock solution of isobutyl nitrite (1 M) was prepared in the corresponding aniline loading solvent and passed through each reactor cartridge in sequence. It should be noted that solvent swapping was successfully trialed and gave identical results to reacting in the original solvent, with the notable exception of the Nafion resin which was again put down to its swelling characteristics.
Having experienced repeated problems with the Nafion resin we excluded this from any additional testing. Interestingly this capacity to exchange solvents offers an advantage for initially loading highly insoluble anilines (i.e., in NMP or mixed solvents) with the option of subsequently further processing them in a different solvent. In total two equivalents of isobutyl nitrite based upon the theoretical loading of the solid resin was directed through each column at a flow rate of 0.5 mL/min. A further 40 mL (~2.5 column volumes) of pure solvent at a flow rate of 1 mL/min was then used to wash the columns (wash mixture directed to waste).
To assess the quantity of diazotized species associated with the support we used a very facile diazo dye formation as mediated by reaction with a solution of 2-naphtholate ( Figure 9). To this end a 0.22 M solution of sodium naphtholate prepared from equimolar quantities of sodium ethoxide and 2-naphthol was pumped through the reactor cartridge at a flow rate of 0.25 mL/min for 20 min. The reactor was then washed with EtOH and the output collected for a further 15 min to ensure complete elution of all the diazo species. From this combined output a 1 mL aliquot was sampled, evaporated and the residue redissolved in a standardized solution of d 6 -DMSO doped with a known concentration of 2-methoxytoluene. Subsequent calculation of the quantity of diazo dye was made by extrapolation from 1 H-NMR assessment of the characteristic 1-naphthyl proton in the coupled product. The main bulk of output solution was evaporated, neutralized with 1 M HCl and extracted into EtOAc to allow isolation of the diazo product. Pleasingly the assessed conversions matched well with the previously determined loadings of the aniline starting materials (Table 3 shows the results for EtOH based on the use of MP-TsOH). In general a consistent but small decrease in the isolated yields of the diazo dye was observed verses the monitored loading of the resin (3%-12%). This demonstrated the high efficiency of the diazotization step on the solid phase. The notable outliers were substrates possessing strongly electron withdrawing nitro functionality which effects solubility and were notably difficult to fully elute from the column. 40 mL (~2.5 column volumes) of pure solvent at a flow rate of 1 mL/min was then used to wash the columns (wash mixture directed to waste).
To assess the quantity of diazotized species associated with the support we used a very facile diazo dye formation as mediated by reaction with a solution of 2-naphtholate ( Figure 9). To this end a 0.22 M solution of sodium naphtholate prepared from equimolar quantities of sodium ethoxide and 2-naphthol was pumped through the reactor cartridge at a flow rate of 0.25 mL/min for 20 min. The reactor was then washed with EtOH and the output collected for a further 15 min to ensure complete elution of all the diazo species. From this combined output a 1 mL aliquot was sampled, evaporated and the residue redissolved in a standardized solution of d6-DMSO doped with a known concentration of 2-methoxytoluene. Subsequent calculation of the quantity of diazo dye was made by extrapolation from 1 H-NMR assessment of the characteristic 1-naphthyl proton in the coupled product. The main bulk of output solution was evaporated, neutralized with 1 M HCl and extracted into EtOAc to allow isolation of the diazo product. Pleasingly the assessed conversions matched well with the previously determined loadings of the aniline starting materials (Table 3 shows the results for EtOH based on the use of MP-TsOH). In general a consistent but small decrease in the isolated yields of the diazo dye was observed verses the monitored loading of the resin (3%-12%). This demonstrated the high efficiency of the diazotization step on the solid phase. The notable outliers were substrates possessing strongly electron withdrawing nitro functionality which effects solubility and were notably difficult to fully elute from the column. In summary, we have demonstrated that using a solid phase approach could be successfully applied to the formation and subsequent reaction of certain diazo species prepared from ionically immobilized anilines. This method offers certain advantages for direct in-line purification of these reactive intermediates and could add further value for reactions where solvent exchange or pH adjustment is required when reacting with the final diazonium species. However, a limiting aspect of this approach was found to be the initial loading of the anilines which was highly dependent upon their electronic nature. Although this could be assessed and the loading sequence could be achieved in an automated fashion this approach was deemed non-ideal for practical diazonium generation. As a result we would recommend the previously described aqueous and organic protocols as the main preparative methods moving forward. In summary, we have demonstrated that using a solid phase approach could be successfully applied to the formation and subsequent reaction of certain diazo species prepared from ionically immobilized anilines. This method offers certain advantages for direct in-line purification of these reactive intermediates and could add further value for reactions where solvent exchange or pH adjustment is required when reacting with the final diazonium species. However, a limiting aspect of this approach was found to be the initial loading of the anilines which was highly dependent upon their electronic nature. Although this could be assessed and the loading sequence could be achieved in an automated fashion this approach was deemed non-ideal for practical diazonium generation. As a result we would recommend the previously described aqueous and organic protocols as the main preparative methods moving forward.

General Information
Unless otherwise stated, all solvents were purchased from Fisher Scientific (Bishop Meadow Rd, Loughborough, UK) and used without further purification. Substrates and reagents were purchased from Alfa Aesar (Shore Road, Lancashire, Heysham, UK) or Sigma Aldrich (New Road, Gillingham, Dorset, UK) and used as received.

Reactor Configuration for the Synthesis of Hydrazine Derivatives from Diazonium Salts 1-18
Three stock solutions were prepared and connected to the flow reactor feed lines for Pumps A-C (see Figure 3 for a pictorial layout). Pump A delivered hydrochloric acid (0.84 M), Pump B a solution of aqueous sodium nitrite (0.98 M) and pump C delivered an aqueous solution of ascorbic acid (0.35 M). In addition a further pump was used to provide the solutions of aniline as their HCl salts dissolved in water (0.35 M). The entire reactor was maintained under positive internal pressure using a 75 psi back pressure regulator at the exit of the reactor. To initiate the reaction each flow channel was pumped at 0.5 mL/min. Progressing through the reactor; Channel A and B were mixed in a Uniqsis mixer chip of 0.27 mL internal volume (16 s residence time) before passing into a 2.75 mL PFA tubular residence coil (165 s residence time). The combined flow was then further united with the aniline solution mixing in a second Uniqsis mixer chip of 2 mL internal volume (80 s residence time). The reacting solution then passed into a 5 mL residence PFA foil coil (150 s residence time, the solution turns pale yellow to orange). The whole initial stage mixing unit was temperature regulated (10˝C) using a Polar Bear Plus flow reactor unit.
In the second stage reactor the freshly prepared diazonium mixture (combined flow rate 2 mL/min) was united at an Upchurch peek T-mixer with a solution of ascorbic acid delivered from Pump C set at 0.5 mL/min. The flow stream was then progressed into a 52 mL PFA flow coil (20.8 min residence time).
The isolation of certain intermediate hydroxamic esters, namely 13-18, could be achieved by immediate extraction of the reactor output with ethyl acetate (5 volumes) and washing the organic phase with sodium hydrogen carbonate (2 M; 2ˆ). The organic solution was dried over MgSO 4 , filtered and concentrated in vacuo to provide a pale yellow solid which was triturated with a 1:1 mixture of hexane and acetone to furnishing the desired product.
Alternatively, the output solution was collected and left to stir for 1 h to ensure complete hydrolysis to the corresponding oxamic acid, 1-12, had occurred. The products were isolated by basification of the reaction mixture pH~9 followed by extraction with EtOAc (3 volumes). The aqueous solution was then acidified to pH~4 and extracted with EtOAc (3 volumes), the organic phase was dried over MgSO 4 , the solvent evaporated to yield compounds 1-12. Note: for compounds 1-12 a proton signal sites under the residual DMSO signal.         efficiency of the methodology and indicated its preferential use for more electron rich aniline starting materials. For the generation of larger quantities of material expedience intrinsically directs the synthetic methodology to more solution phase and continuous production operation. In such cases the use of aqueous conditions may be hindered by solubility limitations of both the starting anilines and resultant diazonium intermediates, a general working range of 0.3 + 0.26 M was determined for flow. Beneficially flow proved advantageous for exerting control over mixing and to easily regulate temperature to inhibit deleterious side reactions such as phenol formation, a temperature operational working window was defined. Alternatively organic nitrite donors were shown be useful in organic solvents to easily prepare diazonium intermediates. Of note no additional acid activator was required for these transformations although trimethyl silyl halides could be added to produce in situ nitrosyl halides as that can be used as diazonium forming species.
In general a wide range of preparation conditions and the use of several diazotising agents have been successfully demonstrated in flow. We believe the production of these valuable diazonium intermediates as a continuous stream which as shown can be intercepted to create additional derivatives adds significant value. The elimination of intermediate isolation and handling of diazonium species improves both the overall safety of the process and reduces potential risks due to health hazards associated with such compounds. In addition, once optimised scale up or repeated access to quantities of these species can be automated saving valuable synthesis time which can be employed on more challenging endeavours.