Add Power Automate connector actions - #31
Merged
Merged
Conversation
Adds Assign Task, Change Form Status, Modify Form Answer, Send Data, and Create Ticket as actions to the custom connector swagger, each verified against the actual Rails controllers rather than assumed from the equivalent Zapier definitions. Documents the actions in the three guide languages and the Data Export overview. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Power Automate's OpenAPI validator rejects collectionFormat: multi (WorkflowTriggerNotFound-style ResponseSwaggerSchemaValidationFailure at import time, not at runtime). csv is one of the values it accepts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
form_state_id had no x-ms-dynamic-values, so Power Automate couldn't offer a picker for it -- only trigger outputs and raw expression input were available, forcing users to paste a raw state id copied from elsewhere (e.g. Zapier's equivalent field). Adds a hidden /list_states operation (mirrors Rails' GET /api/external/list_states, already used by Zapier's own "form_state" hidden trigger) and wires it as the dropdown source, matching the pattern already used for form_id fields via Form-list. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
form_id (Assign Task, Send Data), and type/author_email/assignees/ invitees (Create Ticket) had no x-ms-dynamic-values, same issue already fixed for Change Form Status's form_state_id. Adds the two missing hidden list operations (/list_users, /findings/types, mirroring Rails' GET /api/external/list_users and GET /api/external/findings/types, both already used by Zapier's own hidden dynamic-field triggers) and wires all 6 remaining fields to their respective dropdown sources. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… Assign Task - Change Form Status: form_name now offers a form dropdown (Form-list, keyed by label since this endpoint takes a name, not an id -- unlike the other actions/triggers). - Assign Task: user_id now offers a user dropdown (User-list); date gets format: date-time so Power Automate renders its native date/time picker instead of a plain text box. - Assign Task: removed location_name, location_address, l_code, l_phone, l_email, c_name, c_code, latitude, longitude. These only existed to create a new Location on the fly, and Locations are being deprecated in favor of NestableLocations -- no longer worth exposing a path that creates new Location rows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
felipegarcia98
added a commit
that referenced
this pull request
Sep 4, 2026
…change (#33) The Power Automate actions, their dynamic dropdowns and the dropped location fields shipped in #31 with no changelog entry. Adds it, together with the list_users filtering from DScope/datascope-rails#2737, which takes the technical accounts out of the user pickers in both connectors. Rebuilds the Zapier 2.1.3 entry from the 2.1.2 and 2.1.3 app definitions. The (FKA Issue) rename, the user and form dropdowns, the renamed signature output labels and the rewritten help text were all missing from it. The trigger and action tables in the three guides now use the current names. Documents that Create Ticket accepts assignees and invitees as a comma-separated string (DScope/datascope-rails#2661, shipped 31-Aug), in the endpoint's parameter table and in its own changelog entry. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
El swagger del custom connector (mergeado en #25 y evolucionado desde en #26-#30) solo tenía triggers. Le faltaba la otra mitad: actions que un flow puede ejecutar hacia DataScope. Comparando contra la app de Zapier equivalente (staging) identifiqué 5 actions reales sin equivalente en Power Automate:
POST /api/external/assign_taskPOST /api/external/change_statePOST /api/external/change_formPOST /api/external/create_pdfPOST /api/external/findings/createCada una se verificó contra el controller Rails real antes de escribir el swagger (no se copió a ciegas del contrato de Zapier — ya tuvimos un bug de tipos por confiar en supuestos sin verificar, ej.
mandatorycomo boolean cuando en realidad es un enum de Rails que serializa como string; se aplicó el mismo cuidado acá).Lo que no se pudo verificar completamente (documentado explícitamente en las descripciones del swagger, no inventado):
task/form_answeren las respuestas deassign_task/change_state/change_form.create_pdfsin parámetros de formulario adicionales (acepta cualquier campo dinámico de pregunta víareverse_zapier_schema, no un set fijo).findingen la respuesta defindings/create, ya que ese endpoint delega a un servicio que persiste en Firestore, no en la base relacional.Cambios
apiDefinition.swagger.json: 5 paths nuevos, sinx-ms-trigger(son actions, no triggers), usando el esquema de seguridad global ya declarado en vez de reinventar un parámetrotoken.connector_guide_en/es/pt.html.md): tabla nueva de actions después de la tabla de triggers existente, respetando la terminología que cada guía ya usa (ticket/issue/não conformidade).index.html.md: ajuste de una frase en la sección Power Automate para mencionar las actions, sin extender la sección.Nota sobre esta PR vs. una rama anterior
Empecé a preparar estos cambios sobre la rama
docs/power-automate-connector(la del PR #25), sin darme cuenta de que ese PR ya estaba mergeado y que #26-#30 habían seguido evolucionando este mismo contenido enmain(renombrado de archivos a.html.md, rename Findings→Tickets, nueva sección de actualización de versión, etc.). Descarté ese trabajo y rehice esta PR desdemainactual para no pisar nada de lo ya mergeado — el diff de esta PR es limpio: 5 archivos, ~517 líneas, todas nuevas.Test plan
python3 -m json.toolmainquedó intactoCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com