Creating your first workflow

Workflows are defined by one Transposit Dev Platform application and implement a functionality end-to-end (E.g. merge a change on Jenkins). You may also need to set up authorization and some configuration in order for the application to run.

A workflow application can be triggered with authentication and configurations (called environment variables in the Transposit Dev Platform) by workflows created in Mission Control. When a user creates a workflow, they are configuring the application to be ready to be used. A runbook step can contain various workflows.

This tutorial will guide you to make your first workflow in Python. JavaScript support is also available.

Creating your first workflow #

  1. Create your first runbook: In the Runbooks section in the left sidebar, you will create a new runbook. This will be the runbook you develop from. For now, you don’t really need to put anything in there, but you do need to Save it.
  2. Fork sample application: Go to this sample application and fork this app at the top of the page. Make sure to change the owner to the name of your organization, not your personal account.
  3. Add context parameter: Make sure you have a “context” parameter (type: object) in every operation of your application. This can be found in the right column of the text editor.
  4. Deploy application: In your application in the Transposit Dev Platform, go to Deploy > Mission Control and select your input (typically input_prompt) and execution operations (execute_js). You should use the latest tag for ease of development.
  5. Create a workflow: Go back to the main Transposit site and add workflows to your team by going to the Workflows section in the left sidebar. Select the application you just created and input any environment variables (if needed). Your application needs to be deployed to show up in the application picker. If you don’t see it, go back and give it a version in the commit code modal in the Transposit Dev Platform.
  6. Add a workflow to your runbook: Go back to the Runbooks section in the left sidebar and return to the runbook you created in step 1. In the Edit mode of a runbook, add a step to your runbook. Steps are delimited by H2s in Markdown. For example: ## Investigate. Click the Add workflow button at the top. Select the workflow you just created and save.
  7. Trigger an alert in Slack: You will trigger an alert based on the set up docs. See step 4 (I.e. curl [endpoint_url]). A message will be posted in the channel you previously setup and you can create your incident. In the incident Slack channel, open the runbook you created, click your workflow button, and hopefully you see your input operation being run!

Runbooks and workflows are re-loaded at every step, meaning if you make a change to a workflow or runbook you can return to the Browse Runbooks page and re-select it and it should show the updates (or even page to the next step and come back). Use /transposit to open the last runbook page you were on before you closed it.

If you want to better understand the operations that workflows use, learn error handling best practices, learn more about authentication, and more workflow concepts, see our Workflow concepts & best practices doc.