Getting candidate applications with homemade webhook notifications
A Pachca × Habr Career integration that sends you automatic notifications about new job applications

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
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:
python3 -m venv .venv
You'll also need to install Flask and requests. Run these commands in your terminal one at a time:
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
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. Every step like this is described in the code with # comments.
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:
-
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.
-
Next, write a message template to display the data sent to Pachca. The keys must match the payload keys in the code:
👨💻New application for {{vacancy_title}} from {{user_name}}!
Experience: {{experience}} years
Resume: {{link}}
Email: {{email}}
Telegram: https://telegram.me/{{telegram}}
{{habr_profile_link}}
{{body}}
-
Go to the "Incoming webhook" tab and paste in the template.
-
Copy the webhook URL and paste it into the code in place of
WEBHOOK_URL. -
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:
- 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.
- Open the link and click Login.
- 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 under the bot's message.


