Creating your first action

An action is defined by a Transposit Developer Platform application and implement a functionality end-to-end (E.g. merge a change on Jenkins, get the last 10 git commits, update the StatusPage incident page, etc.) You may also need to set up authorization and some configuration in order for the application to run.

An action can be triggered with authentication and environment variables in a runbook. When you create an action application, you are creating a action that can be added to any runbook.

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

Creating your first action #

  1. Create your first runbook: In the top navigation, go to the Runbooks section. Create a New runbook. This will be the runbook you develop from. For now, you don’t really need to put anything in there other than a title. Make sure to Save your runbook!
  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. Deploy application: In your application in the Transposit Developer Platform, go to Deploy > Mission Control and select your input (named input_prompt) and execution operations (named execute_wrapper). You should use the latest tag for ease of development.
  4. Add the action: Go back to the main Transposit site and the runbook you created. Select + Add to add a step and give it a name, then add an + Action. Select My Applications and 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, make sure you completed Step 3. Make sure to Save your runbook!
  5. Test your acton: You can create an activity using + New in the top right. After you are in the activity (incident or task), navigate to your Runbooks in the right navigation and select the runbook you created. Once you run it, you can select the action you created to test it. You will see the results in the activity's Timeline and in Slack you previously setup.

If you make a changes to an action or runbook, once you open the runbook or run an action again it should show the updates. In Slack, use /transposit to open the last runbook page you were on before you closed it.

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