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.
- Create an account on Val Town
- 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
- Create an incoming webhook for the Slack app:
- click Incoming Webhooks
- Click the Activate Incoming Webhooks toggle
- Scroll down, and click Add New Webhook to Workspace
- Select the Channel on which you'd like Ondorse applications to be sent to
- 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.
- Save the URL as a Val Town environment variable as
slackOndorseWebhookURL
.
- 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 });
}
- Copy the val's HTTP endpoint's URL
- Create webhook via the webhooks settings page in Ondorse admin:
- Webhook URL: your val's HTTP endpoint URL
- Event:
application.submitted
- Test it out: create an application in Ondorse and you should get a new message in the chosen channel. 🎉
Updated 3 months ago