@openfn/language-gmail 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -32
- package/ast.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -272,37 +272,28 @@ https://support.google.com/googleapi/answer/6158849
|
|
|
272
272
|
- Click "Create"
|
|
273
273
|
- On the resulting popup screen, find and click "DOWNLOAD JSON" and save this file to a secure location.
|
|
274
274
|
|
|
275
|
-
##
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
Once the form is filled out, repeat these steps each hour to retrieve a new
|
|
299
|
-
access token:
|
|
300
|
-
|
|
301
|
-
- Click on "Get New Access Token"
|
|
302
|
-
- A browser will open and you'll be asked to authenticate with your Google Account
|
|
303
|
-
- Accept the request to allow this OAuth session to access your Google Account.
|
|
304
|
-
- In the MANAGE ACCESS TOKENS popup, find and copy the new Access Token
|
|
305
|
-
- This access token will be valid for 1 hour.
|
|
275
|
+
## Retrieve an access token
|
|
276
|
+
|
|
277
|
+
- Navigate to [OAuth 2.0 Playground](https://developers.google.com/oauthplayground/).
|
|
278
|
+
- Find *Step 1 Select & authorize APIs*:
|
|
279
|
+
- Find the section for *Gmail API v1*.
|
|
280
|
+
- Mark the following two scopes:
|
|
281
|
+
- https://www.googleapis.com/auth/gmail.readonly
|
|
282
|
+
- https://www.googleapis.com/auth/gmail.send
|
|
283
|
+
- In the box labeled with the watermark *Input your own scopes* add `openid`.
|
|
284
|
+
- Click on the **Authorize APIs** button.
|
|
285
|
+
- Log in to the Google account to which you want to grant access.
|
|
286
|
+
- On the *Sign in to Google OAuth 2.0 Playground* screen, Click **Continue**.
|
|
287
|
+
- On the *Google OAuth 2.0 Playground wants access to your Google Account* screen:
|
|
288
|
+
- **Select all**, including:
|
|
289
|
+
- **View your email messages and settings**.
|
|
290
|
+
- **Send email on your behalf**.
|
|
291
|
+
- Click **Continue**.
|
|
292
|
+
- Find *Step 2 Exchange authorization code for tokens*:
|
|
293
|
+
- *Authorization code* will be prepopulated.
|
|
294
|
+
- Click **Exchange authorization code for tokens**.
|
|
295
|
+
- *Refresh token* and *Access token* will be populated briefly before the interface automatically advances to *Step 3 Configure request to API*. To view the *Access token*, return to *Step 2 Exchange authorization code for tokens*.
|
|
296
|
+
- The *Access token* is valid for 1 hour. You may enable **Auto-refresh the token before it expires** or manually refresh it using the **Refresh access token** button.
|
|
306
297
|
|
|
307
298
|
## Configure OpenFn CLI to find the access token
|
|
308
299
|
|
|
@@ -320,7 +311,7 @@ Example configuration using a workflow:
|
|
|
320
311
|
],
|
|
321
312
|
"expression": "path/to/gmail.js",
|
|
322
313
|
"configuration": {
|
|
323
|
-
"access_token": "
|
|
314
|
+
"access_token": "[access token acquired from previous section]"
|
|
324
315
|
}
|
|
325
316
|
}
|
|
326
317
|
]
|
package/ast.json
CHANGED
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"operation"
|
|
176
176
|
],
|
|
177
177
|
"docs": {
|
|
178
|
-
"description": "
|
|
178
|
+
"description": "Execute a function only when the condition returns true",
|
|
179
179
|
"tags": [
|
|
180
180
|
{
|
|
181
181
|
"title": "public",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-gmail",
|
|
3
3
|
"label": "Gmail",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "OpenFn gmail adaptor",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"googleapis": "100.0.0",
|
|
25
25
|
"jszip": "^3.10.1",
|
|
26
|
-
"@openfn/language-common": "3.0.
|
|
26
|
+
"@openfn/language-common": "3.0.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"assertion-error": "2.0.0",
|