Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<when condition="@(context.Variables.GetValueOrDefault<bool>("isEventGridNotification"))">
<send-one-way-request mode="new">
var events = context.Request.Body.As<string>();
JArray a = JArray.Parse(events);
var eventGridData = a.First["data"];
var station = eventGridData["station"];
var artist = eventGridData["artist"];
var song = eventGridData["song"];
return new JObject(
new JProperty("username", station),
new JProperty("icon_emoji", ":musical_note:"),
new JProperty("text", String.Format("Just added: {0}, {1}",
song, artist))
<set-status code="200" reason="OK" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment