Invoke a automation method from other automation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Invoke a automation method from other automation

L2 Linker

Hi,

 

Can someone help me to call a method of one automation from a other automation script. Can't copy past the code into other, because the code requires different docker image to run.

 

Thanks in advance 🙂

1 accepted solution

Accepted Solutions

executeCommand can also be used to call (custom) automations, so if you can make that method as an automation itself it would solve it.
Another option is to add the method to the CommonServerUserPython automation, which is essentially a python file that gets copied into each automation upon runtime and can thus be called from all python automations.

Beware that this last option needs the method to be py2 and py3 compatible to include it in all python automation, this is the reason we mainly use option 1 as it also allows us to run code cross language, like javascript executing python or even powershell methods (automations).

View solution in original post

4 REPLIES 4

L1 Bithead

Javascript: executeCommand("[command_name]", [params_in_json])

Python: demisto.executeCommand("[command_name]", [params_in_json])

L2 Linker

Hi @Joachimb 

Thanks for your reply. I would like to call a method from a custom automation script into another custom automation script. could you suggest the way to do that. I believe demisto.executeCommand is used to call built-in commands.

executeCommand can also be used to call (custom) automations, so if you can make that method as an automation itself it would solve it.
Another option is to add the method to the CommonServerUserPython automation, which is essentially a python file that gets copied into each automation upon runtime and can thus be called from all python automations.

Beware that this last option needs the method to be py2 and py3 compatible to include it in all python automation, this is the reason we mainly use option 1 as it also allows us to run code cross language, like javascript executing python or even powershell methods (automations).

L2 Linker

Thanks a lot! its worked

  • 1 accepted solution
  • 1595 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!