PortiBlog

Using the Site Title in Flow triggered by a Site Design

21 januari 2019

Site Designs are awesome. There is no doubt about that! Yet sometimes you need more options. Or you might have to apply settings that are not available yet. Luckily you can call Flow. By using Flow you can call any custom option you want. There are some great articles that explain both scenarios. Check out Calling Flow from a site Script and Calling the PnP provisioning engine from a site script. However the samples do not provide details on how to get the Site Title in your Flow trigger. 

Use the site title in Flow

While the samples are great. It felt like there was something missing. In the provided sample the site title is missing. Imagine that you must provide a report that contains both the URL and title. The title is passed by the Site Script and thus can be used. In order to use the title all, you must do is change your Flow. In the Request – When a HTTP Request is received trigger you can change the body:

{
"type": "object",
"properties": {
"webUrl": {
"type": "string"
},
"webTitle": {
"type": "string"
},
"parameters": {
"type": "object",
"properties": {
"event": {
"type": "string"
},
"product": {
"type": "string"
}
}
},
"webDescription": {
"type": "string"
},
"creatorName": {
"type": "string"
},
"creatorEmail": {
"type": "string"
},
"createdTimeUTC": {
"type": "string"
}
}
}

By adding the webTitle property it will be usable in your flow. As the title is passed this is the only step you change. Once done you can use the title wherever you want. The title is available as a parameter and can be used in your process.

Flow action with webTitle available

Additional properties

Unfortunately if you need additional properties you can only retrieve them using a REST call. Triggers from the site design do not provide additional options. You can use either the Graph or a SharePoint REST. For calling a custom site provisioning engine the title and URL will be sufficient in most cases.

Originally posted at: https://www.cloudappie.nl/sitetitle-flow-sitedesign/

Submit a comment