genesys-cloud-functions

Industrialized deployment of Genesys Cloud Functions

A GitHub template to develop, test, package and automatically deploy Genesys Cloud Functions through Terraform (Cx as Code) and GitHub Actions CI/CD pipelines.

Period
2025-Q1 — ongoing
Role
Design & development
Platforms
genesys-cloud
genesys-cloud terraform cx as code github-actions typescript terraform-cloud

Context

Genesys Cloud Functions arrived in early 2025. This type of Data Action makes it possible to embed and run code directly inside your Genesys Cloud organization. Thanks to serverless, all the code hosting is delegated to the platform.

💡 The full template is available on my GitHub: github.com/antoningar/genesys-cloud-functions. You can clone it to start your own functions with the CI/CD already in place.

Problem

Serverless solves hosting, but not the lifecycle: testing, validating, packaging and then deploying a function remains a manual, repetitive and error-prone operation. To focus on the code rather than on delivery, everything around the function needs to be industrialized.

Approach

A GitHub template that lays down a complete chain, from development to deployment:

Pipelines diagram: when a PR is opened, the CI validates the code, packages it, runs terraform plan and posts it as a comment; on merge, the CD applies the plan and deploys the function. State is read from/written to the Terraform Cloud backend

Deployment follows the Git workflow:

  1. When a Pull Request is opened / updated the function CI runs a secret scan (gitleaks), the tests, the lint and the build; the Terraform CI packages the function into a .zip, runs terraform init/validate/plan and posts the plan as a PR comment for review.
  2. When the PR is merged the CD repackages the function and runs terraform apply -auto-approve, which automatically deploys the function into the org.

Result

Technical stack

The template on GitHub

The full template is available open source: github.com/antoningar/genesys-cloud-functions. The repository contains the example function, the Terraform project (Cx as Code) and the ready-to-use GitHub Actions pipelines — clone it to start a new function with automated deployment already wired up.

Going further

Exporting Genesys Cloud prompts to CSV with a Function
Cleaning up Genesys Cloud agent scripts with a Function
Infrastructure as Code
My other work