Skip to content
Discussion options

You must be logged in to vote

Try this:

MSG="To: someone@example.com
Subject: Hello World
Content-Type: text/plain

This is a test draft."

gws gmail users drafts create \
  --params '{"userId":"me"}' \
  --json '{"message":{"raw":"'"$(printf "$MSG" | base64)"'"}}'

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jpoehnelt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #286 on March 07, 2026 01:37.