In this tutorial, we will look at how to use Office 365 One Drive Package in Automation 360 platform. Pre-requisites:
- Active Office 365 subscription
- Office 365 Username
- Office 365 Password
- Office 365 Tenant Id
- Office 365 Client Id
- Office 365 Client Secret
First lets set up the App and credentials in Azure (https://portal.azure.com/)
Login to your Azure Portal
Click ‘Azure Active Directory’ (if you don't see it on the home screen, search for Azure Active Directory in the search bar)
Note the Tenant Id by clicking the Copy icon shown below. Then click on App Registrations
Click ‘New Registrations’. Enter a name ‘Office_365_Permission, select ‘Accounts in any organizational directory (Any Azure AD directory - Multitenant)’ and Click 'Register’.
Note down the Application id (i.e.,Client id) and then Click 'Certificates & Secrets'.
Click ‘New Client Secret’, Enter the description, Click ‘Add’.
Note the Client secret as it will not be visible later on.
Once you have noted down the Client secret, Click ‘API Permissions’.
Click ‘Add a Permission', Select 'Microsoft Graph’
Click ‘Delegated Permissions’
Search for the following permissions, check all the ‘checkbox’ and click ‘Add permission’
- Files.ReadWrite.All
- offline_access
- openid
- Sites.ReadWrite.All
- User.Read
- User.ReadBasic.All
Now the setup is ready to start building an Automation 360 Bot.
Here is the use case we are going to work on:
A CSV file contains a list of Sectors, Sector code, and price variations on a particular day. Loop through the CSV file, create folders for each sector (in OneDrive) and upload the charts corresponding to their Sector Code (chart screenshots provided for your reference).
Download the following files here: CSV File (see attachment below) and Charts Folder (see attachment below)