In part 1,  I mentioned that there is a way to remove NULL values in a Function App.

Using RegularExpressions solves the problem.

#r "Newtonsoft.Json"

using System;
using System.Net;
using Newtonsoft.Json;
using System.Text.RegularExpressions;

public static async Task<object> Run(HttpRequestMessage req, TraceWriter log)
{
    log.Info($"Webhook was triggered!");

    string jsonContent = await req.Content.ReadAsStringAsync();
    var data = System.Convert.ToString(JsonConvert.DeserializeObject(jsonContent));

    log.Info($"source {data}");
    /// <summary>
    /// <para>A Regular Expression to Match any null Json object in a string</para>
    /// <para>like "name":null,</para>
    /// <para>Useful in removing nulls from serialized Json string</para>
    /// </summary>
    var JsonNullRegEx = "[\"][a-zA-Z0-9_]*[\"]:null[ ]*[,]?";

    /// <summary>
    /// <para>A Regular Expression to Match an array of null Json object in a string</para>
    /// <para>like [null, null]</para>
    /// <para>Useful in removing null array from serialized Json string</para>
    /// </summary>
    var JsonNullArrayRegEx = "\\[( *null *,? *)*]";

    if(data == null){
        return req.CreateResponse(HttpStatusCode.BadRequest, new
            {error = "Please pass valid JSON" });
   }
    Regex regex = new Regex(JsonNullRegEx);
    string data1 = regex.Replace(data, string.Empty);
    regex = new Regex(JsonNullArrayRegEx);

    return req.CreateResponse(HttpStatusCode.OK, regex.Replace(data1, "[]"));
}