Gmail and x-callback-url

Google is known for not having a good documentation when it comes to x-callback-url. Fiddling to update the library, I found an example of x-callback-url support for Google Maps in a Chinese blog. It worked and I could test a few more terms to introduce you to its x-callback-url parameters. Noticing a pattern on Google apps, I decided to investigate for Gmail's support on our dear protocol. I found it.

I still remember when Tom Scogland found the url scheme for Gmail. I used to keep my email accounts there back in the day and despite my aversion to Google and most of its products, it is undeniable that Gmail is an outstanding effort in the email world.

The url scheme for Gmail reported by Tom is as follows:

 googlegmail:///co?subject=<subject text>&body=<body text>

There are a few other parameters you can use beyond subject and body, such as to, cc and bcc to define your receivers. To use x-callback-url with Gmail you must change the parameters slightly. This is how it looks:

googlegmail-x-callback://x-callback-url/co?subject=<subject text>&body=<body text>&to=<receiver email>&x-success=<encoded callback action>

Yep. Just like we changed the Google Maps. This is how a Launch Center Pro action would look like:


You can install this action here. Call this action on LCP, provide the prompts and launch, you'll be taken to Gmail's compose window with the fields correctly filled out. After you send the email you'll be taken back to Launch Center Pro.

I don't use Gmail anymore, maybe you neither, but there's always someone close to us using the service and I hope this helps you drag them into this rabbit hole of automation.