The CreatorCon Call for Content is officially open! Get started here.

Facing issues with the Inbound Email Action

Shashank_Jain
Kilo Sage

Hello Community,

 

I'm facing an issue with an Inbound Email Action in ServiceNow.

I've created an Inbound Email Action with Action type set to "Record Action" and Type set to "Reply". I removed the condition from the Condition field and, in the Action Script, I'm simply trying to print a log for testing—but it’s not working.

 

Use case: When a new case is created, an email notification is sent. When we reply to that email, it should update the Additional Comments field of the corresponding case.

 

However, the script inside the Inbound Email Action doesn’t seem to execute. Even when I remove all logic and just try to log a message, it still doesn't work.

 

In the email log, I’m seeing this error: "Unable to determine origemail"

Could this be preventing the Inbound Email Action script from running?

 

Any help would be appreciated. Thanks!

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain
2 ACCEPTED SOLUTIONS

@Shashank_Jain 

there is a standard process based on which system checks which inbound action to process

Inbound email action processing 

AnkurBawiskar_0-1759303034993.png

 

If my response helped please mark it correct along with other ones from my response so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Thank you for the responses, @Ankur Bawiskar  — they were really helpful.

One of the issues I was facing was understanding why the inbound action was not running. I tried adding logs, and after some investigation, I realized that the inbound action was indeed running, but it was within a scoped application. Because of this, the logs were not being printed with gs.log().

I updated the script to use logger.log(), and the logs started printing correctly. Initially, I was confused and thought it might be an issue with cross-scope privileges, but it turned out not to be the case.

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain

View solution in original post

11 REPLIES 11

Ankur Bawiskar
Tera Patron
Tera Patron

@Shashank_Jain 

The email which went from that case has Watermark in it?

If not then possibly the incoming email won't know which record to map it against.

there are already OOTB inbound actions for Case table.

Any reason a new one is created?

AnkurBawiskar_0-1759297956766.png

check this link

Troubleshooting inbound email action issues 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

Thanks for the response!

 

Yes, the email sent from that case does include a watermark.

We have a custom case table in our instance for which we are implementing this.

 

Since outbound email is disabled in our instance, do I need to manually include the generated reference (e.g., "Ref:MSG0362447_83mm5L94KZlNV4rQXZvd") of the outbound message  when creating the corresponding inbound email record in the sys_email table?

 

 

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain

@Shashank_Jain 

even if email sending is disabled the watermark will still be there on email in email logs

Then you can replicate testing inbound action.

If my response helped please mark it correct along with other ones from my response so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar , 

I don't understand why the Inbound Action script isn't running, even though the conditions are returning true. I even tried placing logs outside the function, but those aren't printing either.

If this works, please mark it as helpful/accepted — it keeps me motivated and helps others find solutions.
Shashank Jain