Power Automate and Zapier
goPrevina connects to Power Automate and Zapier through its public API. A trigger starts a flow when something happens in goPrevina (an incident is recorded, a certificate is about to expire); an action creates or changes a record (a worker, an incident, a preventive measure). With them you reach Teams, SharePoint, Outlook, Excel, Jira and hundreds of other tools without programming.
1. What you need
An API key of the company. In “Administration” → “System” → “API keys”, press “Create a key” with a name such as “Power Automate” and, under “Per-resource scopes (public API)”, tick what the flows need: to receive incident events, “Incidents” read; to create workers, “Workers” write. A trigger only offers the events the key can read, and medical aptitude events need their own scope. Create one key per tool, so that revoking one does not stop the others.
The goPrevina connector for Power Automate and the Zapier app are awaiting publication in each marketplace. Until then, ask goPrevina support for the Power Automate connector file or for an invitation to the private Zapier app. A Make app will follow after launch.
2. Power Automate
1. In Power Automate, “Custom connectors” → “New custom connector” → “Import an OpenAPI file”, choose the goPrevina file and create the connector (once it is published, search for “goPrevina” instead).
2. The first time you use it, paste the API key.
3. Triggers: “When an incident is recorded”, “When a training certificate is about to expire”, “When a worker is added” and others, plus “When an event occurs”, where you choose any event from the list.
4. Actions: create and update workers, centres and preventive measures, record incidents, assign courses, and read every list (incidents, measures, assessments, certificates, documents, contractors).
The connector's names are in English. When you save a flow with a goPrevina trigger, Power Automate subscribes to the event; when you turn the flow off or delete it, it removes the subscription.
3. Zapier
In Zapier, add the goPrevina app and connect it with the API key; leave “API Address” as it is unless your company runs its own goPrevina installation. Triggers such as “New Incident” or “Training Certificate Expiring” subscribe when you turn the Zap on and unsubscribe when you turn it off.
4. Example: incident → Teams and a SharePoint list
1. Create a SharePoint list “Incidents” with the columns Title, Severity, Date and goPrevina id.
2. In Power Automate, create an automated flow with the trigger “When an incident is recorded”.
3. Add “Post message in a chat or channel” (Microsoft Teams), choose the safety channel and write the message with the dynamic content: title, severity and date.
4. Add “Create item” (SharePoint) on the “Incidents” list and map Title, Severity, Date and Id.
5. Save, record a test incident in goPrevina and check that the message and the row appear within a minute.
5. Example: new hire in Excel → worker
1. Keep new hires in an Excel table in OneDrive or SharePoint with the columns Name, Email, Position and Start date.
2. In Zapier, use the Microsoft Excel trigger “New Row” on that table.
3. Add the goPrevina action “Create Worker” and map Full Name, Email, Position and Hire Date.
4. In “Idempotency Key”, map the row id: if the Zap runs again on the same row, goPrevina returns the worker it already created instead of adding a second one.
The key needs “Workers” write.
6. Example: certificate about to expire → Outlook task
1. In Power Automate, use the trigger “When a training certificate is about to expire”. goPrevina sends it 30 days before the expiry date.
2. Add “Get a worker” with the worker id of the event (employeeId) to get the name.
3. Add “Add a to-do” from Microsoft To Do, whose tasks Outlook shows, with the title “Renew certificate” followed by the certificate number and the worker's name, and the event's expiry date (expiresAt) as the due date.
The key needs “Training” read and “Workers” read.
7. Where the subscriptions are and how to stop them
Each trigger in use appears in “Webhooks” with the name of the tool and its delivery history. Turning off the flow, Zap or scenario removes its subscription. Revoking the API key removes every subscription made with it and stops the deliveries at once. goPrevina signs each event with the X-Goprevina-Signature header and the secret returned when subscribing; a system of your own can check it as the webhooks guide explains.