Automattic introduces a Google Docs integration for writing posts

Automattic has created a Google Docs integration to write posts directly in Google Docs and create drafts from them in WordPress. I spoke to George Hotelling, one of the primary developers on the project, about the challenges and process of building the integration.

He said that, “the bulk of the work was converting Google Docs' document model to HTML. There are some hacks out there to use their print service to do it, but we wanted something we had control over and something that we knew would be supported long-term.”

The integration reads the Google document and does a full conversion to HTML. Images are managed by uploading them as the document scan comes across them. He tells me the entire integration leverages the REST API. George says the API was, “really helpful in simplifying authentication,” for connecting a or Jetpack-enabled site — via credentials — to a Google Docs account.

You can add multiple websites to your Google Docs account, and choose per-document which site you want to push to. When I personally tested it, I instantly wished for featured image support directly within the panel of Google Docs. Also, images are uploaded full size, so the process for making a draft publish ready isn't instant; but it's a huge improvement over previous Google Docs to WordPress workflows.

For writing blog posts, you get all the benefits of Google Docs collaboration with few drawbacks that can't be managed once the post is in the WordPress admin.

When I did another test where I threw more interesting markup at it, it also did great, only missing a superscript tag, and linking the Tweet and YouTube video rather than oEmbedding them. However, oEmbed would've worked if I would've removed the link applied in Google Docs by default, and left the URLs plain text. I didn't test a shortcode, but George tells me they are supported.

Feedback for the integration has been good so far, and they have a few items already on the roadmap. Things like supporting additional fields (excerpt, featured images, perhaps meta), and adding support for more types of markup are being actively explored.

Another interesting nugget George shared is that the integration is actually two-way, sort of. If you send the post to WordPress, and then try to edit the Google Doc again, it will warn you if you've edited the post in WordPress before you try and send it the next time, telling you that you'll overwrite changes in the WordPress side. In my opinion, this tool isn't wise to use right now beyond the initial “send to WordPress” action. But it's an incredible help in those initial stages of writing and collaboration.

All in all, I see myself using this anytime I collaborate with an outside author. I'm not 100% certain how I feel putting it directly on Post Status right this moment, but I'm sure I will in the next few weeks, once it really gets its sea legs. I very much look forward to not having to strip out <span style="font-weight: 400"> anymore.

The source code for the app is on GitHub — a generous move of open sourcing this project — and they are managing issues from there. I'm sure it'll be forked and used by plenty of people looking to better manipulate Google Docs content. The project is fully written in JavaScript.

Matt Mullenweg also wrote about this release, noting that Google is “years ahead” of others for collaboration and other editing features, and noting that the WordPress admin would be for creating, “richer experience, something that really only makes sense on an interactive screen.”

This project was one from Team Tinker, Automattic's equivalent of a research and experimentation group, and is lead by former Automattic CEO Toni Schneider.