Skill Output to a new table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi ,
I am trying to build a new skill and update the skill output from one table to another table to update the variables. When testing the skill it is working fine however I am not able to update skill out put to a new table.
Please let me know if it is possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Assalamualaikum @Tabir Khan ,
Yes, it’s possible to update the output of a Virtual Agent skill to another table in ServiceNow — but it depends on how you're handling the data flow and what mechanisms you're using to update the target table.
You can capture user input or skill output in variables by using Script Actions, Script Includes, or Flow Designer to update records in any table, including custom tables. You can also use REST APIs or GlideRecord to insert or update data in another table.
There are few reasons why your update might not be working
- Missing GlideRecord logic: If you're not explicitly using GlideRecord or Flow Designer to update the second table, the data won’t move automatically.
- Security constraints: The Virtual Agent might not have permission to write to the target table (check ACLs).
- Incorrect variable mapping: If you're using topic blocks or flows, make sure the variables are correctly passed and mapped.
- Timing issues: If you're trying to update the second table before the skill completes or before the variables are populated, the update may fail.
As per my knowledge there are two approaches
- Using Script Action or Script Include
var gr = new GlideRecord('target_table_name');
gr.initialize();
gr.variable_name = vaInputs.variable_name; // or skill output
gr.insert();
The above code snippet You can trigger this from:
- A Script Action in the Virtual Agent Designer
- A Script Include called via a REST step or Action
2. Using Flow Designer
- Create a Flow that triggers from the Virtual Agent topic
- Use the “Create Record” or “Update Record” action
- Map the skill output variables to the fields in the target table
You can Test like this
- Use gs.info() or background scripts to log what’s being passed
- Confirm the target table is accessible and writable
- Try inserting dummy data manually to verify the update logic
If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution in the future it will be helpful to them.
Thanks & Regards,
Mohammed Mustaq Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
To save the output of a ServiceNow Now Assist Skill Kit (NASK) custom skill to a custom table, you need to integrate the skill with a Flow Designer flow/sub flow and use the "Create Record" or "Update Record" action within that flow.
1. Define Skill Outputs in NASK
Ensure your custom skill is configured to produce outputs that can be consumed by a flow.
In the Now Assist Skill Kit, define the Skill Outputs (e.g., generated_summary as a String data type) in the skill's configuration.
Ensure the prompt or script within your skill populates these output variables with the desired data.
2. Deploy the Skill as a Flow Action
Make the custom skill available within Flow Designer.
Navigate to the skill's Deployment Settings.
Select the option to deploy it as a Flow Action or ensure it can be used within a subflow.
Publish the skill to make the changes active.
3. Create or Update a Flow Designer Flow
This flow will orchestrate the process of running the skill and saving its output.
Navigate to Flow Designer and create a new flow or subflow.
Define the Trigger for your flow (e.g., a record created/updated on a specific table, a scheduled job, or a manual trigger).
Add an Action to execute your custom skill:
Search for and select your published custom skill under the "Actions" menu.
Provide any necessary inputs to the skill from the data pills of the triggering record or other flow steps.
4. Add the "Create Record" Action
- After the custom skill action, click the + icon to add a new action.
- Select the "Create Record" action from the ServiceNow Core actions list.
- In the action configuration:
- Select your custom table from the "Table" dropdown.
- Map the output variables from the custom skill's data pill to the corresponding fields in your custom table (e.g., drag the generated_summary data pill to the Description field of the new custom table record).
5. Save and Activate the Flow
- Save the flow.
- Activate the flow to enable it to run when the trigger conditions are met.
Regards
RP
