Splunk Cloud Platform

Webhook from Splunk to Power Automate only sends one result - expecting multiple

tomapatan
Contributor

Hello,

I’ve set up a scheduled alert in Splunk that sends results to a Power Automate webhook, which then parses the JSON and posts the data to a Microsoft Teams chat.
The issue I’m facing is that only one result is received, even though the search returns multiple events.

In Power Automate, the result field in the JSON payload is treated as an object, not an array.
As a workaround, I’ve configured Splunk to send one alert per result, but ideally I’d like to receive all results in a single webhook call and handle them as an array in Power Automate.
Has anyone encountered this before? 
Any advice or examples would be greatly appreciated!

Thanks.

Labels (1)
0 Karma
1 Solution

tomapatan
Contributor

This is expected behaviour, and the payload includes only the first result row from the triggering search results, according to the documentation.

View solution in original post

0 Karma

tomapatan
Contributor

This is expected behaviour, and the payload includes only the first result row from the triggering search results, according to the documentation.

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @tomapatan 

In your alert, have you specified the Trigger frequency for"Once" or "For each result"? If you want it to trigger one webhook for each event then it should be "For each result" 

livehybrid_0-1760453690620.png

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma

tomapatan
Contributor

Hi @livehybrid 

As a workaround, I’ve configured Splunk to send one alert per result, but ideally I’d like to receive all results in a single webhook call and handle them as an array in Power Automate.

Thanks,

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @tomapatan 

If you want to convert all your returned events into a single JSON object you can send you could try something like this:

| tojson
| stats values(_raw) as _raw
| eval _raw = "[".mvjoin(_raw,",")."]"

livehybrid_0-1760455233495.png

 

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...