Webhook step and integration secrets
The workflow screens are in Turkish; labels are shown as they appear, with their meaning in brackets.
The Webhook çağır (call webhook) step sends a request to an external system’s address at a point in the workflow: for example reporting an approved expense to the ERP, or an approved leave to the HR software. The step waits for no one and opens no task; the request goes in the background, and depending on the result the workflow continues on the Başarılı olursa (if successful) or Hata olursa (on error) path.
To set up this step you need to know the other system’s address and credentials; it is usually set up together with your company’s IT team.
Settings
Section titled “Settings”In the editor choose Adım ekle (add step) → Webhook çağır.
Address and request
Section titled “Address and request”| Setting | Values | What it does |
|---|---|---|
| Adres (https) (address) | An address starting with https://, at most 2,048 characters |
Where the request goes. Only https; private and local addresses and disallowed ports are rejected. Do not put a user name, password or secret value in the address. |
| Yöntem (method) | POST, PUT | The request method. |
| Zaman aşımı (sn) (timeout, seconds) | 1–30, default 10 | How long to wait for the other side’s response. |
| Yeniden deneme (retries) | 0–5, default 3 | On an error (5xx, timeout, connection) the request is retried at increasing intervals; 4xx responses are not retried. Every attempt is sent with the same idempotency key, so the other side can avoid processing the same request twice. |
Headers
Section titled “Headers”In the Başlıklar (headers) section, Başlık ekle (add header) adds up to 10 HTTP headers. Each header has a name and a value; the value is given in one of two ways:
- Düz değer (plain value): a value that is not secret, e.g.
Content-Language: tr. - Gizli anahtar (ad) (secret key, name): the value is not in the workflow definition but in your company’s secret store; here you
only write the secret’s name. Headers that carry credentials (
Authorization,X-Api-Key…) must always be given this way.
Signing key (optional)
Section titled “Signing key (optional)”İmza anahtarı (isteğe bağlı) (signing key, optional): if you give the name of a secret, the request body is signed with that key
(HMAC-SHA256, in the X-Webhook-Signature header). The other side can verify the signature to make sure the request came from
Defthand. Only the secret’s name is written, e.g. erp-signing.
Body to send
Section titled “Body to send”Gönderilecek gövde (body to send):
| Option | What is sent |
|---|---|
| Özet (süreç + karar özeti, cevap yok) (summary: process + decision summary, no answers) | The request’s ID, the step, the subject and the decisions taken so far (step, result, time). Submission answers, names and comments are not sent. |
| Seçilen gönderi alanları (selected submission fields) | Only the form fields you tick here (at most 50). No other answer is sent. |
Gönderilecek değişkenler (variables to send): the workflow variables you tick are sent as a separate section of the body; the other variables stay in the system. If the workflow has no variables, it says “Akışta değişken yok; önce bir Alan güncelle adımı ekleyin.” (The workflow has no variables; add an update field step first.)
If successful and on error
Section titled “If successful and on error”- Başarılı olursa (if successful): the step to go to when a 2xx response arrives.
- Hata olursa (on error): when the retries are used up, or on a permanent error (4xx, blocked address, missing secret key):
- Süreci başarısız bitir (end the process as failed; default): the request ends as Başarısız (failed).
- Şu adıma git (go to this step) → Hata yolu adımı (error path step): e.g. informing IT with a notification step. The step itself cannot be chosen.
- Hatayı kaydet, akışa devam et (log the error, continue the workflow): the error is written to the timeline and the workflow continues on the successful path.
- Onaylandı ile bitir (end as approved) or Reddedildi ile bitir (end as rejected).
Using the result in later steps
Section titled “Using the result in later steps”Later steps can read the webhook’s result: in a condition step, the source Webhook sonucu (webhook result) → Başarılı mı (succeeded?), Sonuç sınıfı (2xx…5xx, timeout, network, blocked) (result class), HTTP durum kodu (HTTP status code), Hata kodu (error code), Deneme sayısı (number of attempts). The same details can also be used as variables in notification templates.
The timeline shows the webhook’s result (succeeded, failed, number of attempts).
Integration secrets
Section titled “Integration secrets”The secret values used by name in headers and signatures (API key, signing key…) are kept on the Administration → Configuration → Integration secrets page. You need permission to manage secrets for this page.
Adding a secret
Section titled “Adding a secret”- Click Yeni gizli ekle (add new secret).
- Ad (name): must start with a lowercase letter; may contain lowercase letters, digits,
_and-; at most 64 characters. E.g.erp-api-key. - Değer (value): 1–4,096 characters.
- Click Ekle (add). You see “Gizli eklendi” (secret added).
The value is stored encrypted and never shown again; only the name is written into workflow definitions.
Managing secrets
Section titled “Managing secrets”The list shows each secret’s name, when it was last changed, and the workflows that use it (“Kullanan akışlar: …”, workflows using it) or the Kullanılmıyor (not used) label.
- Değiştir (change): replaces the value with a new one (Yeni değer, new value). The old value is not shown.
- Sil (delete): the value is deleted permanently. A draft that uses this name gives an error when it is published. A secret that is used in a published or running workflow version cannot be deleted; first publish a new version of the workflow that does not use this name and wait for the running processes to finish.
- If you see the Okunamıyor — değeri yeniden girin (cannot be read, enter the value again) label, enter the value again with Değiştir.
The Sunucu yapılandırması (server configuration) section lists, read-only, the secret names that the Defthand team has defined on the server side; if you add a secret with the same name, yours takes priority.
Example
Section titled “Example”Reporting an approved leave to the HR software:
| Setting | Value |
|---|---|
| Key | ik_sistemine_bildir |
| Adres (https) | https://ik.ornekfirma.com.tr/api/izinler |
| Yöntem | POST |
| Zaman aşımı (sn) | 10 |
| Yeniden deneme | 3 |
| Başlıklar | Authorization → Gizli anahtar (ad) ik-api-key |
| Gönderilecek gövde | Seçilen gönderi alanları: İzin türü (leave type), Başlangıç tarihi (start date), Bitiş tarihi (end date), Gün sayısı (number of days) |
| Gönderilecek değişkenler | onay_tarihi |
| Başarılı olursa | Onaylandı ile bitir |
| Hata olursa | Şu adıma git → bt_bilgilendir (a notification step) |