Is it possible to access the file attachments of a composeView

306 views
Skip to first unread message

Paul Cornwell

unread,
Nov 27, 2016, 6:28:25 PM11/27/16
to InboxSDK
We processing a composeView and logging some email details to an external database.

All is good except that we can't seem to find a way of accessing any attachments on the compose window through the composeView?

Is this possible?

Thanks - Paul C

Chris Cowan

unread,
Nov 28, 2016, 2:52:07 PM11/28/16
to InboxSDK
We don't currently offer any APIs that interact with the compose view's attachments. It would be helpful to us if you could describe your use-case and specific desires for this API more. What parts of the attachment are you interested in? Just the filename, or the contents of the file too?

Paul Cornwell

unread,
Nov 28, 2016, 7:21:30 PM11/28/16
to InboxSDK
Hi Chris,

Use case is for logging email data to an external CRM.  Steps are:

1) User creates email in Gmail compose window and adds some attachments
2) User clicks a button (Log and Send) which pops a modal window and passes composeView data
3) User then performs various actions to categorise the email and add data/CRM links from the composeView data
4) User clicks a button "Send and Log Email"
5) Entry is created in the CRM and the email data is attached to the CRM.

We want to be able to have the ability in step 3) to select attachments to be uploaded to the CRM.  We perform a similar process for an inbound email.  The user does not always want the attachments to be saved to the CRM so we want to let them choose.

Aleem Mawani

unread,
Nov 28, 2016, 8:16:13 PM11/28/16
to Paul Cornwell, InboxSDK
Can you ask the user whether they want to log attachments with a checkbox somewhere? Typically this kind of work is best served by using the Gmail API as opposed to getting it directly for the client. There are a bunch of edge cases that that API handles...

--
You received this message because you are subscribed to the Google Groups "InboxSDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inboxsdk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inboxsdk/7cf1cf7d-1627-46c4-82ee-f20f65af9ba2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Cornwell

unread,
Nov 28, 2016, 8:32:19 PM11/28/16
to InboxSDK, pa...@i3000.com.au
Hi Aleem,

At the moment we just save all attachments.  We use the Gmail API to pull the message and save all attachments to the CRM.

The ideal situation is that from the single screen before the email is sent we can pick and choose which attachments to Save.  

If its not easy then we'll just say that they can either have all attachments or else wait until it is sent before using our tool to log the CRM (we have a dialogue post send that allows for selection of the attachments)

Aleem Mawani

unread,
Nov 28, 2016, 9:24:29 PM11/28/16
to Paul Cornwell, InboxSDK
I don't think its feasible at the moment to get info on each attachment using the SDK. However, you might want to check if the Gmail API returns attachment IDs for drafts. You could fetch the draft using the gmail API while the compose window is still open and get the attachment data from there. Not sure if it will work though...

Paul Cornwell

unread,
Nov 28, 2016, 9:28:30 PM11/28/16
to InboxSDK, pa...@i3000.com.au
Thanks Aleem,

We'll go with allowing to them to choose all/none.  They can always wait til the message is sent if they want some other combination.
Reply all
Reply to author
Forward
0 new messages