How to attach a draft to an incoming message on gmail

Hi everyone !

I’m trying to attach to an incoming message in a gmail box a draft response that could be reviewed by a user. I have an AI that prepares responses automatically.

I know how to retrieve an email, how to create a draft but I don’t know how to ensure that this draft is considered as the response to this email and I haven’t found anything on the Google API, nor on the doc of the node gmail.

Do you have an idea?

I am not sure how Gmail would match a message and their response unfortunately. My first guess would be the subject. Have you tried creating a draft with a subject like Re: Original Message Subject?

That doesnt seems working.
Y have the good draft with the name “Re: credit” (credit is my Original Message for my test) but the answer is not attached to the mail received. :confused: