Google Drive
Features
Features
Status
Getting started
Pre-built Google Drive integration
Scope to set: `https://www.googleapis.com/auth/drive.readonly`
In your frontend, run the OAuth flow and show the Google Drive picker to your user.
Example code:
```js
const ingest = async () =>
}
} catch (error)
}
const openGooglePicker = async () => else if (data.action == 'picked')
}
});
});
};
```
Placeholders:
- `` is your App ID. [How to find your app ID](https://stackoverflow.com/a/40638063)
- `` is the client ID of your Google OAuth app.
- `` is the API key for your [Google Picker API](https://developers.google.com/drive/picker/guides/overview).
Pass the user-selected file & folder IDs to your backend.
From there, call the relevant SDK or REST API to store the IDs on the user's connection (SDK example):
```ts
await updateMetadata(
'google-drive',
'CONNECTION-ID',
);
```
Re-trigger the sync in the dashboard, or with the API or Node SDK. File metadata should get synced.API gotchas
Last updated