Skip to content
Skip to main content
POST
/v3/grants/{grant_id}/workflows

Create a workflow

Creates a grant-level workflow.

ℹ️ You must have an existing template to create a workflow.
NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. You can also use the email address associated with the grant, or use /me/ to refer to the grant associated with an access token.

Request body

Create workflow request

delayinteger

The number of minutes between a trigger_event being met and the workflow sending a message.

Default: 0
Example: 5
is_enabledboolean

When true, indicates that the workflow is enabled.

Default: true
Example: true
name*string

The name of the workflow.

Example: "New booking confirmation workflow"
template_id*string

The ID of the email template the workflow uses.

Example: "14c00cc8-648c-4381-ad10-52641d9bac8e"
trigger_event*string

The event which triggers the workflow.

booking.cancelledbooking.createdbooking.pendingbooking.reminderbooking.rescheduled
Example: "booking.created"
fromobjectnull

Details of the sender if the workflow should use transactional send. If not provided, the sender will be the grant associated with the trigger event.

Responses

request_id*string

The ID of the request.

data*object

A custom workflow that sends messages from a template when certain events are triggered.

POSThttps://api.us.nylas.com/v3/grants/nyla%40example.com/workflows

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. You can also use the email address associated with the grant, or use /me/ to refer to the grant associated with an access token.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.