Azure Functions

Sending SMSes from Azure Functions v2 – Twilio

Please find the brief manual to sending SMSed by Twilio service in Azure Functions v2. The purpose of it is similar to text related to SendGrid case. In case of Twilio, you need to install Microsoft.Azure.WebJobs.Extensions.Twilio NuGet package. After doing it, you should use the following code: using Twilio.Rest.Api.V2010.Account; using Twilio.Types; public static class SendNotificationSMS { [FunctionName("SendNotificationSMS")] public static void Run( [TwilioSms( From = "Assigned by Twilio number", Body = "...")] out CreateMessageOptions messageOptions) { messageOptions = new CreateMessageOptions( new PhoneNumber("Phone number to which you would like to send message")); } } Together with that, you should also add to [...]

By |2018-11-18T12:48:45+02:0018 November 2018 |.net, C#, Cloud Computing|0 Comments

Sending emails from Azure Functions v2 – SendGrid

Some time ago I described how you could integrate SendGrid service with Azure Functions (article: Sending emails from Azure Functions v2 – SendGrid link). Mentioned article is still valid in the scope of SendGrid service configuration. I need to add a part related to integration with Azure Functions v2. This version is generally available from the last few months and it introduced some architectural changes. In the previous version of functions (v1), the code that has been responsible for integration with different services providers was part of the runtime. Each time when Microsoft wanted to change something related to integration he needed [...]

By |2018-11-18T12:41:25+02:0018 November 2018 |.net, C#, Cloud Computing|0 Comments

How to enable/disable Azure Function programmatically

Today I would like to write about something different. I am curious… Have you ever thought about enabling/disabling Azure Function by code? In such scenario, we would be able to decide about the state of the function directly from our application. I believe that you can find a lot of useful scenarios for such behaviour. I will provide two of them. The first one. We have some resource that is not so fast and we would like to reduce the frequency of using it during the day. In such scenario, we can use Azure Storage Queue as a buffer for [...]

By |2018-06-27T18:22:10+02:0027 June 2018 |C#, Cloud Computing|2 Comments

Sending SMSes from Azure Functions – Twilio

This is a second article showing how easy you can build value by correct compositions of two elements. This time we will try to send SMS from Azure Functions. Like in previous time – when we were sending emails – we have dedicated provider for this type of service. It is Twilio. […]

By |2018-04-14T22:48:49+02:0014 April 2018 |.net, C#, Cloud Computing|2 Comments

Sending emails from Azure Functions – SendGrid

I am trying to convince people that right now we should try to think about how we can build our application effectively. Instead of building everything from scratch we should look for possibilities of composition application from different elements. This means that you should write smaller amount of code and there is also smaller chance for making an error. In case of Azure Functions natural choice for email service provider is SendGrid. […]

By |2018-04-14T22:53:58+02:0014 April 2018 |.net, C#, Cloud Computing|0 Comments

Azure Function – Uploading photos to Azure Blob Storage

Today I would like to describe another production use case for Azure Functions. This time example is quite simple. I would like to use Azure Functions to upload photos to Azure Blob Storage. Of course, you can upload photos directly to Azure Blob Storage. However, with such solution, your components are tightly connected. This can block you in the future. To avoid that you should add some middle layer. For this, you can use Azure Function. It will act like an API that will accept photos encoder in base64 and upload it to provided location. With this approach, you will [...]

By |2018-02-22T21:43:00+02:0023 February 2018 |.net, Cloud Computing, In practice|0 Comments

RoyalMail API cost reduction by Azure Functions

I would like to describe you one of the last cases of Azure Functions usage. In one of my projects I was using RoyalMail API to find address that is connected with provided post code. System has been delivered to users from England. In that country when you provide post code you are able to find out quite precise address and you can speed up form filling. […]

By |2017-11-19T12:33:08+02:0020 November 2017 |Cloud Computing, In practice|0 Comments