Listen to Events from Portant via Webhooks

Learn how to send data from Portant to your own apps

To send data from Portant to a Webhook, add the "Send events to Webhook" Workflow Block to your workflow.

By adding a "Send Webhook Events" block to your workflow you can capture events from your automations in Portant in your own app.

Webhook events are sent on a "per source item" basis. A source item is singular package of data from the workflow's source, for example in Google Sheets a single row is a single source item. For an automation that contains multiple source items Portant will send multiple webhook requests for each item.

Payload Schema

All webhook events sent from Portant will follow the same top level schema. The data payload will differ based on the type of event as specified by the event_type property.

Schema Example

{
  "data": {
    ... // Determined by the type of event
  },
  "event_id": "325d36e717d9ec0943a55857ae2d4988ce33fe4165330e4f",
  "event_type": "<EVENT_TYPE>"
}

Types of Events

Currently Portant has four types of events that your app can be notified about via webhooks. These events are dependent on the configuration of you workflow. For example you must have an email block to receive "Emails Created" events. The types of events are as follows.

Documents Created

The automation has created new documents such as Google Docs or Google Slides files and/or PDFs.

Workflow Configuration The must workflow contain a template block (Google Docs or Google Slides).

Schema

Mimetypes

Example Payload

{
  "data": {
    "documents": [
      {
        "id": "12XXXXX..................",
        "url": "https://docs.google.com/document/d/12XXXXX................../edit?usp=drivesdk",
        "name": "Invoice #1200",
        "mimetype": "application/vnd.google-apps.document"
      },
      {
        "id": "13XXXXX..................",
        "url": "https://drive.google.com/file/d/13XXXXX................../view?usp=drivesdk",
        "name": "Invoice #1200",
        "mimetype": "application/pdf"
      }
    ]
  },
  "eventId": "325d36e717d9ec0943a55857ae2d4988ce33fe4165330e4f",
  "eventType": "DOCUMENTS_CREATED"
}

Emails Created

The automation has created and sent emails.

Workflow Configuration The must workflow contain an email block (Gmail). This does not include signature requests.

Schema

Example Payload

{
  "data": {
    "emails": [
      {
        "to": "contact@portant.co",
        "subject": "Hello World",
        "message_id": "18xxxx........."
      }
    ]
  },
  "eventId": "eac17961e3edcfafcc064015131e8a518c9f375005b8cec2",
  "eventType": "EMAILS_CREATED"
}

Signatures Requested

The automation has sent out signature requests.

Workflow Configuration The must workflow contain a signature request block.

Schema

Example Payload

{
  "data": {
    "documents": [
      {
        "id": "10XXXXX.................",
        "url": "https://drive.google.com/file/d/10XXXXX................./view?usp=drivesdk",
        "name": "Employment Contact",
        "mimetype": "application/pdf"
      }
    ],
    "recipients": [
      {
        "email": "bwlockley@gmail.com",
        "order": 1,
        "status": "PENDING",
        "signature_url": "https://sign.portant.co/xxxxxxxxxxxxx"
      }
    ]
  },
  "eventId": "66de24a8c20fa439d47d92a683861f6852c2924632623377",
  "eventType": "SIGNATURES_REQUESTED"
}

Signatures Completed

All signature requests within this automation have been completed

Workflow Configuration The must workflow contain a signature request block.

Schema

The schema for this event is the same as the "Signatures Requested". The recipients.status field will be "COMPLETED" for all recipients.

Example Payload

{
  "data": {
    "documents": [
      {
        "id": "10XXXXX.................",
        "url": "https://drive.google.com/file/d/10XXXXX......../view?usp=drivesdk",
        "name": "Employment Contact",
        "mimetype": "application/pdf"
      }
    ],
    "recipients": [
      {
        "email": "bwlockley@gmail.com",
        "order": 1,
        "status": "COMPLETED",
        "signatureUrl": "https://sign.portant.co/xxxxxxxxxxxxx"
      }
    ]
  },
  "eventId": "72c32ca744baea46b4be710f052b14a9b73a29d77076e586",
  "eventType": "SIGNATURES_COMPLETED"
}

Last updated