Slack (via webhooks)

Using Webhooks, Ondorse and Slack can work together.

📘

Slack

Ondorse does not provide a native integration with Slack yet. This page showcases how you can use Ondorse webhooks and a bit of technical skills to integrate Ondorse with Slack.

Example: notification when an application is created

In this example, we'll use the scripting tool Val Town but you can use other no-code services like Zappier, n8n etc.

  1. Create an account on Val Town
  2. Create a Slack app: visit https://api.slack.com/apps?new_app=1, create a new app From Scratch and fill up the form:
    • App Name: Ondorse bot
    • Workspace: your work workspace
  3. Create an incoming webhook for the Slack app:
    1. click Incoming Webhooks
    2. Click the Activate Incoming Webhooks toggle
    3. Scroll down, and click Add New Webhook to Workspace
    4. Select the Channel on which you'd like Ondorse applications to be sent to
    5. You’ll be taken back to the Incoming Webhooks page (if not, you can find it via the side bar) and copy the Webhook URL for the webhook you just created.
    6. Save the URL as a Val Town environment variable as slackOndorseWebhookURL.
  4. In Val Town, create a New val of type HTTP handler and copy-paste this script:
export default async function(req: Request): Promise<Response> {
  if (req.method !== "POST") {
    return Response.json({ ok: false, message: "Wrong method" });
  }

  const body = await req.json();
  const applicationName = body.data.object.organization_name;
  const applicationId = body.data.object.id;
  const applicationURL = `https://app.ondorse.co/applications/${applicationId}/`;

  const res = await fetch(Deno.env.get("slackOndorseWebhookURL"), {
    method: "POST",
    body: JSON.stringify({
      text: `New application: <${applicationURL}|${applicationName}>`,
    }),
  });

  return Response.json({ ok: true });
}
  1. Copy the val's HTTP endpoint's URL
  2. Create webhook via the webhooks settings page in Ondorse admin:
    1. Webhook URL: your val's HTTP endpoint URL
    2. Event: application.created
  3. Test it out: create an application in Ondorse and you should get a new message in the chosen channel. 🎉