How can i use email script within inbound action of type “Reply Email”?

vikrantkumar201
Tera Contributor

Hi,

Basically, I have created an inbound action of type “Reply Email”. So if any email is coming from a particular address, it should send a reply email with content and link to a catalog form.

This link should be dynamic based on instance(Dev, Test, Prod). I have created an email script to get the url dynamically and added it within the reply email field section. But that is not coming as a link rather just a text. When using that mail script in notification, it is working fine.

Can any one guide me on this?

Thanks,

Vikrant

 

5 REPLIES 5

Allen Andreas
Administrator
Administrator

Hi @vikrantkumar2013@gmail 

Unfortunately, the reply email action type within an Inbound Action appears to be limited to only the text typed into that "reply email" field. So you're unable to call mail script, etc.

If you want it to be a bit more dynamic, you'll want to not use the reply email action type and instead use record action (even though you're not going to record anything) and use script in the actions tab to fire an event (so create an event) and then use that event to trigger a notification which would then send the reply to the user.

That would allow your notification to be dynamic and you would simply make future edits there as well instead of in the inbound action as a one-off.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I have created events , notification which will run when this event is fired. Within the notification, I have added the email script to make content dynamic. But, somehow that event is not getting fired through that Inbound action and  But, it is not executing and getting following as message: Reply Email New : did not create or update sys_email using current as I am just calling gs.eventQueue within the inbound action.

Any idea on this?

Hi,

If my original reply was Helpful, please mark it as such. Thanks!

Unfortunately, your reply above has confusing wording in it and/or typos that make it hard to understand. Are you saying the event did fire...or not...?

The point here and your question was around using the reply email action for inbound actions and you can't use mail script, etc. in it.

You'd want to change the action type from reply email to record action and then in your scripted action, call an event...which fires your notification. That's it.

You don't need to worry about the email log, etc.

The event will get fired and the notification will get sent (if you've set that all up correctly) -- that is a separate issue from your question here, although I can still help, but please refer to documentation for assistance: https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/platform-events/...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

ersureshbe
Giga Sage
Giga Sage

Hi, In your email script, are you using "a href"  tag to get as a link?

Regards,

Suresh.

Regards,
Suresh.