Google Drive Integration
Connect files and folders from Google Drive to an xMagic Drive folder so your agents can search and use them. xMagic imports and indexes what you select once, then keeps it in sync. You decide whether changes only flow from Google Drive into xMagic, or whether agents can also write back to Google Drive.
This guide uses a running example: a Release Notes folder in Google Drive that a release assistant agent should read and, later, update.
| Where | What you do there |
|---|---|
| xMagic Drive | Create the folder, connect Google Drive and choose how it syncs |
| Google sign-in and file picker | Approve access and pick the files and folders to sync |
| xMagic Composer | Give an agent access to the synced folder |
Choose how changes sync
Every Google Drive integration pulls changes from Google Drive. Two-way sync is optional and also pushes the agents' changes back.
| Mode | Google Drive → xMagic | xMagic → Google Drive |
|---|---|---|
| Pull only (default) | Changes to the files and folders you selected are reflected in xMagic | Nothing. Agent changes stay in xMagic. |
| Two-way | Same as pull only | Agents can edit or delete synced files, and create files in folders that are linked to a Google Drive folder |
For example, with two-way sync, when the agent edits Release Notes/November release in xMagic, the new version is saved to the same file in Google Drive. With pull only, the edit stays in xMagic and the Google Drive file is untouched.
When changes move:
- Google Drive → xMagic: on the schedule you set, or whenever you select Sync Now in Integration Details.
- xMagic → Google Drive: right after the agent makes the change. Changes that could not be saved are retried on the next sync.
Before you start
You need:
- Access to xMagic Drive and to the agent you want to connect.
- A Google account that can open the files and folders you want to sync. For two-way sync, it must also be able to edit them.
- Popups allowed for xMagic in your browser. Google sign-in and the file picker open in popups.
Step 1: Choose an xMagic folder
- In xMagic, open Drive.
- Create a folder (for example
Release Notes) or open an existing one. - Select Add data → Google Drive.
A folder can't get a sync integration if the folder itself, one of its parent folders or one of its subfolders already has one. Choose a separate folder instead.
Step 2: Sign in and select files
- Select Import from Google Drive and sign in with your Google account. xMagic asks for read-only access at this point. Edit access is only requested later, if you turn on two-way sync.
- In the Google file picker, select the files and folders to sync. You can pick:
- folders, which bring in everything inside them,
- Google Docs, Sheets and Slides,
- Word, Excel and PowerPoint files, PDFs and text files.
- Under Review your selection, check the list. Use Add more files to pick more, Replace selected files to start the selection over, or the × next to an item to remove it. Then select Continue.
Agents can always create files inside the synced Google Drive folders, such as Release Notes/2026. To let them create files at the top level of the xMagic folder too, select a single Google Drive folder. With several folders, or with only individual files, xMagic can't know which Google Drive folder a new top-level file belongs to.
Step 3: Configure syncing
-
Enter a Description of the content, for example
Release notes. It is required. -
Turn on Use OCR if the files include scanned documents or images with text you want the agent to read.
-
To pull changes on a schedule, turn on Sync files automatically and enter the Sync interval (minutes). The minimum is 60 minutes and the default is 1440 minutes (once a day). The interval counts from the end of the previous sync.
-
For two-way sync, turn on Push xMagic changes to Google Drive, select Grant access and approve edit access with the same Google account. The row then shows Edit access granted. Finish stays disabled until you do this.
Google's consent screen asks for access to your whole Drive, because xMagic needs it to edit files it didn't create. xMagic still only syncs and changes the files and folders you selected.
-
With two-way sync on, choose what happens under If a file changed in both places since the last sync:
| Option | What happens | Example: the agent and a colleague both edited November release |
|---|---|---|
| Always keep xMagic changes (default) | The xMagic version overwrites the Google Drive file | The agent's version is saved to Google Drive |
| Always keep Google Drive changes | The Google Drive version replaces the agent's change | The colleague's version is copied into xMagic and the agent's edit is dropped |
- Select Finish. xMagic imports and indexes the files. This can take a while for large folders.
You can change the description, schedule, OCR, two-way sync and the conflict option later in Integration Details (see Manage the integration).
Step 4: Give an agent access to the folder
- In Composer, open the agent's Configuration.
- Under Folders, select the synced folder. You can also pick just a subfolder. For example, attaching
Operations/Release Notesshows it to the agent asdrive://Release Notes/. - Choose what the agent may do in that folder:
| Permission | The agent can | Needed for |
|---|---|---|
| None | Read and search files | Answering questions about the files |
| Create | Create files | Drafting a new release note |
| Update | Edit files | Correcting an existing release note |
| Delete | Delete files | Removing an outdated release note |
| Confirm delete | Ask you to approve each deletion first (available once Delete is on) | Keeping a person in control of deletions |
- Select Save.
With Delete on and Confirm delete off, the agent can delete files without asking. With two-way sync, those files are also deleted in Google Drive.
These permissions apply in xMagic. With two-way sync, the Google account must also be allowed to make the same change in Google Drive.
Step 5: Test it
Wait until the import finishes, then:
- Pull only: ask the agent about a synced file, for example "What changed in the November release?". Then edit the file in Google Drive, select Sync Now and ask again.
- Two-way: turn on Create and ask the agent to create a sample file in a synced folder, for example "Create a draft called release-checklist.md in Release Notes". Check that the file appears in that Google Drive folder.
Manage the integration
In Drive, open the synced folder's integration to see Integration Details:
| Action | Effect |
|---|---|
| Sync Now | Pull the latest Google Drive changes and push pending agent changes now |
| Save | Apply changes to the description, sync schedule, OCR, two-way sync or conflict option |
| Go to Folder | Open the synced folder in Drive |
| Delete | Remove the integration |
If you turn on two-way sync later, select Grant access to approve edit access before saving.
Troubleshooting
| Problem | What to check |
|---|---|
| Nothing happens when you select Import from Google Drive or Grant access | Allow popups for xMagic in your browser and try again. |
| xMagic says you have not approved all required permissions | In Google's consent screen, tick every access xMagic asks for. |
| A file is missing in xMagic | You signed in with the right Google account, that account can open the file, and the file is one of the supported types. Select Sync Now to pull the latest changes. |
| An agent change didn't reach Google Drive | Push xMagic changes to Google Drive is on, the Google account can edit the file or folder, and the agent has the right permission in Composer. For a deletion, check whether Composer is waiting for your approval. |
| The agent can't create a file at the top of the folder | The integration syncs several Google Drive folders, or only individual files, so xMagic doesn't know where the file belongs. Ask the agent to create it in a synced subfolder, or connect a single Google Drive folder. |
| A new file wasn't created in Google Drive | A file with the same name already exists in that Google Drive folder. Google Drive allows duplicate names, so xMagic doesn't create a second one. Ask the agent to use a different name. |