title: Creating draft via Google Gmail API
body: <p>I am trying to create a draft message for a logged in user but keep getting the error <code>Missing draft message</code> when I run the below</p>
  
  <pre><code>require 'google/api_client'
  client = Google::APIClient.new
  client.authorization.client_id = ENV['GOOGLE_CLIENT_ID']
  client.authorization.client_secret = ENV['GOOGLE_CLIENT_SECRET']
  client.authorization.grant_type = 'refresh_token'
  client.authorization.refresh_token = User.last.refresh_token
  token = client.authorization.fetch_access_token!
  gmail = client.discovered_api('gmail', 'v1')
  params = { 'userId' =&gt; 'me', 'draft' =&gt; { 'message' =&gt; {'raw' =&gt; 'test email' } } }
  # { 'userId' =&gt; 'me', 'message' =&gt; {'raw' =&gt; 'test email' } }
  result = client.execute(api_method: gmail.users.drafts.create, parameters: params)
  </code></pre>
  
  <p>In addition I tried the commented out combination for params and still no luck.  Any ideas?</p>