Possible architecture for tracking flows in GitHub

I thought I would share the progress of my project. I shared it on LinkedIn but this audience is much more technical so I'd love to get some feedback.

I'm creating a solution that will track changes to Genesys Cloud flows using GitHub. Once in GitHub I can then do interesting stuff when a flow changes such as:

  • Create Slack notifications for each change with change comparisons
  • Linting on expressions / catch common spelling mistakes
  • Alert of messages that stray from the brand voice
  • etc

Solution so far

The solution which I've diagrammed above is:

  1. The Genesys EventBridge Integration listens to the v2.flows.{id} topic.
  2. A Rule within Event Bridge listens for Publish events using the Event Pattern:
{
  "detail-type": ["v2.flows.{id}"],
  "detail": {
    "eventBody": {
      "currentOperation": {
        "actionStatus": ["SUCCESS"],
        "actionName": ["PUBLISH"]
      }
    }
  }
}
  1. These Publish events then trigger an EventBridge API destination, which in turn calls the GitHub API for triggering a workflow with the Flow ID & Published Flow Version
  2. The workflow then:
    1. Uses the Platform API endpoint /api/v2/flows/{flowId} to get details about the flow and who made the change
      • This endpoint only contains details about the last author who made the change, which means there is potential for a timing issue. Will look to see what is being used in the Architect UI to list Change Authors against a flow
    2. Uses the NPM package purecloud-flow-scripting-api-sdk-javascript to export the flow to YAML
    3. Commits the YAML, flow version, author of the change to Git repo
  3. The commit will then trigger other GitHub Actions that can do lots of fun and interesting inspections etc against the updated flow. I haven't started these yet but I will likely wrap these in a CLI so anyone else can easily use them.

I was hoping to remove the need for EventBridge by using Process Automation with a Trigger on v2.flows.{id} but this topic isn't supported yet.

Please do let me know if you can see improvements I can make - of which I am sure there are many.

Hey Lucas,

This is very cool. Once we get the Archy export public API endpoint complete, you could use the public API, CX as Code or the CLI to initiate an export without have to use the purecloud-flow-scripting-api-sdk-javascript package

Thanks,
John

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.