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

Flow Action Summarize is not working

WahidB
Giga Contributor

We got OOB - 'Summarize' flow action which just takes the string input and expected to return summary of the string as output. But for some reason the action is not working and always returning error: 

 

Error: Cannot read property "provider" from undefined,Detail: Cannot read property "provider" from undefined

 

Here is the script within action:

(function execute(inputs, outputs) {
// ... code ...
 
 
    var request = {
      "executionRequests": [
          {
              "payload": {
                  "textToSummarize" : inputs['textToSummarize']
              },
              "capabilityId": "02def939533121106b38ddeeff7b1237"
          }
      ]
   };
   
    var output = sn_one_extend.OneExtendUtil.execute(request);
    var capabilityResponse = output["capabilities"]["02def939533121106b38ddeeff7b1237"];
    outputs['provider'] = capabilityResponse["provider"];
    outputs['error'] = capabilityResponse["error"];
    outputs['response'] = capabilityResponse["response"];
    outputs['status'] = capabilityResponse["status"];
 
})(inputs, outputs);

I have also added the log statement to see what is being returned as output. Here is that:
{"requestPayload":{},"meta":null,"status":"error","completedAt":null,"planId":null,"transactionId":null,"capabilities":{},"startedAt":null,"message":"Plan invalid or not created."}

Could someone help me with what does this error say and how to troubleshoot it further.

FYI., we have the capability (Summarize) with mentioned sys_id, i.e., 02def939533121106b38ddeeff7b1237.
1 ACCEPTED SOLUTION

rpriyadarshy
Mega Guru

Hi Wahidb

 

Refer this KB for Resolution. STEPS are given in KB-> KB2460400.

 

Issue

Flow action "Summarize" is throwing error  "Error: Cannot read property "provider" from undefined".

 

Flow action " Summarize" is throwing error "Error: Cannot read property "provider" from undefined" -...

 

Regards

RP

View solution in original post

3 REPLIES 3

rpriyadarshy
Mega Guru

Hi Wahidb

 

Refer this KB for Resolution. STEPS are given in KB-> KB2460400.

 

Issue

Flow action "Summarize" is throwing error  "Error: Cannot read property "provider" from undefined".

 

Flow action " Summarize" is throwing error "Error: Cannot read property "provider" from undefined" -...

 

Regards

RP

Thanks for the reply. I cannot access the KB article. Could you help me with the content please.

Hi 

 

Tried Pasting the full KB getting error while submitting.

 

Resolution
To fix the error,

1. Navigate to sys_one_extend_capability table.
2. Select the "Summarize" capability.
3. In OneExtend Definition Configs tab, set the definition you are using as default=true.
https://<instance name>.service-now.com/nav_to.do?uri=sys_one_extend_capability.do?sys_id=<enter the sys_id>

Also make sure inputs is passed to the Summarize action.

 

 

Regards

RP