Import and Export a Workflow
You can use the Git repositories configured in Automation to import and export a wide variety of content published by Cisco.
When you use content that was not authored by your organization, review the details in the Licensing Help topic.
You can import workflows from GitHub or from a JSON either in text or file format.
Import a Workflow From GitHub
Note: We keep workflows and atomic actions in separate repositories, but the steps to import them are exactly the same. To import and export an atomic action, click the Atomics tab and perform the following steps, as needed.
-
On the All Workflows page, click Import Workflow.
-
On the Git tab of the Import Workflow dialog box, click the Git Repository drop-down list and choose the repository you want to import content from.
Note: You can use multiple GitHub repositories, so choose the repository you intend to import content from.
-
Click the Filename drop-down list and choose the item to import.
-
Click the Git Version drop-down list and choose the version of the item you want to import (normally, the latest version).
-
By default, the Import as a new workflow (duplicate) check box is unchecked and the import will overwrite the existing object; this action cannot be undone and any changes to the existing object will be lost. If you want to make a copy (clone) of the workflow, check the check box.
-
Click Import.
-
If the workflow contains Secure Strings, you'll be asked to provide their values during import. If you do not have the values, you can provide placeholder values and update them later using the Workflow Editor.
-
If the workflow includes sub-workflows, you'll receive a notification that the workflow will be invalid until all the missing sub-workflows are imported. You can import the sub-workflows using the Workflow Editor after the import completes.
-
If an integration is missing and its targets required by the workflow are not available, a link is provided in the description to go enable the integration. After you successfully configure the integration, go back to restart the import of the workflow and now you'll be able to choose the available target.
-
-
Click Continue to complete the import.
-
Click the imported workflow to open it in the Workflow Editor.
-
On the Successfully Imported Workflow dialog box, click OK.
-
Click the child workflow inside the parent workflow to open its properties.
Note: The error message in the properties contains the unique name of the sub-workflow that is missing.
-
Click Import Sub-Workflow. You can import the sub-workflow using one of the following methods:
-
Import from a Git repository - On the Git tab, choose a Git Repository, Filename, and Git Version, and click Import.
Note: You can choose any Filename that is associated with the correct unique name and then choose any available Git Version.
-
Paste from a JSON file - Click the Browse tab, paste the contents of the JSON file into the text box, and click Import.
-
Browse to a JSON file on your system - On the Browse tab, click the Browse button, select the file to import, and click Import.
-
-
When the import completes, you'll receive an Import Complete message in the child workflow Properties.
Import a Workflow From a JSON or File
If you want to import a workflow that is not committed to GitHub, you can copy and paste its definition JSON into Automation or import it from a file that contains the workflow definition JSON.
-
On the All Workflows page, click Import Workflow.
-
Click the Browse tab of the Import Workflow dialog box and use one of the following methods to import the workflow:
- Paste from a JSON file - Paste the contents of the JSON file into the text box, and click Import.
- Browse to a JSON file on your system - Click the Browse button, select the file to import, and click Import.
-
By default, the Import as a new workflow (duplicate) check box is unchecked and the import will overwrite the existing object; this action cannot be undone and any changes to the existing object will be lost. If you want to make a copy (clone) of the workflow, check the check box.
-
Click Import.
-
If the workflow contains Secure Strings, you'll be asked to provide their values during import. If you do not have the values, you can provide placeholder values and update them later using the Workflow Editor.
-
If the workflow includes sub-workflows, you'll receive a notification that the workflow will be invalid until all the missing sub-workflows are imported. You can import the sub-workflows using the Workflow Editor after the import completes.
-
If an integration is missing and its targets required by the workflow are not available, a link is provided in the description to go enable the integration in Cisco XDR. After you successfully configure the integration, go back to restart the import of the workflow and now you'll be able to choose the available target.
-
-
Click Continue to complete the import.
-
Click the imported workflow to open it in the Workflow Editor.
-
On the Successfully Imported Workflow dialog box, click OK.
-
Click the child workflow inside the parent workflow to open its properties.
Note: The error message in the properties contains the unique name of the sub-workflow that is missing.
-
Click Import Sub-Workflow. You can import the sub-workflow using one of the following methods:
-
Import from a Git repository - On the Git tab, choose a Git Repository, Filename, and Git Version, and then click Import.
Note: You can choose any Filename that is associated with the correct unique name and then choose any available Git Version.
-
Paste from a JSON file - Click the Browse tab, paste the contents of the JSON file into the text box, and click Import.
-
Browse to a JSON file on your system - On the Browse tab, click the Browse button, select the file to import, and click Import.
-
-
When the import completes, you'll receive an Import Complete message in the child workflow Properties.
There are two ways to export a workflow:
- From the workflow's Actions menu
- As a Git commit from the Workflow Editor
Export From the Workflow Actions Menu
You can export a workflow from the actions menu in the upper-right of the workflow card or Actions list. This will output the workflow as text or a JSON file.
-
On the All Workflows page, click the ellipsis (…) in the upper right corner of the workflow card to open the workflow menu, and choose Export.
-
If the workflow contains sub-workflows, the Workflow Contains Sub-Workflows dialog box will open and prompt you to include or exclude them in the output.
- Click Include Sub-Workflows if you need to manage them individually.
- Click Exclude Sub-Workflows if they already exist on your system or you intend to import them individually later.
- Click Cancel to stop the export process.
-
Use one of the following methods to export the workflow:
- Copy the text of the JSON file to the clipboard.
- Click Save to save the JSON file to your local system.
Export From the Workflow Editor
You can also use the Workflow Editor to export a workflow to a Git repository.
-
On the All Workflows page, click the workflow to open the workflow in the Workflow Editor.
-
In the Properties, click the Git Repository drop-down list, and choose a repository.
-
Click Share > Commit To Git.
-
In the Git Commit dialog box, enter a File Name and Commit Message.
-
Click Commit.
-
If the workflow contains sub-workflows or atomics, you'll be prompted to include or exclude them in the output.
-
Click Include Sub-Workflows if you need to manage them individually.
-
Click Exclude Sub-Workflows if they already exist on your system or you intend to import them individually later.
-
Click Cancel to stop the export process.
-
-
When the export completes, click OK on the Successfully Exported Workflow dialog box to finish the workflow export.