Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


English

Introduction 

In this tutorial, we will show the process of sending emails using Microsoft Graph API with Joget JSON Tool. The guideline will help you automate the process of sending emails, making it a more efficient and streamlined process. This article will provide a step-by-step guide to help set up and send emails using Microsoft Graph API and Joget JSON Tool.

Set Up Azure Application

Create Developer Account

First, You need to set up the Microsoft Graph API configurations, You have to create a Free Microsoft 365 Developer Tenant account from here to register your Azure account to get the tenant ID which is later required to send the email. After creating the account, copy the email address in the "Administrator" section and use it to sign up to for Azure

h

Figure 1:  Microsoft 365 Developer Tenant Account Subscription 

...

Warning
titleClient Secret Value

Make sure you secure this value before leaving or refreshing the page as the value will become hidden afterwards.

Add API Permissions

Last The last thing to do is to give the Azure app the permission to send emails via the Microsoft Graph API.

To perform this, from the app's overview page, go to API Permissions > Add a Permission > Microsoft Graph > Application Permissions.

Use the search bar to search for "Mail", Select Mail list and tick "Mail.Send". Optionally you can also tick "User.Read.All" if you want to see the list of users who can use this Azure app. Add the permissions to grant your Azure app the permission to send emails. 

...

Next up is to give the request the appropriate parameters, this request has to include the following:

  • A client Client ID
  • The client Client secret
  • A grant Grant type
  • And a scopeScope

Following the steps above, you should have the client ID and client secret with you, simply enter those two values with the name "client_id" and "client_secret".

...

Sending the Email

Courtesy to of Microsoft's documentation and this Stackoverflow guide, to send an email, we will need another POST request with the link:

...

For this guide, we will be using the first one since we are using client credentials flow as explained above, enter the appropriate information to your second JSON tool and make the Body Type as "Custom JSON Payload".

...

Figure 16: Process Builder of Send Email using MS Graph Demo App

Plugin

This guide will provide you with the knowledge to have full control of this process, but if you are just looking for the basic functionality of sending an email using the MS Graph API, then do look into the Send Email with MS Graph Plugin Tool that automates this entire process.

Demo App

Here is the demo app that showcases this guide, please do keep in mind all of the information related to the Azure app has been left empty since those should be filled with your own Azure app. Most of these empty information can be find in the process of the application.

...