This is a clone of my post in the Robocorp forum.
I’m trying to get the trigger process github action to work, but I’m getting:
Error: Failed to start process - {"error":{"code":"NOT_AUTHORIZED","subCode":"","message":"Not authorized to read process !"}}
The above link says the API key should have the trigger_processes
permission and the action’s repo says it should have the read_runs
and trigger_processes
permissions. In any case, the API key those 2 permissions, as well as read_processes.
I can see that the key is being used, and there is only one .github/workflow file. The workflow is basically the same as the one in the tutorial but here it is for completeness:
name: Trigger a process in Control Room
on:
pull_request:
branches:
- dev
jobs:
run-process:
runs-on: ubuntu-latest
name: Trigger process
steps:
- name: Trigger Control Room process run
uses: robocorp/action-trigger-process@v1
with:
api-key: ${{ secrets.ROBOCORP_WORKSPACE_KEY_TRIGGER }}
workspace-id: ${{ secrets.ROBOCORP_WORKSPACE_ID }}
process-id: ${{ secrets.ROBOCORP_PROCESS_ID }}
payload: '{"foo":"bar"}'
await-complete: true
I’m also getting a warning (Please update the following actions to use Node.js 16: robocorp/action-trigger-process@v1
) but I don’t imagine that’s the issue.
What am I missing?
Thanks
I followed the tutorial, even added all of the permissions to the API key. I removed the other workflow .yml to help isolate any issues.
Nevermind, it seems it's working now. I'm guessing I hadn't correctly set the env.json
or used the correct access credentials. Once I reset the access credentials and set up a correct sequence of steps in my github actions workflow, this action worked fine.