Listen to Events from Portant via Webhooks
Learn how to send data from Portant to your own apps
Last updated
Learn how to send data from Portant to your own apps
Last updated
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.
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.
event_id
A unique id generated for this event
event_type
Specified what can be inspected in the data
payload as specified below.
data
The data relating to this particular event. The schema will differ based on the eventType
.
Schema Example
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.
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
documents
An array of all the documents created for this source item.
documents.id
The Google Drive id for this file.
documents.url
The Google Drive url to this file.
documents.name
The name of the file as it is in the Google Drive.
documents.mimetype
The mimetype of the Google Drive file. See below
Mimetypes
application/vnd.google-apps.document
Google Docs file
application/vnd.google-apps.presentation
Google Slides file
application/pdf
PDF Document
Example Payload
The automation has created and sent emails.
Workflow Configuration The must workflow contain an email block (Gmail). This does not include signature requests.
Schema
emails
An array of all the emails created for this source item.
emails.message_id
The Gmail message id.
emails.to
The comma separated string of addresses this email was sent to.
emails.subject
The subject of the email that was sent.
Example Payload
The automation has sent out signature requests.
Workflow Configuration The must workflow contain a signature request block.
Schema
documents
An array of all the document created for this source item. The data within this payload is the same as the "Documents Created" event. (see above).
recipients
An array of recipients of signature requests within this workflow.
recipients.email
The email of this recipient.
recipients.order
The order in which this user will complete the signature requests
recipients.status
The current status of the signature request. This will always be "PENDING" for this event.
recipients.signature_url
The URL to the signature portal for the recipient to complete this signature request.
Example Payload
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