The Operations Module hosts a multitude of integrations that allow you to unlock more from Planhat. With Planhat integrations, you can easily import data periodically from any of our supported cloud providers (GCP Cloud Storage, Google Drive, AWS S3 and OneDrive).
This article briefly explains what the native integrations for cloud providers support, and how to set them up.
Contents
1. How does it work?
When the integration is active, Planhat will run a scheduled job at the frequency you define, to access your bucket folder, retrieve all the files, and import (create or update) their data into Planhat.
This means you can drop as many files as you want into your connected bucket, and Planhat will process them periodically.
What do the integrations support?
Formats: XLSX, XLS, CSV, JSON
Providers: GCP Cloud Storage, AWS S3, Google Drive, and Microsoft OneDrive
📌 Note: once a file is processed, it is moved to a folder called "processed" within your bucket. This ensures that we do not process the same file more than once.
2. How do I set it up?
Select any of these links to jump to your provider-specific instructions.
GCP Cloud Storage
Authentication: OAuth2
Requirements:
access to the Google Developer Console
a Google Cloud Storage bucket
a Planhat account with access to the Operations Module
In Google Cloud Storage
Head to the Google Developer Console and log in
Click
OAuth consent screen
on the left-hand panelUnder "User Type" select
Internal
If you don’t see this screen probably you have an OAuth consent screen already created, so skip to Step 8
Click
Create
In the "Edit app registration" > "App information" screen, populate the form
App name: something memorable like "Planhat"
User support email: select your email from the dropdown
In the "Edit app registration" > "Developer contact information" screen, populate the Email addresses with, at minimum, your contact email
Click "Save and Continue"
On the "Scopes" section, click "Save and Continue"
Click "Back to Dashboard"
Click "Credentials" on the left-hand panel
Click "Create Credentials" and choose OAuth client ID from the dropdown
Under "Application type", select "Web application"
Name the client something memorable like "Bucket for Planhat"
Under the "Authorized redirect URIs" header, click "+ Add URI" and add this URL, cluster
https://api-cluster (i.e. us4).planhat.com/connectiondata/oauth2/authresult
Click "Create" - you will now receive a confirmation screen as follows. Click "Download JSON" to store your OAuth credentials. This is what you will need to initiate the authentication in Planhat
In Planhat
Go to the Operations Module in Planhat
Once inside Integrations tab, select "GCP Cloud Storage" among the native integrations
Complete the Authentication section by filling in the following data:
Client Id: Check the client_id of the JSON in step 13
Client Secret: Check the client_secret of the JSON in step 13Click
Authenticate now
at the right of the authentication section. This action will open a new "Sign in with Google" tab/popup. Then, click the account owner and select "accept/allow" to grant Planhat accessComplete End points section by choosing which end points you wish to enable
Click on the actions you wish to add and customize them accordingly
Google Drive
Authentication: OAuth2
Requirements:
access to the Google Developer Console
a Google Drive (folder)
a Planhat account with access to the Operations Module
In Google Cloud Storage
Head to the Google Developer Console and log in
Click
OAuth consent screen
on the left-hand panelUnder "User Type" select
Internal
If you don’t see this screen probably you have an OAuth consent screen already created, so skip to Step 8
Click
Create
In the "Edit app registration" > "App information" screen, populate the form
App name: something memorable like "Planhat"
User support email: select your email from the dropdown
In the "Edit app registration" > "Developer contact information" screen, populate the Email addresses with, at minimum, your contact email
Click "Save and Continue"
On the "Scopes" section, click "Save and Continue"
Click "Back to Dashboard"
Click "Credentials" on the left-hand panel
Click "Create Credentials" and choose OAuth client ID from the dropdown
Under "Application type", select "Web application"
Name the client something memorable like "Bucket for Planhat"
Under the "Authorized redirect URIs" header, click "+ Add URI" and add this URL
https://api.planhat.com/connectiondata/oauth2/authresult
Click "Create" - you will now receive a confirmation screen as follows. Click "Download JSON" to store your OAuth credentials. This is what you will need to initiate the authentication in Planhat
In Planhat
Go to the Operations Module in Planhat
Once inside Integrations tab, select "Google Drive" among the integrations
Complete the Authentication section by filling in the following data:
Client Id: Check the client_id of the JSON in step 13
Client Secret: Check the client_secret of the JSON in step 13Click
Authenticate now
at the right of the authentication section. This action will open a new "Sign in with Google" tab/popup. Then, click the account owner and select "accept/allow" to grant Planhat accessComplete the End points section by choosing which end points you wish to enable
Click on the actions you wish to add and customize them accordingly
Microsoft OneDrive
Authentication: OAuth2
Requirements:
access to the Microsoft Azure Developer Console
Microsoft OneDrive
a Planhat account with access to the Operations Module
In Microsoft Azure
Head to the Azure App Registrations Page and log in
Click
Register an application
and populate the following values...Copy the Application (Client) ID and keep it in a convenient place to use later
Click into
Certificates & secrets
on the left sidepanel, then click on+ New client secret
Description: Something meaningful like
planhat-file-fetcher
Expires: Select a date for the secret to expire (remember, this will cause the connection to break, so this should be sufficiently far in the future and you should schedule to renew the secret before expiry)
Click
Add
, copy theValue
parameter (Client Secret), and keep it somewhere convenient along with the Client ID, to use later
In Planhat
Go to the Operations Module in Planhat
Once inside Integrations tab, select "OneDrive" among the integrations.
Complete the Authentication section by filling in the following data:
Client Id: Check the client_id in step 5
Client Secret: Check the client_secret in step 5Click
Authenticate now
at the right of the authentication section. This action will open a new "Sign in with Microsoft" tab/popup where you can sign in and grant Planhat accessComplete the End points section by choosing which end points you wish to enable
Click on the actions you wish to add and customize them accordingly
AWS S3
Authentication: Basic Auth
Requirements:
access to the AWS Console
an AWS S3 bucket
a Planhat account with access to the Operations Module
In AWS S3
Go to AWS Console and log in with the account where you have the bucket
Click on
Add Users
Fill the User name with something like “import-data-bucket-planhat” and click
Next
The idea is to create a user without any permissions and then grant permissions via roles each time a request is made
Click on
Create user
After creating the user, you will be directed back to the list of users. From there, click on the user that was recently created
Copy the ARN from the Summary section and keep it in an easily accessible place for later use
Click on the “Security credentials” tab and then on “Create access key”
Select the "Application running outside AWS" option, check the "confirmation" box, and click “Next”
Click on “Create access key”
The access key has been created. Click on "Download .csv file”
Open the CSV file and you will see something like this:
Then, go to IAM > Roles in the AWS console and click on the Create role blue button
Select ‘Custom trust policy’ and change the principal property for this:
"Principal": {
"AWS": "PASTE THE ARN COPIED BEFORE HERE"
}Click on next, add the AmazonS3FullAccess permission and click next
Write a meaningful name and click on create role
After created, search your role name and open the details. Once you see the details copy the ARN of the role (in Summary) and keep it in an easily accessible place for later use
To proceed, go to the AWS S3 Dashboard and locate the zone where your bucket is located. Remember this information for later. (In this screenshot, the zone where my bucket is located is highlighted in blue. The zone of my bucket is us-west-2)
In Planhat
Go to the Operations Module in Planhat
Once inside Integrations tab, select "Amazon Web Services" among the integrations
Complete the Authentication section by filling in the following data:
API Base URL with Base Path: s3.[your_zone].amazonaws.com
(My example bucket: s3.us-west-2.amazonaws.com)Click
Authenticate now
at the right of the Authentication section. This action will open a new tab/popup where you can set up basic auth that grants Planhat accessUsername: Your Access Key ID
Password: Your Secret Access KeyComplete the End points section by choosing which end points you wish to enable
Click on the actions you wish to add and customize them accordingly
3. Add actions
Now that your integration is set up, you can go ahead and apply the actions from the action templates:
Click on any of the templated actions you wish to set up
Configure the template as you wish, setting:
Frequency: how often should new files be scanned and imported from your bucket?
Object / Metric:
For CRM data, decide where in Planhat you wish to import the data to
For Metrics data, decide what type of data you wish to configure it as in Planhat
Complete the Required Fields.
GCP Cloud Storage: Bucket Name, Folder Path
Google Drive: Folder Id
Microsoft OneDrive: Folder Path
AWS S3: Bucket Name, Folder Path, Region, ARN Role
Note:
To refer to the root of the bucket, leave the folder path field empty
If you want to use a folder, please start with its name and end with a slash (/)
If you put a slash at the beginning, the automation will not work
Click
Add Action
Now you're all set and the action will fetch data on the schedule you defined. If at any point you want the fetch to run immediately