The method "getJournalEntry()" does not work in the inline script of a Flow Action.
1. Create a new Flow with trigger as "Updated" on Incident table.
2. Set the condition to Work Notes changes.
3. Add a 'Log' action with level as Info, for 'Message', Toggle scripting on, and enter the below script:
var work_note = fd_data.trigger.current.work_notes.getJournalEntry(1);
gs.info("Worknote_debug: " + work_note);
The result does not give the most recent entry on work notes, but just returns undefined/NULL.
The same script works in a Business Rule and in Scripts - Background.