How to do it...

Perform the following steps:

  1. Create a new function by choosing the HTTP trigger, and name it ValidateTwitterFollowerCount.
  1. Navigate to the Integrate tab and add a new output binding, SendGrid, by clicking on the New Output button:

  1. Replace the default code with the following and click on Save. The following code just checks the followers count and if it is greater than 200, it sends out an email:
#r "Newtonsoft.Json"#r "SendGrid"using System.Net;using Microsoft.AspNetCore.Mvc;using Microsoft.Extensions.Primitives;using Newtonsoft.Json;using SendGrid.Helpers.Mail; public static async Task<IActionResult> Run(HttpRequest ...

Get Azure Serverless Computing Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.