Payments Data Platform | Modernbanc

Workflows

Workflows allow you to automate behavior both within Modernbanc and with external services. In this example, we'll create a workflow that sends a notification to Slack whenever a transaction is created in Modernbanc.

Create trigger to listen for transactions
  • Navigate to the Triggers tab in the settings dropdown or press G then I.
  • Click the Create button in the top right corner.
  • This URL will be used to receive a webhook payload from Stripe when a new transaction is created or completed.
Setup your Slack to handle external webhooks

In order to enable your Slack workspace to receive webhooks, you need to create an app and enable incoming webhooks. You can find more information on how to do this here.

Define steps of the workflow

Workflows are make up of steps. Each step executes the intended functionality. For our example, there is only one step, but there could be many:

  1. Connection query step - to connect to the Slack API and send a notification message to the intended channel

  • Navigate to the Workflows tab in the settings dropdown or press G and then W.
  • Click the Create button in the top right corner.
  • Click the + button to the left of the Add the first step in the workflow builder.
  • Select Query from the dropdown.
  • Click the + button on the right of the step, and add the Trigger we created in the previous step.
  • In the workflow step editor on the right, under Query select Query from the dropdown, and Http api for the type.
    • In the Parameters section, set Method to POST, URL to https://hooks.slack.com/services/<YOUR WEBHOOK URL HERE>, and Content-Type to json.

    • In the body, add the following:

      {
        "text": "Transaction created"
      }

Now, when transactions occur in your workspace, you will be notified in a dedicated Slack channel. You could alter this to be just for failed transactions, or ones that are above a certain amount, or any condition you want.

Success!
Slack notification on transaction
Success!

Congratulations! You have created your first workflow in Modernbanc.