Creating and using recipes

Recipes allow users to share Flow templates with others without disclosing their non-shareable data such as credentials, fields, and variables.

Creating and activating recipes from UI

Creating the recipe

  1. Create a recipe from a flow by clicking on the Export to a recipe button.

    Export recipe
  2. You will automatically be directed to the created recipe, where you can activate it.

    Activate recipe

    You can also find the recipe by going to the recipes section.

    Activate recipe
  3. Click on the Activate button. You can now set up the recipe.

    The number of deployments of these recipes is displayed on each recipe card. Each deployment can include more than one integration flow and these are displayed when you click the Show Deployments button on the recipe card.

    Recipe card
    You can delete the recipe deployment by selecting the 'settings' menu on the recipe card. However, you can only delete recipe deployments with workspace visibility and only when you have the Admin role in the workspace. You can not delete public recipes (those with Tenant or Global visibility).

    This is the access URL of an individual recipe page:

    BASE_URL/c/CONTRACT_ID/recipes/RECIPE_ID

    If you have used this recipe before to create a flow, the Deployments page will list them all.

    Recipe deployments

    From here you can:

    • Open the flows if you have the required workspace access.

    • Upgrade the flow using a new recipe version if available.

    • Delete the recipe deployment. This severs the connection between flow and recipe.

    • Delete With Flows. Deleting the recipe deployment with the associated flows (one recipe deployment can contain more than one flow).

Recipe setup

  1. Specify the contract and Workspace to which the recipe will be activated. The recipe has an attribute visibility, which indicates how the recipe is shared by other clients. The default recipe visibility is workspace:

    Specify

    You can change the visibility using the API function Update recipe visibility:

    curl https://api.connect.squiz.cloud/v2/recipes/{RECIPE_ID}/visibility \
      -X PATCH \
      -u {EMAIL}:{APIKEY} \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' -d '
       {
         "data": {
           "visibility": "contract" (1)
         }
       }'
    1 The visibility field can take the following values: workspace, contract, or tenant.

    Workspace level means that the recipe is available to be activated in the current Workspace. Contract level means that the recipe available to be activated in any Workspace of the current Contract. Tenant level means that the recipe available to be activated into any Contract of the current Tenant.

    You can set the visibility level of the recipe according to the visibility of the used component in the recipe. You cannot downgrade recipe visibility level.

    After changing the visibility to contract, the recipe setup will look like this:

    Contract visibility

    And after changing the visibility to the tenant, the recipe setup will look like this:

    Tenant visibility
  2. Set up your credentials for every step. You can verify, edit, or delete credentials and choose the credentials you need:

    Set up credentials

    You can even create a new credential using the plus sign if you need it.

  3. After completing the recipe setup a new identical flow with the same name will be created:

    New flow

Recipe with topics

When you want to activate a recipe based on the flow with topics, follow the steps described in Creating and activating recipes from UI.

However, a recipe using topics can only be activated within one workspace.

You can see this limitation in the example flow based on the PubSub component:

Recipe with topic

Creating recipes using API

Creating new recipes

You can create a recipe from scratch provided you have workspaces.recipe.edit permission:

POST /v2/recipes/

More information is available in the API Documentation.

Creating recipes from an existing flow

To create a recipe from a chosen flow, use the following request, provided you have workspaces.recipe.edit permission:

POST /v2/flows/FLOW_ID/export-to-recipe

More information is available in the API Documentation.

Managing recipes using the API

The following actions with recipes are available:

Retrieve a recipe by ID

This resource allows you to retrieve a recipe by its ID.

To retrieve a recipe by its ID please use the following request, provided you are a member of the corresponding contract:

GET /v2/recipes/RECIPE_ID

More information is available in the API Documentation.

Retrieve all recipes

This resource allows you to retrieve all recipes.

To retrieve all recipes please use the following request:

GET /v2/recipes/

More information is available in the API Documentation.

Update a recipe

This resource allows you to update the given recipe.

To update the given recipe please use the following request, provided you have workspaces.recipe.edit permission:

PATCH /v2/recipes/RECIPE_ID

More information is available in the API Documentation.

Update a recipe visibility

This resource allows you to update the attribute visibility of the given recipe.

To update recipe visibility please use the following request:

PATCH /v2/recipes/RECIPE_ID/visibility

This request is authorized depending on the specified visibility level for a user that has the next permission:

  • To tenant if the user has The tenant.recipe.edit_visibility_tenant permission.

  • To contract if the user has The workspaces.recipe.edit permission.

  • To workspace if the user has The workspaces.recipe.edit permission.

More information is available in the API Documentation.

Activate a recipe - create a flow

This resource creates a flow from a recipe. If the recipe contains a component, which requires a credential, it should be provided among the request payload.

To activate a recipe please use the following request, provided you have workspaces.recipe.edit permission:

POST /v2/recipes/RECIPE_ID/activate

More information is available in the API Documentation.

Delete a recipe

This resource allows you to delete a recipe. To delete a recipe please use the following request:

DELETE /v2/recipe/RECIPE_ID