Call a Apex class from a Flow [ @InvocableMethod ]
Two options to call a Apex class from flow @InvocableMethod Process.Plugin interface. I prefer Using @InvocableMethod which is much shorter and more straight forward to follow. It is also more efficient when dealing with multiple records. Code: global class lookUpAccountAnnotation { @InvocableMethod public static List<String> getCampaignIds( List<Campaign> campaignList ) { List<Id> campaignIds = new List<Id>(); List<Campaign> campaign= [SELECT Id FROM Campaign WHERE Name in :campaignList]; for (Campaign c : campaign) { campaignIds .add(c.Id); } return campaignIds; } } Flow: When you include @InvocableMethod it would sit in apex Dropdown of ...