Flow example - Send report by e-mail
With the help of a flow, the alarm details or the final report for an alarm can be sent automatically as a PDF by e-mail. In our example, we use the final report with the complete feedback from the participants. This assumes that the trigger element Alarm closed is used, as the final report is only created when the alarm is closed. If only the alarm details are to be sent, Alarm triggered can also be used as an alternative trigger. The other required elements are Merge strings and Send email.
Configuration
1️⃣ To retrieve the report, a call is made to the GroupAlarm API interface. To do this, the corresponding template of the respective URL can be inserted in the Merge strings element via the template symbol. The URL contains variables that must be filled via the respective input functions.alarm
2️⃣ The alarm ID is required in order to receive the appropriate report. The alarm ID can be obtained from the Alarm closed trigger via the input function.
3️⃣ The API token is used for authentication. Information can only be retrieved from the API with a valid API token. In a flow, the API token is always available by belonging to the organisation and can be obtained from the organisation variables.
4️⃣ The recipients are first defined in the Send email element. Email addresses can be used directly, or existing participants can be used.
5️⃣ The fields for the email subject and message must be filled in, as these are required for a valid email. Any text can be entered here.
6️⃣ The report itself is attached to the e-mail. To do this, Add attachment is activated and the URL from Merge strings is used via the input function. The report is then automatically attached to the email as a PDF by the system. The name of the attachment can be optionally assigned.
Configuration
1️⃣ To retrieve the report, a call is made to the GroupAlarm API interface. To do this, the corresponding template of the respective URL can be inserted in the Merge strings element via the template symbol. The URL contains variables that must be filled via the respective input functions.alarm
2️⃣ The alarm ID is required in order to receive the appropriate report. The alarm ID can be obtained from the Alarm closed trigger via the input function.
3️⃣ The API token is used for authentication. Information can only be retrieved from the API with a valid API token. In a flow, the API token is always available by belonging to the organisation and can be obtained from the organisation variables.
4️⃣ The recipients are first defined in the Send email element. Email addresses can be used directly, or existing participants can be used.
5️⃣ The fields for the email subject and message must be filled in, as these are required for a valid email. Any text can be entered here.
6️⃣ The report itself is attached to the e-mail. To do this, Add attachment is activated and the URL from Merge strings is used via the input function. The report is then automatically attached to the email as a PDF by the system. The name of the attachment can be optionally assigned.
Updated on: 30/01/2024
Thank you!