Introduction

Porphyrins are heterocyclic macrocycles with remarkable electro-, photo- and bio-chemical properties that have consequently found applications in many settings [1]. For example, porphyrins have been used as catalysts [2, 3], sensors [4], photo dynamic therapy agents [5], non-linear optic materials [6], in dye-sensitized solar cells [7], and in molecular electronics [8, 9]. In particular, tetra-aryl meso-substituted porphyrins offer high chemical and thermal stability, can undergo various chemical transformations [10], and have been used as a versatile scaffold to achieve many functional architectures [11, 12].

Despite this promise, the use of porphyrins in real-world applications is limited by their challenging synthesis. Porphyrin synthesis is low-yielding, performs better at low concentrations, and needs to be optimized for each aldehyde substrate, requiring large amounts of solvent per mole of product [13]. Furthermore, synthesis of a given porphyrin can be subject to significant batch-to-batch variability, making optimization as well as subsequent purification both time- and resource-intensive.

The synthesis of porphyrins has been extensively studied in order to overcome these challenges. Many approaches exist, e.g., tetramerization of mono-pyrrole or coupling of dipyrromethane units, the approach chosen depending on the desired porphyrin scaffold and functionality [13, 14].

The synthesis of a meso-porphyrin was first reported in 1935 by Rothemund: pyrrole, benzaldehyde, and pyridine were heated in a sealed tube reactor to obtain 10% yield of tetraphenyl porphyrin (TPP) [15, 16]. Later, Adler and Longo’s method of refluxing equimolar pyrrole and benzaldehyde in propionic acid was developed, improving the yield of TPP to 20% [17, 18]. However, such harsh conditions are unsuitable for porphyrins with sensitive functional groups, and tar forms during the reaction that can be challenging to separate if the crystalline porphyrin does not precipitate out.

Later, Lindsey reacted pyrrole and benzaldehyde at room temperature in the presence of acid to reversibly form tetrapyrrolic porphyrinogen (Scheme 1) [19, 20]. To drive the reaction forward and break the equilibrium, porphyrinogen was irreversibly oxidised to porphyrin using 2,3-dichloro-5,6-dicyanobenzoquinone (DDQ) or p-chloranil [21]. Lindsey examined 45 different acids to optimize this milder process, giving yields from 1–50% [19, 22]. Reaction concentration was found to be a key parameter; the optimal condition was established to be 0.01 M. Higher concentrations resulted in formation of polymer (polypyrrylmethanes); lower concentrations resulted in the formation of oligomers with insufficient repeating units for cyclization to porphyrin [13, 23].

Scheme 1
scheme 1

Steps involved in the synthesis of porphyrin; possible side-products include polypyrrole and protonated porphyrin, indicated with blue and pink respectively

The flexibility and broad scope of the Lindsay method has led to its wide-spread use for porphyrin synthesis, but several challenges remain. Yields remain low due to the presence of multiple competing side reactions, as reported across a wide range of modifications to the method; i.e., the use of ionic liquids (15% yield) [24], Lewis acids (23% yield) [25], clay (20% yield), mixed solvent systems (45% yield) [26], microwave synthesis (24% yield) [27], and transition metal ion templating (44% yield) [28] all give yields that are similar to that reported for the original conditions (trifluoroacetic acid, typically 38%) [19].

Furthermore, these modified methods are generally reported for specific substrates; a strategy for systematic optimization that could be applied to any aldehyde substrate is lacking. Reported optimal reaction times for different substrates vary from seconds (e.g., for 1-anthracenecarbaldehyde) [29] to hours (e.g., for 4-methoxybenzaldehyde) [22, 30]; it is challenging to identify the maximum yield of porphyrinogen over these timescales, and thus the optimal time for oxidation. Most methods still require high dilution, limiting scale up [10, 31]. Finally, if insufficient base is used, porphyrins are readily protonated, reducing yields via the formation of protonated porphyrin.

Reaction monitoring has been previously used to track the reversible chemistry of porphyrinogen formation and to determine the optimal time to oxidise the reaction [32]. However, reaction monitoring becomes difficult for rapid reactions under batch conditions and is time-consuming to perform accurately. As such, the synthesis of porphyrins seems an ideal candidate for study under continuous flow conditions.

Flow chemistry offers the advantage of controlling the reaction parameters, residence time, mixing, and heat and mass transfer, as well as providing safe handling of toxic reagents, multi-step synthesis via telescoping, automation opportunities, and routes to scale up [33,34,35]. Robust control of heat and mass transfer could enable a greater degree of control over the reversible porphyrinogen formation as compared to batch, and at-line [36] and inline analytical tools [37, 38] provide access to reaction monitoring even at very short times post-mixing.

Momo et al. reported the first continuous flow synthesis of porphyrin adapting the Gonsalves conditions [39] using propionic acid and nitrobenzene as solvent, carrying out the condensation and oxidation in a single coil. Optimization of the reaction led to a TPP yield of 31% at 140 °C with a residence time of 27 min. A range of aromatic aldehydes were investigated and yields of 9–39% were achieved [40]. The flow process is scalable, but not compatible with reactants or products that are sensitive to acids or elevated temperature; furthermore, the concurrent formation and oxidation to porphyrin limits opportunities to study and optimise each step of the process.

Here, we have adapted Lindsey porphyrin synthesis to flow to study the condensation and oxidation steps independently, aiming to maximize the yield of porphyrinogen and improve selectivity. We compared the synthesis of porphyrin via two flow processes: (1) a semi-continuous process, with condensation of pyrrole and aldehyde in one reactor, oxidation of porphyrinogen in a second reactor, and neutralization of reaction mixture in batch; (2) a fully continuous process where the neutralization step was moved into flow in a third reactor, and the flow pathway was augmented with real time monitoring by UV–Vis spectroscopy.

First, the semi-continuous formation of TPP was subjected to an initial optimization to screen residence time, concentration, equivalents of TFA, and temperature of the first step. Then, the fully continuous method was developed to include inline UV analysis, revealing that the neutralization step was contributing to reduced yields. With this corrected, the scope of the process was studied on both platforms using three aldehydes with sensitive functional groups (thio, ether and silyl alkyne). Here, discrepancies between the inline yield and isolated yield revealed that degradation was likely occurring during purification, demonstrating the value of inline analysis and the fully continuous system. As such, we have developed a flow process that can be used to rapidly optimize porphyrin yield, and that has scope for further augmentation to enable kinetic monitoring and automated optimization.

Results and discussion

Semi-continuous flow synthesis of porphyrin

The semi-continuous flow pathway was set up as described below (Fig. 1). Briefly, two reactors for condensation (reactor 1) and oxidation (reactor 2) were set up in series; the reaction mixture from reactor 2 was collected and quenched with triethylamine. For initial screening of parameters tetraphenyl porphyrin (TPP) was used as a model compound [41].

Fig. 1
figure 1

Semi-continuous reaction pathway for porphyrin synthesis and batch neutralization

The effect of reactant concentration, residence time, acid equivalents, and the temperature of coil 1 on TPP yield was studied in an initial optimization (Table 1). Equivalents of pyrrole and benzaldehyde were maintained at 1:1 and reaction temperature for the oxidation step was fixed at 50 °C [21]. A detailed description of reaction parameters and reactor setup is in section S1.2 of SI.

Table 1 Optimization reactions of TPP under continuous flow using TFA

A decrease in porphyrin yield was observed with increase in concentration from 0.018 M to 0.025 M (Table 1, entries 1, 2, and 3, 38–23%), in line with observations that high dilution conditions minimize the polymerization of pyrrole under batch conditions [21]. Increasing residence time (entries 2, 4, 5; 27–33%) and reaction temperature (entries 2, 6; 31–35%) led to small improvements in the porphyrin yield. However, further increasing the temperature to 50 °C had a negative effect on the yield of porphyrin (entry 7; 24%). The optimum concentration of TFA was found to be 2.5 equivalents (Table 1, entries 2,8 and 9; 31–42%), giving a maximum porphyrin yield of 42%.

In these experiments, yields ranging between 23–42% were observed. However, during purification, a green colour was observed on the silica plug, indicating the presence of protonated porphyrin, and suggesting that the yield of porphyrin could be increased if the neutralization step was improved. Indeed, the global optimum of the reaction may be outside the parameters studied; here, a full design of experiments (DoE) approach would be informative [42,43,44]. However, to achieve robust DoE, the above set-up requires inline analysis and better control over the final neutralization step. Thus, the flow pathway was modified to include flow neutralization, and to integrate inline UV–Vis spectroscopy for real time monitoring of the reaction mixture.

Continuous synthesis and neutralization of porphyrin, incorporating real time monitoring of reaction mixture using inline UV–Vis spectrometer

The reactor set up was therefore modified to neutralize the reaction mixture in a third reactor, and to include inline UV–Vis (Fig. 2). The detailed reactor set up is described in S1.3 of the SI.

Fig. 2
figure 2

Reactor design for continuous synthesis of porphyrin with real time UV–Vis analysis

Porphyrins are highly conjugated π-electron systems with characteristic absorption bands in the near-ultraviolet and visible regions. The transition from the ground state to the second excited state results in an intense Soret, or B, band in the region of 380–500 nm; the transition of electron from ground to first excited state results in a weaker Q band in the region of 500–750 nm [45]. Inline UV–Vis is thus an ideal diagnostic tool for porphyrin yield. The Soret band is affected by concentration: TPP at higher concentration (370–180 µg/mL) had an intense peak at 399/400 nm, whereas diluting the solution (90–9 µg/mL) shifted the intense peak to 417 with a shoulder at 399 (SI 1.5) [46].

First, TPP was formed using the most promising conditions from Table 1: 0.02 M pyrrole and benzaldehyde, 2.5 equivalent of TFA, 20 min residence time, 25 °C temperature in reactor 1, 10 min residence time, 50 °C temperature in reactor 2, and neutralization in reactor 3 at 30 °C with 3.3 min residence time. The UV spectrum of the inline neutralized reaction stream at outlet showed peaks at 418 nm, 438 nm and 482 nm (Fig. 3a). The peaks at 418 nm and 438 nm correspond to porphyrin and protonated porphyrin respectively, as confirmed via reference to standards carried out in the same flow cell (Fig. 3b). The peak observed at 482 nm corresponds to porphyrinogen; the reference spectrum collected at the outlet of reactor 1 is shown in Fig. 3c.

Fig. 3
figure 3

a UV–Vis spectrum of reaction under conditions described above and with solution collected after neutralization with 0.9 µL/mL base b Reference UV–Vis spectra of porphyrin and protonated porphyrin; c UV–Vis spectrum of porphyrinogen as collected after reactor 1; d UV–Vis spectrum of reaction mixture after complete inline neutralization with 100 µL/mL

The presence of all three species in the reaction mixture collected at the end of reactor 3 (Fig. 3a) demonstrated that protonation of the porphyrin due to incomplete neutralization of the reaction was reducing the overall yield. The major peak observed was 438 nm, indicating that residual acid was protonating the porphyrin. The presence of a peak at 482 nm, corresponding to porphyrinogen, also indicated incomplete oxidation of porphyrinogen to porphyrin under these conditions.

It is thus important to optimize the concentration of base required to completely neutralize the residual acid and increase the yield of porphyrin. Thus, the concentration of base was varied from 0.9 µL/mL to 100 µL/mL, with all other reaction parameters kept as specified above; briefly, 0.02 M pyrrole and benzaldehyde, 2.5 equivalent of TFA, 20 min residence time, 25 °C temperature in reactor 1, 10 min residence time, 50 °C temperature in reactor 2, and neutralization in reactor 3 at 30 °C with 3.3 min residence time. The spectrum reported in Fig. 3d is the result at 100 µL/mL and shows the disappearance of protonated porphyrin peak. In this case, porphyrinogen was not observed.

The possibility of the presence of other species was considered. Chloranil and its complex with triethylamine display peaks in the UV at 295 nm and 319 nm respectively (S1.6), which is sufficiently distant from the peak at 418 nm for porphyrin quantification.

Comparison of two processes for the synthesis of functionalized porphyrins

To verify the improvements of the fully continuous process, functionalized porphyrins with thio (5,10,15,20-tetrakis(4-(methylthio)phenyl)porphyrin), ether (5,10,15,20-tetrakis(4-(decyloxy)phenyl)porphyrin), and alkynyl silyl (5,10,15,20-tetrakis(4-(trimethylsilyl)ethynyl)phenyl)porphyrin) functional groups were trialled in both the semi-continuous and continuous set-up. Calibration curves (S1.4) were carried out for each substrate to use inline UV detection to establish analytical yields for the fully continuous process. For the semi-continuous process yields were obtained via isolation and weighing of the porphyrin post-purification, and thus are subject to losses during work-up and purification.

In the case of TPP (benzaldehyde; Table 2, entry 1) the yields obtained from both processes were comparable. However, thio (Table 2, entry 2), ether (Table 2, entry 3), and alkynyl silyl (Table 2, entry 4) functionalities showed substantial difference in the yields obtained from two different processes. The isolated yields obtained during the batch neutralization in semi-continuous mode were found to be much lower compared to the analytical yields obtained from the fully continuous synthesis, except for the ether substituted porphyrin with 2 equivalents of acid used. This can be attributed to the instability of the porphyrins appended with thio, ether, and alkynyl silyl functional groups, incomplete neutralization of porphyrin, and/or yield losses during silica plug purification.

Table 2 Comparison of two different processes for the synthesis of functionalized porphyrin

In the case of the fully continuous synthesis, higher equivalents of acid resulted in higher yield for three of the porphyrins, except for the thio-substituted porphyrin. On the contrary, yields obtained in the semi-continuous process were higher with lower equivalents of acid. We hypothesize that the presence of higher concentrations of acid may degrade less stable porphyrin derivatives, especially if insufficient base is used for neutralization. Here, inline purification methods would be beneficial to achieve high yields of porphyrin compounds appended with sensitive functional groups, especially coupled with automated optimization approaches to efficiently identify optimal quantities of base.

Conclusion

We have developed two processes, semi-continuous and continuous, for the synthesis of meso-porphyrin derivatives via the Lindsay method. Continuous flow synthesis with inline UV–Vis analysis offers the advantage of real time monitoring of the reaction steady state, the reaction mixture, and the porphyrin yield, giving better understanding of the process including where yield losses are occurring. In case of TPP, similar yields were obtained from both the semi-continuous and continuous process. However, in case of functionalized porphyrins with thio, ether, and alkynyl silyl groups, the analytical yields from continuous mode with inline UV were higher than the isolated yields from semi-continuous mode, which employed batch neutralization. The lower yields observed in the semi-continuous process may be due to the degradation of the less stable porphyrin derivatives under incomplete neutralization conditions, or losses during work-up and purification. Hence, inline UV analysis proved to be essential to improve the process by actual determination of steady state, optimising the base for complete neutralization of acid, and indicating what the achievable yields are immediately following oxidation. In future, this system will be augmented with in-line purification and modified to allow autonomous optimization, allowing the rapid exploration of process space for a range of porphyrin precursors, ultimately improving selectivity, yield, and scalability of these important molecules.