Skip to content

Commit

Permalink
Add documentation about custom_query
Browse files Browse the repository at this point in the history
  • Loading branch information
sorbits committed Sep 14, 2017
1 parent 048b57b commit bc49888
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ Disconnect the workflow from Google Drive and delete access tokens.

## Configuration

You can set [Workflow Environment Variable][1] to control some aspects of this workflow.

### `custom_query`

This will be `and`’ed with the query used for getting files from Google Drive. See [Searching Files](https://developers.google.com/drive/v2/web/search-parameters) for syntax, some examples:

- Exclude all folders and PDF files from search results: `mimeType != 'application/pdf' and mimeType != 'application/vnd.google-apps.folder'`
- Limit search results to items in the folder with ID `0Bx_0bq…F2N`: `'0Bx_0bq…F2N' in parents`

To find the ID of a specific folder, navigate to that folder in your web browser and should be able to see the ID in the URL.

### `open_args`

If you want to open links in a specific browser you can create a [Workflow Environment Variable][1] named `open_args` with a value of:

- Safari: `-b com.apple.Safari`
Expand Down
15 changes: 15 additions & 0 deletions src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,21 @@ After successfully connecting the workflow to your Google Drive you can search i
You can also create new documents using `d New Document` or `d New Spreadsheet` optionally followed by the name to use for the new document.
# Configuration
You can set [Workflow Environment Variable][1] to control some aspects of this workflow.
## `custom_query`
This will be `and`’ed with the query used for getting files from Google Drive. See [Searching Files](https://developers.google.com/drive/v2/web/search-parameters) for syntax, some examples:
- Exclude all folders and PDF files from search results: `mimeType != 'application/pdf' and mimeType != 'application/vnd.google-apps.folder'`
- Limit search results to items in the folder with ID `0Bx_0bq…F2N`: `'0Bx_0bq…F2N' in parents`
To find the ID of a specific folder, navigate to that folder in your web browser and should be able to see the ID in the URL.
## `open_args`
If you want to open links in a specific browser you can create a [Workflow Environment Variable][1] named `open_args` with a value of:
- Safari: `-b com.apple.Safari`
Expand Down

0 comments on commit bc49888

Please sign in to comment.