Integrations January 22, 2025Updated: August 27, 2026

# Getting candidate applications with DIY webhook notifications

> A Pachca × Habr Career integration that sends you automatic notifications about new job applications. A detailed guide with examples and step-by-step instructions

Источник: https://pachca.com/en/blog/habr-career-webhook-integration

## A Pachca × Habr Career integration that sends you automatic notifications about new job applications

By Danila

![Getting candidate applications with DIY webhook notifications](https://pachca.com/blog/habr-career-webhook-integration.jpg)

[Incoming webhooks guide](https://dev.pachca.com/guides/incoming-webhooks?utm_source=pachca.com&utm_medium=blog&utm_campaign=dev-portal)

Webhook setup, payload format and integration examples

If your company is always hiring tech talent through Habr, the **Pachca × Habr Career** integration will make sure you never miss a notification about a new application. Habr doesn't have built-in webhooks for this, so we'll walk you through building an API app.

We've described the integration in detail so that anyone with development experience can set it up. We've also included code samples to make the job a lot easier.

### Technical details

**Script:** OAuth 2.0 authorization, fetching JSON, sending a webhook, APScheduler
**Language:** Python + Flask
**Difficulty:** Intermediate
**Author:** Danila, tech support manager
**Repository:** [https://github.com/doesntneedname/HabrCareerAPI/tree/main](https://github.com/doesntneedname/HabrCareerAPI/tree/main)

### Step 1: Setup

First, you'll need a `.venv` virtual environment. You can create it in any IDE. Just make sure you're on Python 3 or later and run the following in your terminal:

```bash
python3 -m venv .venv
```

You'll also need to install Flask, requests and APScheduler. Run these commands in your terminal one at a time:

```bash
pip install Flask
pip install requests
pip install apscheduler
```

### Step 2: Setup, part 2

Now you need the source code. Copy it from here: [https://github.com/doesntneedname/HabrCareerAPI/blob/main/main.py](https://github.com/doesntneedname/HabrCareerAPI/blob/main/main.py)

```python
from flask import Flask, redirect, request, session, jsonify, json
from flask_apscheduler import APScheduler
import requests
import urllib.parse
import math

app = Flask(__name__)
```

Setup isn't quite done yet. Create two empty files in the `.venv` folder: `cached_applies.json` and `access_token.txt`.

### Step 3: Configure and run

Now you need to set values for a few constants. Each one is explained in the code comments marked with `#`.

Read through the code comments carefully and fill in your data (except `WEBHOOK_URL`, which you'll get when you create the integration in Pachca). You can also adjust the timer for how often the app runs its loop, along with other marked variables, based on their descriptions. For example: one request to the server and a check every minute.

### Step 4: Receive the webhook in Pachca

In this step, you'll teach Pachca to accept the webhook from your app. Here's how:

1.  **Create a new integration under "Automations" → "Chatbots and webhooks"**. If you plan to show the data in several chats, choose the "For multiple chats" integration type.

2.  **Next, write a message template** to display the data sent to Pachca. The keys must match the payload keys in the code:

```liquid
👨💻New application for {{vacancy_title}} from {{user_name}}!
Experience: {{experience}} years
Resume: {{link}}
Email: {{email}}
Telegram: https://telegram.me/{{telegram}}
{{habr_profile_link}}
{{body}}
```

3.  **Go to the "Incoming webhook" tab and paste in the template.**

4.  **Copy the webhook URL and paste it into the code in place of `WEBHOOK_URL`.**

5.  **Go to the chat where you want to see new application notifications.** Open the member list → Integrations and add the webhook you created with `+`.

### Step 5: Launch

All that's left is to run the code on a local server:

1.  Run your code in the IDE terminal. The app will print a link to the local server in the terminal. Don't confuse this with simply running the code.
2.  Open the link and click Login.
3.  Lean back in your chair and watch new applications roll into your work chat.

Bonus: when a new candidate applies, you can discuss them with your colleagues right in a [thread](https://pachca.com/en/blog/chto-takoe-skvoznye-tredy-i-kak-ih-ispolzovat) under the bot's message.
