Issues with getting email to delete after task has been performed

I am brand new to the make.com platform. I built a quick scenerio to take some emails, get the URLs and either update existing calendar events or create new ones if they don’t exist. This is working. Then I decided that I should delete the email after this was done so that I didn’t have to keep going in and manually doing this. This is where I can’t get it to work. I keep getting a 400 error.

So I have a rule in Gmail that when I get an email that matches certain criteria, it forwards it to my mailparser.io account. Inside there, I have to set up to extract all the data into different fields. Then I created a trigger in Make.com and start there. Then I search my calendar and get the event ID. Then I use a router and if it finds an event, it will update the event with the URL, time, etc. If no event was found it goes and creates a new event with all the details. This part is working fine.

Then I noticed I could delete emails inside my scenario. This is where I run into an issue. I pull the Gmail Message ID and use that, but it gives me an error “400 (invalidArgument): Invalid id value”. So I don’t know what else to try. I made a test scenrio where it finds an email, marks it read and then deletes it. Same issue. So I don’t know if this function is broken inside make.com or if its something else.

Scenario

Error Message
Gmail 400 Error

I would really appreciate any help I can get as I see this platform having lots of potential for my needs, but right now I am struggling to get things to work 100%.

Thanks

That doesn’t look like a Gmail message id, it has an @ symbol in it.

2 Likes

When I go into Gmail and do Show Original, that is what is shown there. Is there something else I need to be looking for?

@samliew Is there a better way I can set this up so that I can do everything I want and delete the email after its added to Google Calendar?

I’m not familiar with mailparser, but you could probably use a Custom Mailhook with Gmail instead, which would return the Gmail message ID.

2 Likes

Mailparser takes emails and copies out certain pieces of data. It then lets you use that data in other stuff.

Would you be able to show me how to use gmail and webhooks? I’ve never done this type of stuff before. I tried googling this but I am not finding anything that really explains it well enough for me to follow and figure out how to build something.