Event Grid doesn't trigger using Logic Apps - azure

I have to create a Logic App using the Event Grid, so whenever a new file is created/uploaded in our General Purpose V2 Storage Account it should post a message in slack. This is how it currently looks like.
However, once one file is created/uploaded nothing shows up in slack. There aren't any runs in the "Runs history" and trying to press the button to "Run Trigger" causes the this error.
I also tried to create the Grid Topic and use the Event Grid Subscription for it, yet I got the same error.
Does anyone knows how to solve this problem?

There is no problem with your trigger from your picture. There aren't any runs in the Runs history, this means your trigger is not triggered.
Note:When a resource event occurs this trigger could only be triggered by the blob file modification including creating blob and renaming. If your action is the container modification, it won't trigger it. And you could check the See trigger history.
And about your trigger error Failed to start a logic app run, this is because you run the trigger in the portal, the expression #triggerBody() will be null it won't trigger the flow.
Then I test with different storage account and different logic app ,all of them could be triggered.
Hope this could help you, if you still have other questions,please let me know.

Register EventGrid as a Resource Provider in your Subscription.

Related

Azure Pipeline storage file trigger doesn't fire

I´ve created an Azure Synapse Analytics Pipeline that must be triggered by the creation of a file within a Azure Gen2 storage account.
Somehow the blob creation event (i.e. when I upload the file in the corresponding container and folder) doesn´t fire anything and the pipeline does not start. I´ve registered the Microsoft.EventGrid and Microsoft.Synapse resource providers in the subscription, as suggested by the Microsoft official documentation.
Am I missing anything? As far as I know, and according to the Microsoft documentation and the many tutorials I've read, I don´t need any Event Topic/Event subscription...
Can you please check the content type of the file :
usually when that is blank, event trigger is not initiated
I tried to reproduce your scenario in my environment, and it works for me (i.e., when I upload the file in the corresponding container and folder). Let me share my implementation and then you can compare with yours.
This is the setup for the trigger
The trigger is firing as expected.
Files uploaded date time
Trigger firing date time
I still didn´t figure out what is not working, so I implemented a workaround: a simple ADF pipeline looping for files in the landing zone. The pipeline is associated with a normal schedule trigger (it runs 3 times a day) and it calls in turn the pipeline I originally wanted to be triggered by the file creation trigger.

Automatically link newly created logic apps to an existing alert rule

I have created an Alert action group which will simply call a "error" logic app when the conditions are met. And I have set up an event grid which will be called whenever an logic app gets created for the first time.
Now the challenge is that I want to somehow automatically link this newly created logic app to the action group.
I have searched for way to do this but had no luck, anyone knows if this is possible?
One way of updating an action group would be by using the management API, see the docs.
However, you might want to think about this a bit differently.
How are you going to deploy everything?
Assuming you're not going to be doing this manually, you will be using ARM-/Bicep-files. So, you could include the configuration of an action group in these deployment files.
Meaning, when you initially deploy the Logic App, it will immediately be added to an action group, allowing it to trigger the required alerts. Next to that, it also allows you to create the event subscriptions in your Azure Event Grid topic.
This way you avoid missing the first alert because the action group wasn't updated before the first run of the Logic App.
The template to create an action group can be found here.
The template to create an event grid subscription can be found here.

Logic app workflow continues to publish messages even after being deleted from the portal

Logic app workflow continues to publish messages even after being deleted from the portal
It seems to be in some sort of infinite loop that's continuously publishing messages.
I retried recreating a workflow with the same name but it wont let me save anything in the codeview.
This might be due to any of the following reasons:
Might have deleted the wrong workflow
Loops(connectors that are triggering outside the logic app) inside the workflow (i.e.. Similar to Deadlock Concept).
We can actually have a look at which workflow is actually triggering from the logs. Enabling/ Adding Diagnostics settings for the logic app to either Log Analytics workspace/ Storage Account/ Event hub/ Partner solution allows us to review the logs.
For this, I've set up a log analytics workspace. Here are the steps to logging all of your activity from the logic app to the log analytics workspace. Enabling Log Analytics In Logic App
Try using the requests; query of your logic app to know which workflow is actually triggering.

Trigger Azure logic app on resource creation

I'm working on an Azure Logic app that should trigger when a new resource is created.
However, if I trigger the app based on a webhook using monitor alerts or an event subscription, I run into the problem of each creation event will have 2 identical events with all the output being identical which means I can't filter it out and therefore triggers the logic app twice.
If there a different route around to just get the app to trigger once?
I believe the multiple events are because the event type for both create or update is the same as documented.
One way to workaround this would be to keep track of resourceIds touched by your Logic App, OR add a tag to your resource which signals that it has been touched. This way you wouldn't need an extra store for this metadata.

Queue triggers not working directly after deployment

I have a (C#-based) Function App on a consumption plan that only contains queue triggers. When I deploy it (via Azure DevOps) and have something written to the queue, the trigger does not fire unless I go to the Azure Console and visit the Function App. It also works to add an HTTP trigger to the App and call that. After that, all other triggers work.
The same phenomenon is observed with Timer triggers.
My hypothesis is that these triggers only work when the runtime is active but not directly after deployment when no runtime was created. Is that true? If so, what is the suggested way around this?
My only workaround idea is to add an HTTP trigger and fire regular keepalive pings to that trigger. But that sounds wrong.

Resources