I am very new to Apex development, and I am trying to pass a list of strings from records in bulk from a Salesforce flow, but can't get the Apex script to work. If I try invoking from the external flow, the code doesn't run. But if I debug the code block from within the invocable method, it runs... Would anyone be able to provide some insight?
public without sharing class trac_GuidestarOrgUpdateBatch {
@InvocableMethod(Label='Update Bulk Organisations' Description='Updates list of orgs returned from guidestar.' Category='Account')
public void<String> getBulkOrganisations(List<String> searchKeywords){
//Get search list
List<Account> search = [SELECT EIN__c, Primary_Issue_Area__c FROM Account WHERE EIN__c =: searchKeywords];
//Initialize account list to update
List<Account> accountList = new List<Account>();
for (Account acct : search) {
acct.Primary_Issue_Area__c = 'New test';
accountList.add(acct);
}
Database.update(accountList,false);
}

Are you sure it doesn't execute? Open Developer Console (or Setup -> Debug Logs and start tracking yourself), execute your screen flow, see if there's a log generated with your code in it. Examine the account that it was supposed to find, see if the value changed (or if the value is already "New test" - has the lastmodifieddate, lastmodifiedby changed)
The big problem I see is
Database.update(accountList,false);.Either make a normal
update accountList;(and you may notice it throws errors). Or you'd process whatDatabase.updatereturns and do... something (create a Task for each account that failed to update?). Something like https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_database_saveresult.htm