1. Tasks
  2. Get Stubposts

Tasks

Get Stubposts

Retrieves a stub's stubposts, newest first, optionally filtered by a query. Useful for reviewing a stub's history, finding earlier submissions of an action, and building summaries of past activity.

Basic Usage

Task to find the 5 most recent approve stubposts on the current stub and save them to stub data.

loading...

Parameters

stubref
optional
string

The stub whose stubposts to retrieve.

Default: ~~stub.stubref

query
optional
string | object

A MongoDB-formatted filter, as a JSON string or an object, used to narrow down the stubposts returned: {"action_name": "approve"}

Use a JSON string when the query uses $ operators, such as $regex or $in, so they are kept intact.

The query can only narrow down the stubposts of the stub given by stubref. It cannot be used to match stubposts on other stubs.

Default: All of the stub's stubposts

limit
optional
number

The maximum number of stubposts to return, between 1 and 50.

Default: 10

fieldname
optional
string

The name of the field in the stub data to save the stubposts to: approvals

Leave it out, or set it to false, to only return the stubposts in the task result without saving them to the stub.

projection
optional
string | object

A MongoDB-formatted projection, as a JSON string or an object, used to specify which stubpost fields to return.

Default: All fields except tasks, task_stages, notifications, metadata, stubbucks, stomp and action_stage_timestamps

Notes

  • Stubposts are returned newest first.
  • Only stubposts in the stub's own org can be retrieved.
  • This task cannot run on a dashboard enabled action.

Result

loading...

Properties

fieldname

The fieldname parameter given, if any: approvals


stubposts

An array of the stubposts retrieved, newest first. The array is empty when no stubposts match. The projection parameter determines which fields are included in the results.