A webhook receives data from an external system when an event happens and automatically sends this information to you. Semantik Invoice uses webhooks to provide real-time updates with other applications.

With this guide, you can set up custom notifications in your Slack channels when invoices are successfully processed in Semantik Invoice.

Instructions

Follow these steps to set up Semantik Invoice webhooks with Slack:

Semantik Invoice Steps

  1. Go to Settings > Export Setup.

  2. Click Add Integration.

  3. Select Webhook as your integration method.

  4. For the Integration Name, enter the name of your webhook. For example, enter “Slack.”

Slack Steps

  1. For the Destination URL, navigate to Slack API: Applications to create the webhook URL where the notifications will be sent. Click Create an App.

  2. Enter an App Name. This will be the name that provides the live updates from Semantik Invoice in your Slack channel.

  3. Click Create App. You will be redirected to the Settings screen for your app (figure 7).

  4. Click Incoming Webhooks.

  5. Turn on the Activate Incoming Webhooks toggle.

  6. Click Add New Webhook to Workspace. The following screen displays.

  7. Select a channel in your workspace. This will be the location where notifications are sent.

  8. Click Allow to generate the webhook URL. An example is shown below.

  9. Copy the webhook URL.


Semantik Invoice Steps

  1. Navigate back to the Webhook screen in Semantik Invoice (Settings > Export Setup > Add Integration).

  2. Paste the webhook URL from step 14 in the Destination URL field.
    Note: The Content Type is application/json by default.

  3. For the Custom Payload field, use the Slack Message Builder to format and preview the JSON payload that displays your Semantik Invoice notifications in Slack. An example is provided below.
    Note: For custom JSON payloads, ensure the variables are enclosed in double quotation marks (” “).

{ 
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Another invoice has been processed :tada:"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Invoice Number*: $InvoiceNumber"
},
{ "type": "mrkdwn",
"text": "*TotalAmount*: $$TotalAmount"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<$PdfUrl | Download PDF>"
}
}
]
}
  1. Click Test to test and establish the connection.
    Note: If your connection returns an error message, ensure the values in the required fields are accurate.

  2. Click Save to create the webhook. The Export Setup screen displays.

  3. Turn on the toggle for the webhook you created to activate the integration.

The JSON payload returns the following message formatting in Slack as an example:

Slack messaging example

Figure 1. Slack Notification Example

You have successfully configured your webhook with Slack! You will receive a notification in your selected channel when an invoice has been reviewed and validated.












Did this answer your question?