Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Incident updation with an image which is uploaded by the user through Service Now IVA

1__KodeeswaranC
Tera Contributor

Hi, I am trying to attach the image to an incident which is uploaded by the user through the Chatbot (IVA) but I couldn't find an option to do it through Action or any other option, So I tried with script but still it is failing.

Can someone please help on this.

PFB the code:

Note: vaInputs.image_input - the entity where the user input is an image in the chatbot (IVA)

Program:

(function execute() {

   var gr = new GlideRecord('incident');

gr.addQuery('number', 'INC0010013');

gr.query();

if (gr.next()) {  

  gr.addAttachment(vaInputs.image_input);

  gr.update();

} else {

  // No incident record found

  gs.info('No incident record found with the number INC0010013');

}

})()

0 REPLIES 0