Announcing the Public Preview of Bring Your Own Email (BYOE)!

@cschalk_ws, why doesn’t a search for BYOE on the docs site bring up the appropriate documentation?

Attn @Jose_Arteaga

2 Likes

Thanks for reporting. I’ll check w/ support on this.

2 Likes

Yes this is resolved. Thank you :slight_smile:

1 Like

Internally, BYOE is using the public REST API (Method: users.messages.send  |  Gmail  |  Google for Developers) - partially because this was built as an extension of our existing Gmail automation triggers which also use the API, and partially because we wanted this to be as broadly applicable to users as possible and not rely on bespoke configuration or channels. We craft the payload as usual during the automation execution, and then forward it to the workspace server with the OAuth token the user provided during the initial automation setup to handle the actual message dispatch.

2 Likes

Is that the app creator’s appsheet.com auth token? Does that mean the email stops sending when that auth token expires?

1 Like

If you use the same account for BYOE as you use to sign in then it’s a shared token - we re-request during the BYOE auth flow with the additional scope needed for Gmail use. Likewise if it’s an account you already have as a data source, like Sheets. Otherwise, it’s a new token granted from that flow.

We refresh tokens if they’re expired or close to it before we use them, same as with syncs or other normal app operations, so you very rarely need to worry about expiration. That said, I think there are three scenarios where that refresh could unexpectedly fall short (looking at Using OAuth 2.0 to Access Google APIs  |  Authorization  |  Google for Developers ):

  • “The refresh token has not been used for six months” - because the token is shared as noted above, logout/login and other app operations would also avoid this, so I think this is only relevant if you only add an account for BYOE, and none of your apps send with that address for six months.
  • “The user changed passwords and the refresh token contains Gmail scopes” - this is going to be new with BYOE (if you’re not already using Gmail automation triggers) and so probably the least expected. Using the account as a login / data source makes this more noticeable outside of BYOE, but this would be one of my suspects if someone starts seeing failures in their automation logs.
  • “The session length set by the [workspace] admin could have been exceeded” - This is not new / specific to Gmail, and is generally pretty impactful and noticeable on normal app usage, but otherwise the same as above.
2 Likes

Thank you for the detailed reply, @Trevor_Ryland!

1 Like