question

ez-Jurgen avatar image
0 Votes"
ez-Jurgen asked JayaC-MSFT edited

Can a Logic app clone another logic app and change its trigger

Hi,

A sharepoint site collection has two Logic Apps watching doc libraries. We cloned that team site via a logic app 'A' and a runbook with pnp cmdlets.

Is there a way, preferably within Logic App A to clone two other logic apps B and C? and then edit their trigger? I tried adding another operation in Logic App A and looked for logic app actions, I could select Logic App, but there are no actions in there to select...

I saw that I could do it with a runbook via New- and Set-AzureRmLogicApp but that seemed to be depricated and cannot find the new cmdlets

52636-screenshot-2021-01-01-053517.png


azure-logic-appsazure-automation
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JayaC-MSFT avatar image
0 Votes"
JayaC-MSFT answered JayaC-MSFT edited

@ez-Jurgen I believe you want to clone the logic apps for different SharePoint site collections? Please correct me if you are trying to achieve something else?
If that is the case here are couple of ways to automate the process please refer to Logic App Job scheduler
While creating the logic app, at the last step you can download the template for reference and modify that for future use.
53305-image.png
Otherwise, you can leverage the logic app to parameterize any dynamic variables. For logic app you can check : parameterized-use-of-the-http-action-in-logic-apps
Please let me know if this helps!


image.png (7.1 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Jaya,

Thanks for helping out

Parameterising the runbook would be nice but from there are 50 steps using the 'update sharepoint item' and that is linked with the site address using a pull down menu and then I can select the the fields I want to update. It seems that when I parameterise the site address in something like https://tenant.sharepoint.com/sites/$SiteCol I loose the ability to select the fields. Or am I doing something wrong here?

seems once parameterising the logic app, I need to do the most work in code view... not that kind of knowledgable (yet) :)

0 Votes 0 ·

Well Jaya,

You got me thinking :) :)

so let's say I can paramater that one logic app so it can function for many site collections

how would I add a trigger to it for every site to fire the LA? I found some examples but they talked about adding the other triggers in code view and are limited to 10 triggers. We will have more than 10 project sites real soon

0 Votes 0 ·

@ez-Jurgen In that case we need to to break it down and implement the exact way how it is processed internally. So you may try this flow :

HTTP Trigger -> Initialize Variable -> Loop[to implement the actual functionality (Get -> Nested App -> Update Variable -> Sleep) -> Finish

Please let me know if this helps!

0 Votes 0 ·

Hi Jaya

Thanks.

I am going to writedown what I actually want to accomplish in a diagram and post this tonight. you might have a better idea than mine :)

0 Votes 0 ·