RoboRewsty: Instructions for creating tasks that can just be copy pasted from output.
E
Eburnean Cardinal
So if RoboRewsty is prompted to create the task, after referencing the input to match the request to the relevant pack and then subsequent action within the pack.
It will do it if prompted but it can forget stuff like transitionIDs etc which lead to errors when pasting to Canvas
From using the copy feature for a task in canvas then pasting it into IDE, the structure of tasks which can be pasted appears to be wrapped lilke below:
{"type": "TASK","data": {}}
There's a bit more to this I have as cursor rules, with some of it being speculation - such as just assuming taskIDs are stripped GUIDs, I usually just generate a noop to get a valid taskID then use that ID in place but this is very manual.
Here are the rules for context, I've never interacted with GQL much so you might have to infer a bit from speculation...
---
Rule 2: Task ID Format
- Task IDs MUST be GUID format with stripped dashes
- Examples: "0195957959017e998b8d3dae7b7"
- NEVER use task names as IDs
- NEVER use placeholder or empty IDs
Rule 3: Action ID Requirements
- data.action.idMUST be a real action ID from actions.json
- data.actionIdfield MUST be present in main task body with same value asdata.action.id
- Always reference the correct pack's action ID
Rule 4: Transition Structure
Transitions MUST follow this exact format:
"publish": [{"key": "variable_name","value": "{ { CTX.variable_value } }"}]
- Transition ID must be GUID with stripped dashes
- doshould be empty array[]for publish transitions # This is just to stop errors while I use it in cursor, I'm sure there's a better way of understanding the next task with workflow context but from my position/use I just leave it empty then use the canvas to join the tasks
- Use proper Jinja2 syntax for values
Rule 5: Variable Naming
- publishResultAsshould be a simple variable name (no CTX. prefix, no Jinja syntax)
- Examples: "user_data","ticket_info","api_response"
- Server-side automatically handles CTX prefixing
Rule 6: Required Fields
Every task MUST include:
- actionId: Same value asaction.id
- workflowId: If unknown, ask user explicitly
- __typename: Must be"WorkflowTask"
- join: Always integer (usually 0)
Rule 7: Action Object Structure
Action objects MUST include:
"action": {"__typename": "Action","id": "real-action-id-from-actions.json",// other action properties}
Rule 8: Copy-Paste Compatibility
For workflow canvas compatibility:
- All required fields must be present
- Use exact action IDs from actions.json
- Include complete action objects with pack references
- Follow proper nesting structure
Validation Checklist
Before generating any workflow task:
- [ ] Task wrapped in {"type": "TASK", "data": {...}}
- [ ] Task ID is GUID with stripped dashes
- [ ] Action ID exists in actions.json
- [ ] actionId field present in main body
- [ ] workflowId field present (ask if unknown)
- [ ] \_\_typename is "WorkflowTask"
- [ ] Action has \_\_typename "Action"
- [ ] Transitions use proper publish array format
- [ ] publishResultAs uses simple variable names
- [ ] join is integer (usually 0)
---
The inline markdown is expanded for readability; the rewst canvas copy pastes tasks as json string / compressed.
Standard Task Template
{"type":"TASK","data": {"id": "01959579-5901-7e99-8b8d-3dae7b73a955","name": "Task Name","description": "Task description","input": {},"metadata": {"x": 100, "y": 100},"publishResultAs": "result_variable","runAsOrgId": null,"securitySchema": {"redact": {"input": [], "result": []}},"timeout": 600,"with": null,"isMocked": false,"mockInput": {},"transitionMode": "FOLLOW_ALL","humanSecondsSaved": 0,"join": 0,"packOverrides": [],"actionId": "01959579-5901-7e99-8b8d-3dae7b73a955","workflowId": "workflow-guid-here","__typename": "WorkflowTask","action": { "__typename": "Action", "id": "01959579-5901-7e99-8b8d-3dae7b73a955", "name": "Action Name", "description": "Action description", "pack": { "id": "pack-id", "name": "Pack Name", "ref": "pack_ref" }},"next": [ { "id": "01959579-5901-7e99-8b8d-3dae7b73a956", "do": [], "when": "{ { SUCCEEDED } }","label": "Success","publish": [{"key": "result_variable", "value": "{ { CTX.task_result } }"}]}]}}
Transition Patterns
Success Transition
{"id":"guid-with-stripped-dashes","do":[],"when":"{{SUCCEEDED}}","label":"Success Path","publish"[{"key":"variable_name","value":"{{CTX.some_value}}"}]}
Log In
E
Eburnean Cardinal
Finally, again these are all just for reference on the method to the madness - I had a system prompt to try to reduce these errors so I can bankrupt myself with cursor max / claude code and generate workflows with excessive logging tasks (joke, probably)
Here is the prompt, initially starting as variable of automation expert system prompt for robo
---
You are an expert in creating Rewst workflow automation tasks. Rewst is a workflow automation platform that uses a specific JSON structure for defining workflow tasks. This prompt provides all the constraints and patterns you must follow when creating or modifying Rewst workflows.
Constraints
- Task Structure
MANDATORY: Every task MUST follow this exact structure:
"{\n\"type\": \"TASK\",\n\"data\": {\n\n}\n}"
- Required Fields
Every task MUST include these fields:
"id": Unique task identifier (string)
"name": Task name (string)
"description": Task description (string)
"input": Input object (see input rules below)
"metadata": Object with x, y coordinates
"publishResultAs": Result variable name or null
"runAsOrgId": Organization ID or null
"securitySchema": Security configuration object
"timeout": Timeout in seconds (integer)
"with": With clause or null
"isMocked": Boolean for mock mode
"mockInput": Mock data object
"transitionMode": "FOLLOW_ALL" or other mode
"humanSecondsSaved": Integer (usually 0)
"join": Integer (usually 0)
"packOverrides": Array (usually empty)
"__typename": "WorkflowTask"
"actionId": Action ID (string)
"action": Complete action object (see action rules below)
"next": Array of transitions (see transition rules below)
- Input Handling
For No-Op Tasks (core.noop actions):
MUST have empty input: "input": {}
NEVER include variables in input
Variables MUST be passed via publish arrays in transitions
For API Request Tasks (non-noop actions):
CAN have input with actual parameters
Use CTX.variable format for dynamic values
Include all required parameters for the action
E
Eburnean Cardinal
- Variable Reference Format
MANDATORY: All variables use this format:
"{{ CTX.variable_name }}"
Examples:
"{{ CTX.ticket_id }}"
"{{ CTX.server_hostname }}"
"{{ CTX.customer_id }}"
- Action Structure
Every action object MUST include:
"{\"action\": {\n\"__typename\": \"Action\",\n\"defaultHumanSecondsSaved\": 0,\n\"ref\": \"pack.action_name\",\n\"id\": \"action-uuid\",\n\"name\": \"Action Name\",\n\"description\": \"Action description\",\n\"parameters\": {},\n\"icon\": null,\n\"workflow\": null,\n\"pack\": {\n\"__typename\": \"Pack\",\n\"id\": \"pack-uuid\",\n\"name\": \"Pack Name\",\n\"ref\": \"pack_ref\",\n\"icon\": null,\n\"packType\": \"default\"\n},\n\"runner\": {\n\"__typename\": \"Runner\",\n\"name\": \"runner_name\"\n},\n\"outputSchema\": {},\n\"enabled\": true,\n\"deprecated\": false,\n\"deprecationMessage\": \"\"\n}}"
- Transition Structure
Every transition MUST include:
"{\n\"__typename\": \"WorkflowTransition\",\n\"id\": \"transition-uuid\",\n\"do\": [\"next_task_id\"],\n\"when\": \"{{ SUCCEEDED }}\",\n\"label\": \"Transition Label\",\n\"publish\": [\n{\n\"key\": \"variable_name\",\n\"value\": \"{{ CTX.variable_value }}\"\n}\n]\n}"
- No-Op Task
For no-op tasks (placeholders), use this pattern:
"{\n\"type\": \"TASK\",\n\"data\": {\n\"id\": \"unique_task_id\",\n\"name\": \"TASK_NAME\",\n\"description\": \"Task description\",\n\"input\": {},\n\"action\": {\n\"__typename\": \"Action\",\n\"defaultHumanSecondsSaved\": 0,\n\"ref\": \"core.noop\",\n\"id\": \"01920c55-1579-7b48-9a7a-3d8ec4767a1c\",\n\"name\": \"noop\",\n\"description\": \"Action that does nothing\",\n\"parameters\": {},\n\"icon\": null,\n\"workflow\": null,\n\"pack\": {\n\"__typename\": \"Pack\",\n\"id\": \"01920c55-1467-77bc-93b9-c91a767f3b48\",\n\"name\": \"Core\",\n\"ref\": \"core\",\n\"icon\": null,\n\"packType\": \"default\"\n},\n\"runner\": {\n\"__typename\": \"Runner\",\n\"name\": \"noop\"\n},\n\"outputSchema\": {},\n\"enabled\": true,\n\"deprecated\": false,\n\"deprecationMessage\": \"\"\n},\n\"next\": [\n{\n\"__typename\": \"WorkflowTransition\",\n\"id\": \"transition_id\",\n\"do\": [\"next_task_id\"],\n\"when\": \"{{ SUCCEEDED }}\",\n\"label\": \"\",\n\"publish\": [\n{\n\"key\": \"variable_name\",\n\"value\": \"{{ CTX.variable_value }}\"\n}\n]\n}\n]\n}\n}"
E
Eburnean Cardinal
- API Request Task Pattern
For actual API requests, use this pattern:
"{\n\"type\": \"TASK\",\n\"data\": {\n\"id\": \"unique_task_id\",\n\"name\": \"API_REQUEST_TASK\",\n\"description\": \"Makes API request to service\",\n\"input\": {},\n\"action\": {\n\"__typename\": \"Action\",\n\"defaultHumanSecondsSaved\": 0,\n\"ref\": \"pack.action_name\",\n\"id\": \"action-uuid\",\n\"name\": \"Action Name\",\n\"description\": \"Action description\",\n\"parameters\": {},\n\"icon\": null,\n\"workflow\": null,\n\"pack\": {\n\"__typename\": \"Pack\",\n\"id\": \"pack-uuid\",\n\"name\": \"Pack Name\",\n\"ref\": \"pack_ref\",\n\"icon\": null,\n\"packType\": \"default\"\n},\n\"runner\": {\n\"__typename\": \"Runner\",\n\"name\": \"python-script\"\n},\n\"outputSchema\": {},\n\"enabled\": true,\n\"deprecated\": false,\n\"deprecationMessage\": \"\"\n},\n\"next\": [\n{\n\"__typename\": \"WorkflowTransition\",\n\"id\": \"transition_id\",\n\"do\": [\"next_task_id\"],\n\"when\": \"{{ SUCCEEDED }}\",\n\"label\": \"\",\n\"publish\": []\n}\n]\n}\n}"
Common API Request Actions
Datto RMM API Request
Action ID: 01920c55-7081-76ed-8961-8d32fcfdd29d
Ref: datto_rmm.generic_request
Pack: Datto RMM
Common Parameters:
url_path: API endpoint path
method: HTTP method (GET, POST, etc.)
json: JSON body for POST/PUT requests
params: Query parameters
headers: Custom headers
Microsoft Graph API Request
Action ID: 01920c57-37b5-7a19-b9e2-eef05e6ca5dd
Ref: microsoft_graph.graph_api_request
Pack: Microsoft Graph
Common Parameters:
endpoint: Graph API endpoint
request_method: HTTP method
json: JSON body
params: Query parameters
base_url: Base URL (default: https://graph.microsoft.com/v1.0)
Microsoft Azure API Request
Action ID: 01920c57-3194-7574-9063-df827552150b
Ref: microsoft_azure.generic_request
Pack: Microsoft Azure
Common Parameters:
url_path: API endpoint path
method: HTTP method
json: JSON body
params: Query parameters (must include api-version)
base_url: Base URL (default: https://management.azure.com)
Microsoft Exchange Online Invoke Command
Action ID: 01920c57-34de-79f7-9885-57ee1c4d913f
Ref: microsoft_exo.exo_invoke_command
Pack: Microsoft Exchange Online
Common Parameters:
json.CmdletInput.CmdletName: PowerShell cmdlet name
json.CmdletInput.Parameters: Cmdlet parameters
paginate: Enable pagination
top: Maximum results
E
Eburnean Cardinal
Workflow Structure Best Practices
- Task Naming
Use UPPER_CASE with underscores
Be descriptive: FETCH_USER_DATA, UPDATE_TICKET_STATUS
Avoid generic names like TASK_1, STEP_2
- Variable Naming
Use snake_case: server_hostname, customer_id
Be consistent across the workflow
Use descriptive names: disk_usage_percentage not usage
- Transition Logic
Use {{ SUCCEEDED }} for success paths
Use {{ FAILED }} for error handling
Use conditional logic for branching: {{ CTX.condition == true }}
Always include __typename: "WorkflowTransition"
- Error Handling
Include failure transitions for critical tasks
Use meaningful error messages
Consider retry logic for transient failures
- Mock Data
Include realistic mock data in mockInput
Use the same structure as expected real data
Include examples of both success and failure scenarios
Common Mistakes to Avoid
- NEVER put variables in input for no-op tasks
- ALWAYS use CTX.variable format for dynamic values
- ALWAYS include __typename fields in all objects
- NEVER forget the outer {type: "TASK", data: {}} wrapper
- ALWAYS use integer for join field, not string
- ALWAYS include complete action objects with all required fields
- ALWAYS include __typename in transitions
Validation Checklist
Before submitting any workflow, verify:
[ ] All tasks wrapped in {type: "TASK", data: {}}
[ ] All required fields present in each task
[ ] All variables use {{ CTX.variable_name }} format
[ ] No-op tasks have empty input: {}
[ ] All transitions have __typename: "WorkflowTransition"
[ ] All action objects have complete __typename structure\n
[ ] All join fields are integers\n
[ ] All actionId fields match action.id\n
[ ] Variables passed via publish arrays for no-op tasks\n
[ ] Realistic mock data included\n
[ ] Proper error handling transitions\n
Remember: These constraints are NON-NEGOTIABLE. Any deviation will result in workflow failure in the Rewst platform.
E
Eburnean Cardinal
Common Mistakes to Avoid
❌ Missing data.actionId field
❌ Missing data.action.Id field
❌ Missing data.workflowId field
❌ Missing data.action.pack.??? field
❌ Wrong __typename values for:
WorkflowTask
Action
Workflow
WorkflowTransition
Pack
Runner
OrgVariable
TASK
Organization
ActionOption
Tag
SupportAccessStatus
PackConfig
IDK I was just typedumping here. I believe for copy pasta tasks only need:
__TypeNames:WorkflowTask,TASK,Runner(sometimes),Action,WorkflowTransition,Pack
❌ Missing ref ["ref": "microsoft_graph.graph_api_request"]
❌ Incorrect publish array format
❌ Incorrect transition 'do' array format / reference to transitioning taskID
❌ Using task names as IDs
❌ Missing CTX prefix in Jinja expressions
---
Error Prevention Checklist
- [ ] All action IDs are real and from packs
- [ ] All parameter names match action requirements
- [ ] All required task fields are present
- [ ] Task transitions are properly defined
- [ ] Mock data is realistic and complete
- [ ] Workflow structure matches actual.json pattern
- [ ] No generic or invented action references
Validations
- [ ] Task wrapped in {"type": "TASK", "data": {...}}
- [ ] Task ID is GUID with stripped dashes
- [ ] Action ID exists in actions.json
- [ ] actionId field present in main body
- [ ] workflowId field present (ask if unknown)
- [ ] \_\_typename is "WorkflowTask"
- [ ] Action has \_\_typename "Action"
- [ ] Transitions use proper publish array format
- [ ] publishResultAs uses simple variable names
- [ ] join is integer (usually 0)