Why is the 'key' object causing issues with attachments in the 'send_email' module of Gmail developer?

This topic was automatically generated from Slack. You can find the original thread here.

I’ve got another bug on Gmail developer here - the ‘send_email’ module.
For uploading an attachment, the ‘key’ object is the problem (i believe)
The ‘value’ object works fine - both for a file on the tmp storage or from a url - but if you don’t provide a ‘key’ object- the email will send but the attachment on the email is simply ‘value’ - without an extension - but file size it correct.
I was looking at the documentation, you have to provide a mime type - which, too be fair, you have programmed in as a prop - but there’s something wrong because I think the key is looking for a path

I’m not sure I totally understand — you’re saying that it only works if you add a key and value but not if you omit the key?

No, its works if you just send a ‘value’ - but if you include a key together - it won’t work.

However, by just sending a value without a key, the file name of the attachment is simply ‘value’.

What’s the input you are using for key ?

just a return path - but I’ve tried testing it with the actual value, and that didn’t work - I tried looking at the documentation and I don’t really understand the “\n”

Can you share a screenshot of the full Attachments prop configuration?

I’ve had to part it up i’m afraid.

Thanks, can you share the workflow URL? I’ll have to look inside

Do I DM that to you?

If you prefer, but shouldn’t be an issue since only your credentials have the ability to access it

Sorry, I meant the real workflow URL and not a share link. Feel free to DM me

I think I discovered the issue: the prop is asking for an object where each attachment has a key and value:

{{steps.python.$return_value.file_name}}: {{steps.custom_request.$return_value.link}}

But I don’t think the first custom expression will work (key part)

Since object keys do not get evaluated and are treated as strings

Are you able to set a fixed filename instead of a dynamic one?

I see the email subject is configured with the dynamic filename already

It does need to be dynamic, yes - however - I’ve tried manually putting in the value for the test case and it doesn’t make a difference.

Sorry, I meant like this:

fixed_file_name is the key and {{steps.custom_request.$return_value.link}} is the value