Hi @King Java Thank you for posting the question here.
The error message indicates that the JavaScript could not extract body
from workflowContext.trigger.outputs.body
as it is undefined. The trigger in your work flow is a Timer
trigger and it would not have a body property you are trying to parse. You can use Dynamic content to get the Body of your email from action Get emails (V3). Please refer the below image for reference
I would also recommend using a When a new email arrives (V3)
trigger as it might be an ideal option. Using it would avoid the overhead of looping through the emails and you can access the body of each email from this trigger in your JavaScript using var text = workflowContext.trigger.outputs.body
Hope this answers your question. Please let us know if you need any additional assistance in the comments below.
If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.