BACKGROUND: Identifying patients eligible for clinical trials through eligibility screening is time and resource intensive. Natural Language Processing (NLP) models may enhance clinical trial screening by extracting data from Electronic Health Records (EHR). OBJECTIVE: We aimed to determine whether an NLP model can extract brain tumor diagnoses from outpatient clinic letters and link this with ongoing clinical trials. METHODS: This retrospective cohort study reviewed outpatient neuro-oncology clinic letters, to detect brain tumor diagnoses. We used an NLP model to perform named-entity-recognition + linking algorithm that identified medical concepts in free text and linked them to a Systematized Nomenclature of Medicine Clinical Terms (SNOMED-CT) ontology, which we used to search a clinical trials database. Human annotators reviewed the accuracy of the concepts extracted and the relevance of recommended clinical trials. Search results were shown on a notification dashboard accessible by clinicians and patients on the EHR. We report the model's performance using precision, recall and F1 scores. RESULTS: The model recognized 399 concepts across 196 letters with macro-precision=0.994, macro-recall=0.964 and macro-F1=0.977. Linking the model results with a clinical trials database identified 1,417 ongoing clinical trials, of these 755 were highly relevant to the individual patient, who met the eligibility criteria for trial recruitment. CONCLUSIONS: NLP can be used effectively to extract brain tumor diagnoses from free-text EHR records with minimal additional training. The extracted concepts can then be linked to ongoing clinical trials. While further analysis is required to assess the impact on clinical outcomes, these findings suggest a potential application for integrating NLP algorithms into clinical care.