Skip to main content

Send webhook on documents opening

Send webhooks to your service the moment altaFlow documents are opened. Track engagement in real time, subscribe with REST API, and trigger downstream systems.

This is a paid bot, and its usage will be counted toward your plan's credits limit. For more information about credit usage, refer to this article.

How the Send webhook on documents opening bot works

Track altaFlow document engagement in real time. The bot sends a webhook the moment a recipient opens a contract, invoice, or other document — gathers data, formats it as JSON, and posts it to your callback URL. Perfect for engagement analytics, sales activity tracking, or triggering downstream automations in your CRM.

Use case example: Track when prospects first open your proposal — instantly log the event in your sales analytics tool, notify the assigned rep, or start a countdown to a follow-up sequence.

Installation

1. Hover over the step you intend to automate and select the +Add Bot to Step option.

Add Bot to Step option in altaFlow workflow diagram

2. Find the Send webhook on documents opening bot and click Install bot to add the bot to your workflow.

Send webhook on documents opening bot in altaFlow bot library

3. In the infobox, you'll find the Authorization token, which you will need for all API requests related to this bot.

Authorization token infobox for altaFlow webhook on opening bot

Copy it and paste it as the Authorization header value in Postman or any other console of your choice.

Authorization header setup in Postman for altaFlow webhook subscription

Note: The slate_addons will have a single token within different workflow versions. Using this token, users will be able to access the data from all slate_addons and different workflow versions.

The bot operates within versioning. If the versioning doesn't display, it means that your workflow only has one version by default that is always up to date. Versioning will become available right after you create another workflow version.

4. Configure the bot execution conditions and advanced settings as needed.

Conditions

Set conditions to send webhooks only in specific scenarios. Common use cases include:

  • Skip internal opens: Add a "recipient email does not contain @yourcompany.com" condition to prevent noisy internal test events from polluting your analytics pipeline.

  • First-open only: Combine with document tags to fire only on the first open per document — perfect for first-touch attribution.

  • VIP prospect tracking: Send webhook only when a "Client tier" field equals "Enterprise" — keeps executive dashboards focused on top accounts.

  • Environment routing: Post to a staging callback URL when a "Test mode" field is set, production URL otherwise — safe for CI/CD pipelines.

Learn more about bot conditions usage in the dedicated bot execution conditions article.

Advanced settings

Fine-tune webhook delivery on opens:

  • Run frequency: The bot fires each time the document is opened by default. Use a "first open" condition (with document tags) if downstream services should only receive one event per document.

  • Failure handling: If the callback service returns non-200, the bot retries 3 times at 1-hour intervals. Choose whether to skip after retries or halt the workflow.

  • Document tags: Tag documents that triggered an opening webhook (e.g., "webhook-opened") for audit trails — check the bots log section for delivery history.

Learn more about adjusting Advanced settings in the bot setup glossary.

Once ready, click Apply.

Apply button for altaFlow webhook on opening bot configuration

Make a request to subscribe for document opening events

Use the POST /webhook-bot/v2/subscription endpoint to subscribe for document opening events.

Request example:

curl \
--request POST \
--url 'https://bots.airslate.com/webhook-bot/v2/subscription' \
--header 'Authorization: {{authorization_token}}' \
--header 'Content-Type: text/plain' \
--data-raw '{
  "data": {
    "type": "subscriptions",
    "attributes": {
      "callback_url": "https://automation.pdffillers.com/report/whprefill"
    }
  }
}'

bots.airslate.com — the hostname that should be used in subsequent requests for US-based services.

bots.airslate-au.com — the hostname that should be used in subsequent requests for AU-based services.

callback_url — the service URL that will receive webhooks.

Subscription API response for altaFlow opening webhook

Status codes: 200 (success), 400 (bad request), 401 (unauthorized), 403 (bot disabled).

Webhook response

Every time the bot is triggered (when an altaFlow document is opened), a webhook containing data needed to get the specific document is sent in a POST request to the {callback_url} of your service.

Webhook POST payload with flow_id, slate_id, revision_id, organization_id

flow_id — the unique workflow identifier where a document was opened.
slate_addon_id — the unique identifier of the bot setup in a particular workflow.
slate_id — the unique identifier of the opened document.
revision_id — the unique identifier of the opened document revision.
organization_id — the unique identifier of your workspace.

Note: If the callback service is currently unavailable or the response code is not 200, the bot will retry sending the webhook three times at one-hour intervals. You can always check the status of the webhook in the bots log section.

Webhook management endpoints

Full API reference with Fetch, Subscription review, Delete, and Statistics endpoints — plus PHP and Node.js code examples — is available in the sections below.

Fetch

curl \
--request GET \
--url 'https://bots.airslate.com/webhook-bot/v2/fetch?filter[slate_id]={slate_id_1}&filter[revision_id]={revision_id_1}' \
--header 'Authorization: {{authorization_token}}'

Subscription review

curl \
--request GET \
--url 'https://bots.airslate.com/webhook-bot/v2/subscription' \
--header 'Authorization: {{authorization_token}}'

Delete (unsubscribe)

curl \
--request DELETE \
--url 'https://bots.airslate.com/webhook-bot/v2/subscription/{subscription_id}' \
--header 'Authorization: {{authorization_token}}'

Returns 204 on success (no response body).

Statistics

curl \
--request GET \
--url 'https://bots.airslate.com/webhook-bot/stats' \
--header 'Authorization: {{authorization_token}}'

Filter by document IDs, revision IDs, or flow revision IDs using query parameters like filter[slate_ids], filter[revision_ids], or filter[flow_revision_ids].

Code examples

PHP code

<?php
require 'vendor/autoload.php';use GuzzleHttp\Client;$client = new Client([
  'base_uri' => 'https://bots.airslate.com/',
  'headers' => ['Authorization' => 'your-token']
]);$url = '/webhook-bot/v2/subscription';
$statsUrl = '/webhook-bot/stats';$body = [
  "data" => [
    "type" => "subscriptions",
    "attributes" => ["callback_url" => 'https://your-callback-url']
  ]
];// Add new subscription
$subscribeResponse = $client->post($url, ['json' => $body]);// Review subscriptions
$viewResponse = $client->get($url);
echo $viewResponse->getBody()->getContents();// Unsubscribe
$id = json_decode($subscribeResponse->getBody()->getContents(), true)['data']['id'];
$client->delete($url . '/' . $id);// Review webhook statistics
$statsResponse = $client->get($statsUrl);
echo $statsResponse->getBody()->getContents();

Find the full code in this GitHub example.

Node.js code

const https = require('https');// Add new subscription
const subscribeReq = https.request({
  hostname: 'bots.airslate.com',
  path: '/webhook-bot/v2/subscription',
  method: 'POST',
  headers: { Authorization: 'your-token' }
}, res => {
  res.on('data', d => process.stdout.write(d));
});const data = new TextEncoder().encode(JSON.stringify({
  data: {
    type: 'subscriptions',
    attributes: { callback_url: 'https://your-callback-url' }
  }
}));subscribeReq.write(data);
subscribeReq.end();

Additional GET/DELETE examples follow the same pattern. Find the full Node.js code in this GitHub example.

Did this answer your question?