Gmail
Connect Gmail as a read-only mailbox Ask can search, and as the mailbox a routine drafts in and sends approved mail from.
On this page
Gmail connects to Ysra in two separate ways: a read-only mailbox that Ask can search and cite, and Gmail for a routine, the mailbox a routine reads, drafts in and sends approved mail from. Use the first when answers should draw on email; use the second when a routine should handle mail. Setting up one does not set up the other; this page covers both.
Why connect Gmail#
| Mailbox for search | Gmail for a routine | |
|---|---|---|
| What it's for | Ask searches and cites your mail | A routine reads mail, drafts replies and sends approved drafts |
| Where | The Gmail card: Connect / Add mailbox | The Gmail for a routine card: Connect / Manage |
| How you connect | Sign in with Google | Paste an OAuth access token with Gmail read and compose scopes |
| Access | Read-only | Read and compose |
| Synced for search | Yes, about every 15 minutes | No |
Connect a mailbox for search#
Open the Gmail card#
In the web app, open Settings → Connectors. On the Gmail card, select Connect, or Add mailbox if one is already connected.
Sign in with Google#
Choose the Google account and allow read-only access.
Check the source#
The mailbox appears as a synced source named like "Gmail · email". Ask can now search it and cite messages.
Ysra syncs the mailbox about every 15 minutes; the interval can't be changed. Sync now syncs at once, and Retry sync after a failure. See How syncing works.
Connect Gmail for a routine#
Open the card#
In Settings → Connectors, under Mail and your own keys, find Gmail for a routine: “The mailbox a routine drafts and sends from. A send always waits for your approval.” Select Connect (it reads Manage once connected).
Paste an access token#
Paste an OAuth access token that includes Gmail read and compose scopes.
Ask for the routine#
In Ask, describe a job that mentions mail, for example “every morning, read the new mail in the support inbox and draft a reply to each”. The routine's card lists “Your mailbox for routines” under Reads. See Start a routine from Ask.
Until the mailbox is connected, a card for a job that drafts or sends mail says “To draft or send email, connect the mailbox a routine uses: Integrations → Gmail for a routine.” and can't be started.
What Ysra may do with it#
| Action | Connection | Needs your approval? |
|---|---|---|
| Search and cite mail in Ask | Mailbox for search | No: read-only |
| Draft or send mail | Mailbox for search | Never possible: “These mailboxes can be searched and read. Nothing is drafted or sent through this connection.” |
| Read the messages a routine's job is about | Gmail for a routine | No |
| Write a draft in the mailbox | Gmail for a routine | No: nothing leaves the mailbox |
| Send a draft | Gmail for a routine | Yes, every email, with the exact text: “Every email, with the exact text, before it's sent.” |
| Send a draft you didn't approve, or other text than you approved | Gmail for a routine | Never |
Approving a send#
When a run wants to send, it stops and waits. The card, in the routines panel beside the conversation, on the Runs page or on the routine's page, shows exactly what would be sent: “Exactly this is sent, once”.
| Choice (phone) | What happens |
|---|---|
| Approve & send (Send it) | That exact draft is sent, once. “Sending cannot be undone.” |
| Reject (Discard) | Nothing is sent. |
An approval left unanswered expires after 7 days. See Runs and approvals.
Disconnect#
| Connection | How |
|---|---|
| Mailbox for search | Disconnect next to the mailbox. Each mailbox is disconnected separately. |
| Gmail for a routine | Manage on the Gmail for a routine card, to change or remove the token. |
If it doesn't work#
Ask doesn't find an email#
Why: the mailbox isn't connected for search, or the message is newer than the last sync. What to do:
- Check the mailbox is listed on the Gmail card (connecting Gmail for a routine doesn't make mail searchable).
- Select Sync now, then ask again.
A mail routine can't be started#
Why: Gmail for a routine isn't connected. What to do: connect it under Mail and your own keys, then start the routine again.
A routine's run stops at sending#
Why: every send waits for your approval of the exact draft. What to do: open the run and choose Approve & send or Reject.
For other symptoms, see Troubleshooting.
Related#
- Integrations — every integration and how syncing works.
- How routines work — approvals, caps and run states.
- Runs and approvals — approving a routine's email.
- Microsoft 365 — Outlook mail, with sends you approve in Ask.