The Gmail Messages data source connector allows you to fetch data from your Gmail account.
Create a new configuration of the Gmail Messages connector. Then click Authorize Account to authorize the configuration. Your inbox is accessed as read only.
Reading email messages is considered very sensitive by Google. This means that authorization may often be rejected and the app may show as blocked or not-verified. In such a case, we recommend that you use Custom OAuth Credentials. Generally using Custom OAuth credentials is the preferred authorization option, although it is more complicated.
Select an existing project or create a new one. Click Enable APIs and Services.
Select the Gmail API and Enable it. You should then see it in the list of enabled APIs.
Select the Credentials section from the menu on the left, click the Create Credentials button, and select OAuth client ID.
https://oauth.keboola.com/authorize/keboola.ex-gmail/callback
https://oauth.eu-central-1.keboola.com/authorize/keboola.ex-gmail/callback
https://oauth.north-europe.azure.keboola.com/authorize/keboola.ex-gmail/callback
Depending on which stack you are using or planning to use.
You can now use these credentials in the Custom Authorization tab when authorizing the Google Analytics connector.
Fill in the form to fit your needs.
Don’t forget to Save the configuration.
Data are always imported incrementally. The data source connector produces several tables that can be joined together.
Queries and their messages; it is good to know which query a message came from.
query | messageId |
---|---|
from:some.address@example.com |
9876cbd54bd215a6 |
from:another.address@example.com |
1234abcd2ffdc1d6 |
A base table of messages:
id | threadId |
---|---|
9876cbd54bd215a6 |
1234abcd2ffdc1d6 |
1234abcd2ffdc1d6 |
1234abcd2ffdc1d6 |
Tip: You can group your messages to conversations with GROUP BY threadId
.
All downloaded headers:
messageId | name | value |
---|---|---|
1234abcd2ffdc1d6 |
From |
News <some.address@example.com> |
1234abcd2ffdc1d6 |
Subject |
Trending News |
All downloaded message parts:
messageId | partId | mimeType | bodySize | bodyData |
---|---|---|---|---|
1234abcd2ffdc1d6 |
0 |
text/plain |
26 |
Lorem ipsum dolor sit amet |
1234abcd2ffdc1d6 |
1 |
text/html |
33 |
<p>Lorem ipsum dolor sit amet</p> |
Note: Only parts with text/plain
and text/html
mime types are downloaded.