Add Komos regulated browser ops template#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 222ad76965
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }, | ||
| "sendBody": true, | ||
| "specifyBody": "json", | ||
| "jsonBody": "={\n \"clientRequestId\": \"n8n-{{ $json.case_id }}-{{ Date.now() }}\",\n \"inputs\": {\n \"case_id\": \"{{ $json.case_id }}\",\n \"workflow_type\": \"{{ $json.workflow_type }}\",\n \"applicant_name\": \"{{ $json.applicant_name }}\",\n \"portal_url\": \"{{ $json.portal_url }}\",\n \"review_required\": {{ $json.review_required }}\n },\n \"metadata\": {\n \"source\": \"n8n\",\n \"use_case\": \"regulated_browser_operations\",\n \"industry\": \"{{ $json.industry }}\"\n }\n}", |
There was a problem hiding this comment.
Build request JSON as an object expression
The Queue Komos Task Run node constructs jsonBody by interpolating payload fields into a raw JSON string, which is fragile for real inputs: values like applicant_name or portal_url containing quotes/newlines can produce invalid JSON and cause the request to fail at runtime with JSON-format errors. This should be sent as a full object expression (for example ={{ {...} }}) so n8n performs proper escaping and preserves types reliably.
Useful? React with 👍 / 👎.
What does this PR add?\n\nAdds a Komos workflow template for queueing regulated browser operations from n8n. The template receives a case payload, normalizes CRA, banking, insurance, or HR ops fields, then calls the Komos public task-run API.\n\n## Template details\n\n- Category: hr\n- Services used: Komos public API, n8n Webhook, Code, HTTP Request, Set, Respond to Webhook\n- Tested on n8n version: workflow JSON validation only, no live Komos API key included\n\n## Validation\n\n- [x] Template is a valid n8n workflow JSON, checked with jq\n- [x] No personal credentials or API keys included\n- [x] File uses kebab-case naming\n- [x] Placed in the correct category folder\n- [x] Ran git diff --check\n- [x] Ran npm run build\n\nDisclosure: I am affiliated with Komos.