incident workflow studio does not take description from inbound email

Gedis
Tera Contributor

Hi All, Please help to understand why I am unable to get description on incident from inbound email.

Not sure what is happening but if I select Description - Trigger - inbound email -email record - Body text

it's creates incident but with empty description.

If I select just Body then it creates incident with description that includes html code.

 

Flow engine log entries:

Encountered error executing instruction: OpInstruction{id=1, opClass=com.snc.process_flow.operation.script.InlineScriptOperation, io=Io{input={required_run_time=RefOrValue{value=vanilla, isRef=false}, script=RefOrValue{value=(function (inputs, outputs) {outputs.__result = (function (inputs) { var bodyText = email.body_text;
})(inputs);})(inputs, outputs);, isRef=false}}, output={__result=c1i.values.description}, defaultOutput={}}}
com.snc.process_flow.exception.OpException: Error: "email" is not defined.,Detail: "email" is not defined.
at com.snc.process_flow.operation.script.ScriptOperationBase.handleScriptResult(ScriptOperationBase.java:64)
at com.snc.process_flow.operation.script.ScriptOperationBase.runScript(ScriptOperationBase.java:52)
at com.snc.process_flow.operation.script.ScriptOperation.run(ScriptOperation.java:75)
at com.snc.process_flow.engine.Operation.run2(Operation.java:90)
at com.snc.process_flow.v2.exec.OpRunner.runOperation(OpRunner.java:75)
at com.snc.process_flow.v2.exec.OpRunner.runOperation(OpRunner.java:69)
at com.snc.process_flow.v2.exec.OpInstructionExecutor.runOperation(OpInstructionExecutor.java:60)
at com.snc.process_flow.v2.exec.OpInstructionExecutor.execute(OpInstructionExecutor.java:27)
at com.snc.process_flow.v2.exec.OpInstructionExecutor.execute(OpInstructionExecutor.java:16)
at com.snc.process_flow.v2.exec.EngineV2.executeInstructions(EngineV2.java:182)
at com.snc.process_flow.v2.exec.EngineV2.run(EngineV2.java:106)
at com.snc.process_flow.v2.exec.EngineRunner.lambda$run$0(EngineRunner.java:28)
at com.snc.process_flow.v2.exec.enviroment.execution.ExecutionScopeRunner.run(ExecutionScopeRunner.java:37)
at com.snc.process_flow.v2.exec.EngineRunner.run(EngineRunner.java:28)
at com.snc.process_flow.engine.EngineV2Adapter.runWithExecutionResult(EngineV2Adapter.java:180)
at com.snc.process_flow.engine.EngineV2Adapter.resumeWithExecutionResult(EngineV2Adapter.java:418)
at com.snc.process_flow.engine.ProcessAutomation.runWithExecutionResult(ProcessAutomation.java:107)
at com.snc.process_flow.engine.ProcessAutomation.run(ProcessAutomation.java:70)
at com.snc.process_flow.engine.GlideProcessAutomation.runSync(GlideProcessAutomation.java:243)
at com.snc.process_flow.engine.GlideProcessAutomation.runWithDomain(GlideProcessAutomation.java:400)
at com.snc.process_flow.engine.GlideProcessAutomation.lambda$runAsUserSync$1(GlideProcessAutomation.java:365)
at com.snc.process_flow.engine.PFSessionClone.run(PFSessionClone.java:71)
at com.snc.process_flow.engine.GlidePFSession.runPlanAsUserSession(GlidePFSession.java:42)
at com.snc.process_flow.engine.GlideProcessAutomation.runAsUserSync(GlideProcessAutomation.java:363)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:462)
at com.snc.process_flow.engine.GlideProcessAutomation._start(GlideProcessAutomation.java:745)
at com.snc.process_flow.engine.GlideProcessAutomation$StartBuilder.start(GlideProcessAutomation.java:1824)
at com.glide.flow_trigger.engine.TriggerRunner.startFlow(TriggerRunner.java:119)
at com.glide.flow_trigger.engine.TriggerRunner.run(TriggerRunner.java:88)
at com.glide.flow_trigger.trigger.EmailTriggerRunner.run(EmailTriggerRunner.java:115)
at com.glide.notification.inbound.InboundEmailActionHandler.executeTrigger(InboundEmailActionHandler.java:281)
at com.glide.notification.inbound.InboundEmailActionHandler.executeTriggers(InboundEmailActionHandler.java:259)
at com.glide.notification.inbound.InboundEmailActionHandler.process(InboundEmailActionHandler.java:138)
at com.glide.policy.EventProcessor.lambda$process$2(EventProcessor.java:323)
at com.glide.policy.EventProcessor.process(EventProcessor.java:329)
at com.glide.policy.EventProcessor.processEventDuringNormalOperation(EventProcessor.java:300)
at com.glide.policy.EventProcessor.processEvent(EventProcessor.java:237)
at com.glide.policy.EventProcessor.process(EventProcessor.java:195)
at com.glide.processing.framework.job.SysEventProcessingFrameworkJob.process(SysEventProcessingFrameworkJob.java:96)
at com.glide.processing.framework.job.SysEventProcessingFrameworkJob.process(SysEventProcessingFrameworkJob.java:54)
at com.glide.processing.framework.job.ProcessingFrameworkJob.processEntities(ProcessingFrameworkJob.java:124)
at com.glide.processing.framework.job.ProcessingFrameworkJob.execute(ProcessingFrameworkJob.java:92)
at com.glide.processing.framework.job.SysEventProcessingFrameworkJob.execute(SysEventProcessingFrameworkJob.java:54)
at com.glide.schedule.JobExecutor.lambda$executeJob$1(JobExecutor.java:195)
at com.glide.schedule.JobExecutor.executeJob(JobExecutor.java:198)
at com.glide.schedule.JobExecutor.execute(JobExecutor.java:178)
at com.glide.schedule.JobExecutor.execute(JobExecutor.java:168)
at com.glide.schedule_v2.SchedulerWorkerThread.executeJob(SchedulerWorkerThread.java:609)
at com.glide.schedule_v2.SchedulerWorkerThread.lambda$process$2(SchedulerWorkerThread.java:402)
at com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35)
at com.glide.schedule_v2.SchedulerWorkerThread.process(SchedulerWorkerThread.java:402)
at com.glide.schedule_v2.SchedulerWorkerThread.run(SchedulerWorkerThread.java:178)

 

 

1 ACCEPTED SOLUTION

Hello @Gedis ,

 

If you are getting the body in the HTML format then remove the HTML tags as per below article and check if that is working -

https://www.servicenow.com/community/developer-blog/remove-html-tags-from-a-string-in-a-flow/ba-p/30...

 

If my response was helpful, please mark it as correct and helpful.
Thank you.

View solution in original post

7 REPLIES 7

Shraddha Kadam
Mega Sage

Hello @Gedis ,
Can you please share the screenshot of the flow so we can understand better?

If my response was helpful, please mark it as correct and helpful.
Thank you.

Gedis
Tera Contributor

Hello,

Gedis_0-1752231076804.png

 

I try to keep as simple as I can for my tests 

Hello @Gedis ,

 

If you are getting the body in the HTML format then remove the HTML tags as per below article and check if that is working -

https://www.servicenow.com/community/developer-blog/remove-html-tags-from-a-string-in-a-flow/ba-p/30...

 

If my response was helpful, please mark it as correct and helpful.
Thank you.

Hello @Gedis ,

Is it helpful for you?

If my response was helpful, please mark it as correct and helpful.
Thank you.