WorkFlow - stop if no data was retrivied from the API

Good morning community,

I’m using workflow to retrieve data from D365 and then push it to Dynatrace.
Sometimes the call to the api doesn’t provide any data and push_log_to_dynatrace step will fail. (see image)

I was wondering: how can I put a condition that stop the flow if no data was retrieved from the API?

Regards

Hello @y_buccellato

PFA resource for further details:

Hoping it helps.

BR,

Peter

Unfortunately no, but I appreciate your help.

Condition should be “if you have no value in the array then gracefully stop the execution” and I don’t find a practical reference to do that.

I revert back to using Power Automate which has an extensive documentation and use case already covred.

Thank you

You can use Task Conditions to enable/disable a Task based on a previous task. In this particular case, you can use the length filter.

For example, on the task post_log_into_dynatrace, switch to Conditions, and try out the following expression in the “And custom condition was met” field:

{{ result("d365_masterdata_intmat").json.value | length > 0 }}

This should lead to this specific task not being executed when the result is an empty list.

Hope this helps!

Hi @christian_kreuz

Appreciated attempt.

BR,

Peter