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.
- Navigate to the
Triggers
tab in the settings dropdown or pressG
thenI
. - 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.
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.
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:
- 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 pressG
and thenW
. - Click the
Create
button in the top right corner. - Click the
+
button to the left of theAdd 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, andHttp api
for the type.-
In the Parameters section, set
Method
toPOST
,URL
tohttps://hooks.slack.com/services/<YOUR WEBHOOK URL HERE>
, andContent-Type
tojson
. -
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.
Congratulations! You have created your first workflow in Modernbanc.