Notebook: Execute Node

The Notebook: Execute Node allows a workflow to request an execution of one of your Losant Notebooks.

Notebook: Execute Node

NOTE this node does not wait for a notebook execution to complete. It only requests the execution of a notebook. If you want to react to the completion of a notebook in a workflow, you will want to use the Notebook Trigger.

Node Properties

There are three main parts of the properties for this node …

Notebook

Notebook Configuration

You must select what notebook you would like to execute. This will list all the notebooks in your current application, but you can also use a string template that resolves to a notebook ID to dynamically control what notebook to execute.

Time

Notebook Time Configuration

Optionally, the timestamp to use as the Query Time for the notebook execution can be changed.

  • Use the time of the current payload: Use the time of the current workflow payload as the query time. This is the default option.
  • Use the current time: Use the current time as of the execution of this node as the query time. The current time will often be very similar to the timestamp on the current workflow payload, but not always (depending on the length of time running the workflow takes) - and can in fact be drastically different in the case of non-realtime state reports triggering a workflow.
  • Use the time at the specified payload path: You can use this option to hand in a completely custom query time. When this option is selected, you provide a payload path to the desired query time. When specifying a payload path, the workflow expects the timestamp to conform to the same rules as a timestamp on a state report.

Response

Notebook Response Configuration

Optionally, you can store the response to the notebook execution request on your workflow payload. Notebook execution requests can be rejected for a variety of reasons, so we recommend that you store this response and check it.

Node Example

Given a response path of executionResponse, a successful execution request might look like:

{
  "executionResponse": {
    "success": true,
    "executionId":"51c40a11501297850136c5b13"
  },
  ...
}

Node Errors

Given a response path of executionResponse, a failed execution request might look like:

{
  "executionResponse": {
    "error": {
      "type": "NotFound",
      "message": "Notebook was not found"
    }
  },
  ...
}

There are two common errors that can occur with this node:

  • Notebook was not found: This means that the notebook you requested to execute was not found. It may have been deleted elsewhere, or you may be dynamically resolving to a notebook ID that does not exist.
  • No more notebook executions available at this time: This means that you are out of either total minutes available for notebook executions this billing period, or there are too many concurrent notebook executions currently running in your account

Node Throttling and Limits

While the Notebook: Execute node itself does not have any built in throttles or limits, the underlying notebook executions have various ones that can affect the use of this node. You can read more about them here.

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.