Want to Automate the clone process using Flow Designer

Yasmin Shaikh1
Tera Contributor

Hi,

 

Want to Automate the clone process using Flow Designer

1) is that possible ?

2) if possible I want to take the backup of the update sets and then send out the email to the team that the clone has been scheduled.

 

Warm Regards,

Yasmin Shaikh

 

 

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Yasmin Shaikh1 

 

If I say possible, then Yes. 

 

BUt need to see is it cost effective benefits?

 

How frequent you clone the instance? if more than 2 still less number.

Update set backup, I will say here we need human intervention, keep all update set as back up is not a wise decision, also some time dev team make then in parent - child as well. 

 

Not a bad use case but thinking from usage and cost side 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi, 

 

We schedule a clone in a month in that case I have to create a flow designer to perform back-up update set and send out an email.

 

Warm Regards,

Yasmin Shaikh

Hi @Yasmin Shaikh1 ,

 

Yes this is interesting and completely possible. You can create a flow that can email the update sets to it's owner visa clone reminder email stating the clone has be planned hence here is your in progress update sets. 

 

Steps: 

When clone request is placed trigger and email to all the users (based on all users having active update sets or specific users / group) 

 

Use mail script to query the update set of each user and provide a URL on email which when clicked redirect to the update module filtered with their inprogress update sets to back up or a script which can download the updates on one click from email. Or you can also send the XML as attachment in email.

 

You can make use of updatesetexport() function and export to XML UI action scripts for generation of XML file and below script to build your email.

 

<mail_script>
attachLinks();
function attachLinks() {
   //Check for any attachments and add attachment links if they exist
   var gr = new GlideRecord('sys_attachment');
   gr.addQuery('table_sys_id',current.sys_id);
   gr.query();
   if(gr.hasNext()){
      template.print('Attachments: \n');
         while (gr.next()) {
            var attachLink = '<a href="' + gs.getProperty("glide.servlet.uri") + gs.generateURL(gr.getTableName(),gr.sys_id) +  '">' + gr.file_name + '</a>';
            template.print(attachLink +  '\n');
         }
      template.print('<hr/>');
   }
}
</mail_script>


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect