Rename email attachments

Hi, I need some help with following scenrio:

  • email webhook receives email with attachements
  • itterator processes all attachments
  • saves them in Google Drive.
  • uploads & process them with OpenAI Assistant GTP4o
  • save data in Airtable

Issue: some attachments have CAPITALS in the extention (e.g. PDF vs pdf) which causes problems when uploading to OpenAI assistant for processing (extention not allowed).
How can I rename all the files from xxxx.PDF to xxx.pdf?