I am working on an automation that when an email is received in Gmail and a label is applied to it an automation is triggered which sends the email copy to OpenAI API and draft an email reply. The problem I am facing is how can I draft a reply in the received email thread? I don’t want to draft a whole new email and is there a way to then remove the label from the email so it can run again in the future? Wondering if anyone has done this and has advice?
If you are sending or migrating messages that are a response to another email or part of a conversation, your application should add that message to the related thread. This makes it easier for Gmail users who are participating in the conversation to keep the message in context.
In order to be part of a thread, a message or draft must meet the following criteria:
The requested threadId must be specified on the Message or Draft.Message you supply with your request.
The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard.
The Subject headers must match.
Unfortunately, the Gmail “Create a Draft” module doesn’t allow you to set the fields “Headers”, “In-Reply-To”, and “References”, so you cannot do this in Make.
You can submit this suggestion to the Idea exchange, under App improvement ideas. Don’t forget to search for it first, just in case someone already suggested it!
You can also wait for the generic Make an API call module to be made. A user Tereza Klobouckova shared a possible workaround for now by creating a custom OAuth client to manually use Gmail API endpoints.
Like I said, the fields aren’t implemented in the Make Gmail module yet. You can submit this suggestion to the Idea exchange, under App improvement ideas. Don’t forget to search for it first, just in case someone already suggested it!