Scripting a note in the Activity Log

richard_selby
Kilo Guru

Can I add a comment to the Activity Log via a script?
We have a client script which makes a REST call (http get) to an external system, which triggers a customer satisfaction survey email.
If the Http Get call returns 200, I'd like the Activity Log to say "Customer Satisfaction survey sent out to xxxxx".
So this is not logging activity on a service now table, it's really entering a comment based on what an external system returns.
Is there a bit of code which would enter a note directly on the log for a ticket?