Trying to add label in Gmail - Find Gmail message ID issue

Hi there,

I have a scenario that seems to be working ok so far, I am trying to add a Gmail label to emails that have an attachment. But I get an “Invalid id value” when I try to pass the message-id in to the Gmail Message ID* field.

Also can I ask of my filter is set up correctly, I have a filter that checks if the “MIME type” exists , and then I proceed to route the flow to the next module:

You inserted the wrong variable. Try using this instead for the message ID.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Hi there, it still returns an error: 400 (invalidArgument): Invalid id value

I cant click anything else at that level.

I can’t seem to select anything more, I still get an error though:
400 (invalidArgument): Invalid id value

Sorry, I’m on holidays these few weeks, and can’t look into it at the moment.

All good, I think I might have figured it out - since I’m using a Gmail module, the message-id will always vary as users would be sending via various email clients e.g hotmail, gmail, yahoo, outlook etc. So the module will error out when its not in the format Gmail requires.

Could that be the issue?

Anyways, enjoy your holiday and stay safe :+1:

Hi @MaxW ,

How’s it going with this? Could you use the Gmail Watch Emails module, instead of the Make built-in one? The IDs should then match when you pass them on to the Modify Email Labels module. You can even use the has:attachment command in the filter in the Gmail module to only return those with attachments.

Regards, Terry.

Hi there,

I managed to get it working I think, I didn’t use the Gmail module in the end and have a filter to check if the attachment exists or not. These are the settings on the filters:

I’ll let it run for a few days and see if its working as intended, not sure the delete email module is processing though, so something I need to check.

Hi @MaxW. That’s excellent. How did you solve the ’ 400 (invalidArgument): Invalid id value’ error?

You can then mark you’re own answer in this forum as the solution and this will help future users if they come across the same problem.

Glad it’s working!

Regards, Terry.

Hi Terry,

I ended up removing the Gmail module to assign a label, as I move emails with attachments to the category it then gets the label anyways.

On the deletion side of things, I’m still getting emails without attachments not being deleted, any ideas on how I could improve this flow?

1 Like

Hi @MaxW,

I would still recommend using the Gmail email module so that the IDs match. But have you tried mapping to the id field exposed by the generic built-in Watch Emails module that you’re already using, rather than the email ID from the headers?

Worth a shot.

Regards, terry.