To integrate external data via the smenso API, we recommend Power Automate from Microsoft.
There are many scenarios that can be realized with it. Both inbound and outbound.
In this example we show how to import data from a MS Forms form into a smenso project using Power Automate.
Create form
First, a form is created using MS Forms, which contains all the information that should be included in a smenso task.
The different fields can either be integrated as a whole into the description field of a task, or separately into different flavors (these must of course be created and available in smenso beforehand).
Here is an example of a form that contains a project idea:
To further process the data from the form, switch to Power Automate.
Integration with Power Automate
- Open the administration interface of Power Automate
- Choose
My Flows
- Choose
New Flow
, to create a new Cloud-Flow - Choose
Automated Cloud-Flow
- Give the flow a meaningful name and in
Flowtrigger
search for Microsoft Forms - Now select your previously created form from the drop-down menu
- Add a new step with
+ New step
and select the form again - In the field
Reply-ID
search for the value Reply-ID
In summary, this means that the trigger of the flow is the submission of a specified Microsoft Forms form. The next step retrieves the answers of the form. - Next, select the Premium Trigger
HTTP Request
- The following screen shows the configuration for integration in smenso:
In the appropriate places from the dynamic content the fields of the form can be placed directly in the body instead of the fixed names.
Method: POST
URI: https://MeinWorkspace.smenso.cloud/skyisland/api/Integration/ImportTask
Authorization: Basic Token (Mehr zur Erstellung eines eigenen API Tokens erfahren ➡️)
Body:
<Tasks projectId="5a4ada49-Project-GUID-2afea8a1947b">
<Task>
<Id>Task-GUID</Id>
<Title>A Task</Title>
<Description><![CDATA[<b>Description</b><br>Hello!]]></Description>
<Priority>1</Priority>
<StartDate>04.05.2022 +02:00</StartDate>
<DueDate>18.5.2022 +2:00</DueDate>
<PlannedCost>200</PlannedCost>
<Cost>100</Cost>
<Duration>120</Duration>
<PlannedDuration>180</PlannedDuration>
</Task>
</Tasks>
Explanations:
- If the task GUID remains empty, a new task is created. Otherwise the task will be updated.
- Date fields (
DueDate
,StartDate
, ...) must be specified with the current time zone offset. - The
Duration
andPlannedDuration
must be set in minutes. - In the
Description
field the HTML Tags "h1", "br", "ul", "li", "a", "b", "p", "h2", "h3", "h4" und "h5" can be used, however, HTML is only allowed at this point if you write the expressions with a preceding CDATA tag, like this:
<Description><![CDATA[HTML-INHALT]]></Description>
In addition, any other actions can be performed in the flow, e.g. posting a message to a Microsoft Teams channel or sending an email. This is optional.
Note
After the flow has successfully transferred the data to smenso, the new task is not immediately visible in smenso because smenso is still setting permissions for the new task. This process can take up to 5 minutes. However, the newly created task is directly visible in the project feed.
Comments
0 comments
Please sign in to leave a comment.