Importing / Exporting Projects and Workflows

Overview
Copied!

In Tray you can use Sandbox Workspaces and Projects to manage a classic dev > production setup.

Tray has a system whereby you can export and import projects (and individual workflows) as json files.

This allows you to fully test your projects and workflows in a 'development' environment (i.e. using test/sandbox accounts and test data) before exporting to a json file, ready to be imported to your 'production' environment.

The basic process
Copied!

  1. Create and test the project/workflow(s) in your test/dev workspace, using test/sandbox accounts and test data

  2. Once you are ready to publish the first version, export your workflow/project to a local json file and then import it to your production workspace

  3. In the process of your first import, create your production authentications

  4. Edit subsequent versions in the test/dev workspace, before importing again to the production workspace

Implementation notes
Copied!

  • When importing subsequent versions any workflow step settings will be overwritten by the settings in the new version:

  • There may be discrepancies between the service accounts you are accessing - e.g. your Google Sheets live account may not have the same sheet as your Google Sheets test account. In this case you will have to manually set the sheet in the destination workflow.

  • You will only need to create production authentications the first time you import

  • Any new services introduced to your workflows will need to be authenticated:

    • For example, if the first version of your solution only contained Slack as a third party service, but you introduced Gmail as another service in the next version, then when importing the next version to production you will need to create a new Gmail authentication

  • It is also possible to run a dev > staging > production setup - simply by creating a staging workspace as a second sandbox.

  • If you mistakenly import a workflow, or need to undo for any reason, you can do so with the Rollback Workflow History function.

Two workspace setup
Copied!

The following diagram shows probably the simplest example setup whereby you:

  1. Create one test/dev workspace as a sandbox

  2. Create one other production / public workspace:

Multiple workspace setup
Copied!

The following diagram shows a multiple workspace setup whereby you have sandbox and production / public workspaces for each department.

This may be more suited to larger organizations:

Projects
Copied!


Import / export projects manually
Copied!

If you are importing a project which has a Custom service, you will have to modify your exported JSON. Please see the section below:

Import Projects with a Custom Service
Copied!

To import a Project which contains a Custom service, You need to manipulate your exported JSON manually and then import it into the destination account.

Example Setup
Copied!

There is a project in the source account with a Custom service 'Acme'. We have exported this project in a JSON file 'project_Source-account-project'.

If you import this project as is into the destination account, you will see the following error:

To resolve this, follow the steps below:

Import / export projects via API
Copied!

It is possible to programatically Import and Export projects with our GraphQL APIs.

Importing and Exporting via API is only available to Embedded customers at this time

The first import will have to be done manually (as described above) in order to allow you to create the linked authentications in the target workflow(s).

If new services are added to any subsequent versions then you will need to run another manual import, as new authentications will need to be created

Individual workflows
Copied!


Import / export workflows manually
Copied!

If you are importing a workflow which has a Custom service, you will have to modify your exported JSON. Please see the section below:

Import Workflows with a Custom Service
Copied!

To import a Workflow which contains a Custom service, You need to manipulate your exported JSON manually and then import it into the destination account.

Example Setup
Copied!

There is a workflow in the source account with a Custom service 'Acme'. We have exported this workflow in a JSON file 'workflow_sourceWorkflow'.

If you import this project as is into the destination account, you will see the following error:

To resolve this, follow the steps below:

Import / export workflows via API
Copied!

It is possible to programatically Import and Export workflows with our GraphQL APIs.

Importing and Exporting via API is only available to Embedded customers at this time

The first import will have to be done manually (as described above) in order to allow you to create the linked authentications in the target workflow(s).

If new services are added to any subsequent versions then you will need to run another manual import, as new authentications will need to be created

Data limitation on Export size
Copied!

Please note that the project export size is limited to 6 Mb. If your project exceeds this limit, the export would fail with a 502 status code. It is highly unlikely to exceed the 6 megabytes and it should suffice your needs for all practical purposes.

In case you face this issue, please cross verify all your workflows for any hardcoded information. (example: hardcoding a million records of sales data in one of the steps in a variable instead of obtaining them from a API/connector call to the source system. You will be able to run and test your solution just as good but you wouldn't be able to export it because the project size would exceed 6 Mb of data)