https://linen.dev logo
GMAIL Draft Attachments
# 🖥│support-forum
a
How can I add attachments to an email? Howdoes the attachments s3key work?
c
Hi Alvaro, You can directly use
filePath
(file directory) in
attachments
argument when you are using SDK.
a
thanks!
i tried passing. the key fileId and a url
i passed also the temp url from composio and nothing
@udaysidagana
@Uday any update here?
a
Hey @alvarovargas11_07237, Are you using the API // SDK? If SDK can you share the SDK snippet you're using to upload file?
@abhishekpatil4
c
You can directly pass the file path and the SDK would handle the uploading
a
the file is uploaded into our system, and into GCP...I attempted to send the url of the file and it didn't work. Can you please explain in detail how this would work? I literraly tried ewverything according to your docs, and nothing worked @abhishekpatil4
a
If you pass a file path, then the SDK handles the uploading. You can pass an URL too, the file would be downloaded and then uploaded to our s3 — provided that URL is publicly accessible.
here's an example snippet:
Copy code
const response = await composio.tools.execute(
    "GOOGLEDRIVE_UPLOAD_FILE",
    {
      userId: "default",
      arguments: {
      file_to_upload:"https://avatars.githubuse......."
      },
    },
  );
a
Hey @abhishekpatil4 i tried this and the tool call fails with a 200...so it never generates the draft but returns success...I can't see the log in composio though
we are going live in a couple of weeks, need to fix this
a
Can you set
COMPOSIO_LOG_LEVEL=debug
and share the requestId // network logs?
a
it has to be set in your env
a
in the dashboard? where ?
a
in your code
in a .env or export it in your terminal when running the program
a
@abhishekpatil4
@abhishekpatil4 can we hop on a quick call, i've been stuck on this for a week, need to hit our launch target
also i requested this about 2-3 weeks ago, and they told me it's live but it's nowhere inthe docs https://discord.com/channels/1170785031560646836/1400200327462125711
a
available for a quick call now?
@alvarovargas11_07237
a
yes!
a
a
thanks!!
the API for GET People worked! already built the integration
a
awesome!! 🙌
a
@abhishekpatil4 how are you?? I have two issues: 1. The logs are still not showing in my dashboard 2. I followed the notion docs, and it still doesn't work. The draft is created and I get a 200 from Composio, but the attachment isn't there. BTW the attachment parameter needs to be attachments (plural) - that seems to create the draft but without the attachment, if I use singular, the draft creation will return a 200 but the draft won't appear in gmail https://cdn.discordapp.com/attachments/1408534486651764786/1410684212050399242/Screenshot_2025-08-28_at_2.54.32_PM.png?ex=68b1e98d&is=68b0980d&hm=9974b127a955fd104410dfe49bbcd99c2496f2493bb93d9e9d51e79f73f5d907&
a
Can you share you debugging // support info from project settings? And here's my calendly: https://calendly.com/abhishek-composio/30min lets troubleshoot over a short call.
a
thanks! booked some time for tomorrow morning
a
Hey, can we postpone the call by 15mins? @alvarovargas11_07237
a
@abhishekpatil4 Hey sure, no worries
are you available or should we reschedule?
a
Hey joining in 5
Copy code
{
  "method": "tools/call",
  "params": {
    "name": "GMAIL_CREATE_EMAIL_DRAFT",
    "arguments": {
      "attachment": {
        "mimetype": "application/pdf",
        "name": "Cómo abrir mi Cuenta Global de Marco en EEUU (1).pdf",
        "s3key": "18212/GMAIL/GMAIL_CREATE_EMAIL_DRAFT/request/a754558<masked>"
      },
      "bcc": [],
      "body": "test-email",
      "cc": [],
      "extra_recipients": [],
      "is_html": false,
      "recipient_email": "abhishek@composio.dev",
      "subject": "test subject",
      "thread_id": null,
      "user_id": "me"
    }
  }
}
a
@abhishekpatil4 found the issue! It was the property name and sending it as an array of objects instead of an object. Just to confirm, this supports uploading one file or does it support multiple?
a
Ah I see. This supports just one file.
a
ok, i'll take this into account