Skip to content

Add Power Automate connector actions - #31

Merged
felipegarcia98 merged 7 commits into
mainfrom
docs/power-automate-actions
Sep 4, 2026
Merged

felipegarcia98 merged 7 commits into
mainfrom
docs/power-automate-actions

Conversation

@felipegarcia98

Copy link
Copy Markdown

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:

  • Assign TaskPOST /api/external/assign_task
  • Change Form StatusPOST /api/external/change_state
  • Modify Form AnswerPOST /api/external/change_form
  • Send DataPOST /api/external/create_pdf
  • Create TicketPOST /api/external/findings/create

Cada 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. mandatory como 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):

  • El shape exacto de task/form_answer en las respuestas de assign_task/change_state/change_form.
  • El contrato completo de create_pdf sin parámetros de formulario adicionales (acepta cualquier campo dinámico de pregunta vía reverse_zapier_schema, no un set fijo).
  • El shape completo del objeto finding en la respuesta de findings/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, sin x-ms-trigger (son actions, no triggers), usando el esquema de seguridad global ya declarado en vez de reinventar un parámetro token.
  • Las 3 guías (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 en main (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 desde main actual para no pisar nada de lo ya mergeado — el diff de esta PR es limpio: 5 archivos, ~517 líneas, todas nuevas.

Test plan

  • JSON del swagger validado con python3 -m json.tool
  • Confirmado que los 17 paths finales no tienen duplicados y que todo lo existente de main quedó intacto
  • Reimportar el swagger actualizado en un custom connector de prueba y probar cada action manualmente

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

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>
@felipegarcia98 felipegarcia98 self-assigned this Aug 24, 2026
felipegarcia98 and others added 6 commits August 24, 2026 16:08
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
felipegarcia98 merged commit c3e202e into main Sep 4, 2026
4 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant