Gmail pdf attachment to OpenAI assistant

Hi, I am trying to process a pdf attachment from gmail with an OpenAI assisant. File upload with OpenAI works fine, but I have troubles piping the file into the assistant. Can someone show me the right way to do this?