Email scripted rest api with a link

NahuelD
ServiceNow Employee

Hello Everyone, I'm wonder if is possible to include a link in an email so when the end user clicks on the link it trigger a scripted inbound rest api in ServiceNow and then this scripted rest api do some magic and it can redirect the user to a extenal link, when he can download an attachment.

 

The solution that we have right now is a link to an extenal repository but due to security the token expires in 24 hours, So in short terms, I want to know if with this idea that I have if is possible to send a new request each time the user clicks on the link trought the email on his outlook

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@NahuelD 

Not possible to trigger the API directly from email link.

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

-O-
Kilo Patron

Have you looked into Actionable messages in Outlook and Office 365 Groups - could be used to achieve what you are trying to do?

They are already used for approvals in ServiceNow - where licensed.

phgdet
Mega Sage

Hi NahuelD 

Have you tried to create a Flow Action doing that Rest call, then add that action in a subflow and trigger that subflow through script?

sn_fd.FlowAPI.getRunner().subflow('subflow_name').inForeground().withInputs(inputs).run();