Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Integrations
    • Overview
    • Workflows
    • EventRouter
  • Pricing policy
  • Terraform reference
  • Release notes

In this article:

  • Getting started
  • Create a service account
  • Create a function to filter data
  • Create a function to return email addresses
  • Create a workflow
  • Run the workflow
  • What's next
  1. Getting started
  2. Workflows

Getting started with Workflows

Written by
Yandex Cloud
Updated at March 27, 2025
  • Getting started
  • Create a service account
  • Create a function to filter data
  • Create a function to return email addresses
  • Create a workflow
  • Run the workflow
  • What's next

Note

Workflows is at the Preview stage. To gain access, submit a request in the management console.

Using this tutorial, you will create and run a workflow. During the execution of the workflow, the Yandex Cloud Functions functions will be called.

Getting startedGetting started

To get started in Yandex Cloud:

  1. Log in to the management console. If not signed up yet, navigate to the management console and follow the on-screen instructions.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and its status is ACTIVE or TRIAL_ACTIVE. If you do not have a billing account yet, create one.
  3. If you do not have a folder yet, create one.

Create a service accountCreate a service account

Management console
  1. In the management console, select the appropriate folder.
  2. From the list of services, select Identity and Access Management.
  3. Click Create service account.
  4. Enter a name for the service account: sa-for-function.
  5. Click Add role and select the functions.functionInvoker role.
  6. Click Create.

Create a function to filter dataCreate a function to filter data

Management console
  1. In the management console, select Cloud Functions.
  2. Create a function:
    1. In the top-right corner, click Create function.
    2. Enter the function name: filter-function.
    3. Click Create.
  3. Create a function version:
    1. In the Editor window that opens, select Node.js 18.
    2. Disable the Add files with code examples option.
    3. Click Continue.
    4. Create a file named index.js and add the following code into it:
      module.exports.handler = async function (data, context) {
          return {
              id: data.id,
              name: data.name,
              email: data.email,
          };
      };
      
    5. Under Parameters, specify the following in the field:
      • Entry point: index.handler
      • Service account: sa-for-function
    6. Click Save changes.

Create a function to return email addressesCreate a function to return email addresses

Management console
  1. In the management console, select Cloud Functions.
  2. Create a function:
    1. In the top-right corner, click Create function.
    2. Enter the function name: return-function.
    3. Click Create.
  3. Create a function version:
    1. In the Editor window that opens, select Node.js 18.
    2. Disable the Add files with code examples option.
    3. Click Continue.
    4. Create a file named index.js and add the following code into it:
      module.exports.handler = async function (data, context) {
          return {
              result: "OK",
              emails: data.loaded_users.map(p => p.email)
          };
      };
      
    5. Under Parameters, specify the following in the field:
      • Entry point: index.handler
      • Service account: sa-for-function
    6. Click Save changes.

Create a workflowCreate a workflow

Management console
  1. In the management console, select Serverless Integrations from the list of services.

  2. In the left-hand panel, select Workflows.

  3. In the top-right corner, click Create workflow.

  4. In the YaML specification field, add the specification below. Specify the following in the functionId field:

    • In the process_user_transform_info step, the filter-function ID.
    • In the upload_users step, the return-function ID.
    yawl: "0.1"
    start: get_users
    defaultRetryPolicy:
      maxDelay: 10s
      retryCount: 2
      errorList:
        - STEP_QUOTA_EXCEEDED
    steps:
      get_users:
        httpCall:
          url: 'https://jsonplaceholder.typicode.com/\(.resource_type)'
          method: GET
          headers: {}
          query: {}
          output: '\({loaded_users: .})'
          next: process_users
      process_users:
        foreach:
          input: \(.loaded_users)
          output: '\({loaded_users: .})'
          next: upload_users
          do:
            start: process_user_get_info
            steps:
              process_user_get_info:
                httpCall:
                  url: https://jsonplaceholder.typicode.com/users/\(.id)
                  method: GET
                  headers: {}
                  query: {}
                  next: process_user_transform_info
                  output: '\({user: .})'
                  retryPolicy:
                    retryCount: 2
                    errorList:
                      - HTTP_CALL_500
              process_user_transform_info:
                functionCall:
                  functionId: <function_ID>
      upload_users:
        functionCall:
          functionId: "<function_ID>"
          input: '\({loaded_users, resource_type})'
    
  5. Expand the Additional parameters section:

  6. In the Name field, enter the workflow name.

  7. In the Service account field, select the sa-for-function service account.

  8. Click Create.

Run the workflowRun the workflow

Management console
  1. Select a workflow.
  2. In the top-right corner, click Run.
  3. Enter input data in JSON format:
    {
      "resource_type": "users"
    }
    
  4. When the workflow status changes from Running to Completed, the following JSON object will appear in the Output data section:
    {
      "result": "OK",
      "emails": [
        "Sincere@april.biz",
        "Shanna@melissa.tv",
        "Nathan@yesenia.net",
        "Julianne.OConner@kory.org",
        "Lucio_Hettinger@annie.ca",
        "Karley_Dach@jasper.info",
        "Telly.Hoeger@billy.biz",
        "Sherwood@rosamond.me",
        "Chaim_McDermott@dana.io",
        "Rey.Padberg@karina.biz"
      ]
    }
    

What's nextWhat's next

  • Check out another example of a workflow specification
  • Read about the Workflows concepts

Was the article helpful?

Previous
Overview
Next
EventRouter
© 2025 Direct Cursus Technology L.L.C.