Skip to content

Databases and app builders

Send Agreements From a Notion Database

Send a SignatureAPI agreement from a Notion database button or automation. Notion's Send webhook action calls an automation tool, which creates the envelope.

Notion databases can start a flow from a button or an automation with the Send webhook action. Notion sends its own payload, not a SignatureAPI request body, so the webhook goes to an automation tool, and that tool’s HTTP step creates the envelope. No SignatureAPI app is needed.

Before you start

Send the envelope

1

Create a webhook in the tool

In your automation tool, create a webhook trigger and copy its URL.

2

Add the Send webhook action

In a database button or database automation, click Add action, choose Send webhook and enter the tool’s URL. In an automation you can select the properties to send, such as the signer’s name and email. Notion sends only database page properties, never page contents, and webhooks only use POST.

3

Create the envelope in the tool

Notion can’t preview the payload, so trigger the action once and read what the tool received. Then add an HTTP step that sends this request, mapping the name, email and page id from the payload. Store the key in the tool’s credential storage.

HTTP request step

Settings for the "Service agreement" request.

SettingValue
Method POST
URL https://api.signatureapi.com/v1/envelopes
Header X-API-Key: YOUR_API_KEY

Store the key in your tool's secret or credential storage when it has one.

Header Content-Type: application/json
Body (raw JSON)The JSON below.
Body (raw JSON)
{
  "title": "Service Agreement - Jane Doe",
  "message": "Please review and sign the service agreement.",
  "metadata": {
    "source": "notion",
    "page_id": "1a2b3c4d5e6f47a8b9c0d1e2f3a4b5c6"
  },
  "topics": [
    "no_code",
    "notion"
  ],
  "documents": [
    {
      "key": "service_agreement",
      "url": "https://pub-9cb75390636c4a8a83a6f76da33d7f45.r2.dev/docs-samples/service-agreement.pdf",
      "format": "pdf",
      "fixed_positions": [
        {
          "place_key": "signer_signature",
          "page": 1,
          "top": 172,
          "left": 210
        }
      ],
      "places": [
        {
          "key": "signer_signature",
          "type": "signature",
          "recipient_key": "signer"
        }
      ]
    }
  ],
  "recipients": [
    {
      "type": "signer",
      "key": "signer",
      "name": "Jane Doe",
      "email": "jane.doe@example.com"
    }
  ]
}

data.envelope_metadata.page_id comes back in every webhook event for this envelope, and the notion topic lets an endpoint receive only these envelopes. Notion allows five webhook actions per automation.

Get the result back

Build a second scenario or workflow in the same tool, as in Make.

1

Register the tool's URL in SignatureAPI

Create a second inbound webhook in the tool. In the Dashboard, add a webhook endpoint in test mode with that URL, subscribe to deliverable.generated, which fires when the signed PDF is ready, and add the notion topic. The envelope.completed event comes earlier, while the PDF may still be generating, so use it only to update a status.

2

Read the envelope before you act

Anyone who knows a webhook URL can call it, so read the envelope with your key before you update the page. Put the id from data.envelope_id in the URL:

HTTP request step

Settings for the "Completed envelope" request.

SettingValue
Method GET
URL https://api.signatureapi.com/v1/envelopes/eb4cf433-a8af-4161-b37b-7ef57d423e56
Header X-API-Key: YOUR_API_KEY

Store the key in your tool's secret or credential storage when it has one.

3

Update the page

Send a PATCH request to https://api.notion.com/v1/pages/{page_id} with your Notion connection token as a bearer token and a Notion-Version header, using metadata.page_id as the page id. Set a property with a body such as { "properties": { "Status": { "select": { "name": "Signed" } } } } (Notion reference).

When deliverable.status is generated, deliverable.url downloads the signed PDF. That link expires after an hour, so download the file in the same run. If your account uses authenticated deliverable URLs, send your API key with the download. The same event can arrive twice, so skip a page that already shows Signed. See Webhooks.