Background, context, and business value
Search the ConSoSci v1 jobs for "auto" to view the workflow. See docs for background on how the solution works. Step A4 is a job that creates another job automatically via the openfn api.
The specific request, in as few words as possible
- Reconfigure/migrate the existing v1 automation workflow to run on app.openfn.org v2 - in this v2 test project
- Update job "A4" (see L422) for the part of the job that needs to be updated to use the new v2 openfn api
Input
Use this as an input to job A2, which will trigger job A4: 02b-syncToOpenFn.js (which needs to be edited)
{
"formId": "aJTDVjyPKssq7ukpvJdRKG",
"formUpdate": true,
"lastModified": "2024-11-27T14:02:10.908997Z",
"prefix1": "TT",
"prefix2": "",
"tableId": "SurvivalMonitoring",
"tag": "Survival Monitoring Bismarck (Full inventory)",
"url": "https://kf.kobotoolbox.org/api/v2/assets/aJTDVjyPKssq7ukpvJdRKG/?format=json"
}
Credentials
- Job A2 - use the below raw json cred and see LP
Trillion Trees Kobo
{"openfnInboxUrl":"{v1-inbox-url}","password":"{kobo-pwd}","type":"basic","username":"{kobo-UN}"}
- Job A4 - you will need to authorize with the openfn api... not sure what v2 requires (probably an api token), so discuss with TD if not clear.
Don't worry about running Job A3 for now - you can disable this step and focus on Jobs A2 and A4.
adaptor
openfn v2
see slack where i'm trying to find the latest docs
jobs
Job to be updated (labeled step A4 - see consosci project): 02b-syncToOpenFn.js
Testing notes
You should have a workflow in V2 that has at least 2 steps - A2 and A4. (Don't worry about running Job A3 for now - you can disable this step and focus on Jobs A2 and A4. )
- Run the above Input payload for job A2...this should trigger job A4.
- A4 should use the output of A2 to generate a job expression, and then create a new workflow in the same project.
- If you re-try the workflow using the same input, then it should upsert the existing workflow created after the first test.

Background, context, and business value
Search the ConSoSci v1 jobs for "auto" to view the workflow. See docs for background on how the solution works. Step A4 is a job that creates another job automatically via the openfn api.
The specific request, in as few words as possible
Input
Use this as an input to job A2, which will trigger job A4: 02b-syncToOpenFn.js (which needs to be edited)
Credentials
Trillion Trees KoboDon't worry about running Job A3 for now - you can disable this step and focus on Jobs A2 and A4.
adaptor
openfn v2
see slack where i'm trying to find the latest docs
jobs
Job to be updated (labeled step
A4- see consosci project): 02b-syncToOpenFn.jsTesting notes
You should have a workflow in V2 that has at least 2 steps - A2 and A4. (Don't worry about running Job A3 for now - you can disable this step and focus on Jobs A2 and A4. )