question

Bala-1076 avatar image
0 Votes"
Bala-1076 asked Bala-1076 commented

How to pass output of one azure function to another azure function using powershell

Hi,

I have 3 azure functions written in a function app which needs to be executed sequentially using cosmosdb trigger. If I change anything in cosmosdb trigger one function is been triggered whereas my requirement is to pass output values from functon1 to function2 and function2 to function 3 and then finally notification using sendgrid.
I went through some articles where it is defined to use durable functions but the scope is limited to few development environments not for powershell.

Can we do this via logic apps? Any sample for powershell is appreciated.

Is there any way to send values from one azure function to another? I have seen there is no information for Azure powershell functions.

Please guide me on this.

Thanks,
Bala

windows-server-powershellazure-functionsazure-logic-apps
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

SamaraSoucy-MSFT avatar image
0 Votes"
SamaraSoucy-MSFT answered Bala-1076 commented

There are a few ways to do this with Powershell functions, though you are correct that durable functions is not an option in this case.

Logic Apps is an option if you want to replicate the durable functions-style workflow. You would use http triggered/outputs in powershell then the Logic app would call each in turn from there passing the output from one into the next as the body of the http request: https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-functions#add-existing-functions-to-logic-apps

If you don't need to overall workflow, then you could have those http functions call each other directly using Invoke-RestMethod. Alternatively, it is a common practice to chain functions together using a queue service like Storage Queues or Service Bus. This option is generally more resilient than passing via http since each function is fully independent and retry logic is built-in.


· 1
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,

I have 3 azure functions written in a function app which needs to be executed sequentially using cosmosdb trigger. If I change anything in cosmosdb trigger one function is been triggered whereas my requirement is to pass output values from functon1 to function2 and function2 to function 3 and then finally notification using sendgrid.
I went through some articles where it is defined to use durable functions but the scope is limited to few development environments not for powershell.

Can we do this via logic apps? Any sample for powershell is appreciated.

Is there any way to send values from one azure function to another? I have seen there is no information for Azure powershell functions.

Please guide me on this.



Thanks,
Bala

0 Votes 0 ·