Navigation

namedPipeline

On this page

Definition

namedPipeline

Executes a named pipeline, given its name and arguments. Named pipelines are pipelines that can be referenced elsewhere within a MongoDB Stitch app and by clients of the app.

Implementing the built-in namedPipeline action eliminates the need to use a literal stage bound to a pipeline with %%vars.

The namedPipeline action stage has the following syntax:

{ "service": "", "action": "namedPipeline", "args": { name: <name>, args: { <arg1>: <value1>, ... } } }

The namedPipeline action has the following arguments:

The namedPipeline action has the following argument:

Argument Type Description
name string Name of the pipeline to execute.
args document A document that contains the arguments to the specified pipeline to execute.

Example

The following pipeline consists of a single stage to execute the named pipeline sendSMS, which takes two arguments phone_number and owner_id:

[
   { service: "", action: "namedPipeline", args: {name: "sendSMS", args: {phone_number: "+19999999999", "owner_id":"foo" } } }
]
←   literal null  →