I would like to know if there is any chance with JSON to automatically trigger a flow from a SharePoint list without a button. Just when a new item is created.
The solution with the buttons is as:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"edf627d9-20f4-45ba-8bc9-4494bf2ff1be\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Flow"
},
"style": {
"padding-right": "6px"
}
},
{
"elmType": "span",
"txtContent": "It's Flow Time!"
}
]
}
Would be possible to define a condition like the two columns, Modified == Created, to automatically call a flow when a new item is created?
Also there is option to call the flow via http:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "Create Unique ID",
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover",
"target": "_blank",
"href": "=if([$Created]==[$Modified],'https://prod-xxx.westeurope.logic.azure.com:443/workflows/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx','')"
},
"style": {
"border": "none",
"text-decoration": "none",
"background-color": "transparent",
"color": "red",
"cursor": "pointer"
}
}
Thank you