Import a Workflow

Import a Workflow into your Catalytic team using a .catalytic file, created by the Export Workflow method or via the Catalytic WebApp. This method returns the newly created Workflow.

Method Signature

import(filePath: string): Promise<Workflow>;
import(filePath: string, callback: (err?: Error, workflow: Workflow) => any): void;
import(filePath: string, password: string): Promise<Workflow>;
import(filePath: string, password: string, callback: (err?: Error, workflow: Workflow) => any): void;


filePathstringThe path to the Workflow Export File to use to create the Workflow
passwordstringOptional Password used to secure the export file
callback(err?: Error, workflow: Workflow) => anyOptional The callback
returnsWorkflowThe imported Workflow


 * This example demonstrates importing a Workflow from a password-secured
 * `.catalytic` Workflow export file.
const { CatalyticClient } = require('@catalytic/sdk');

const catalytic = new CatalyticClient();

const filePath = '/path/to/export/file.catalytic';
const password = 'MY_EXPORT_PASSWORD';

const workflow = await catalytic.workflows.import(filePath, password);