Gmail > ChatGPT > Google Doc

I’m new to Gumloop. I’m experimenting with a few things right now and trying to figure out if something is possible and guidance on how to set it up. Here’s what I’m wanting to do:

I receive emails in Gmail from EMAIL 1 (I’m not putting the actual emails) about 3-4 times per month. These emails are forwarded messages originally sent by EMAIL 2. To identify the correct emails, the sender must be EMAIL 1, and the email body must contain EMAIL 2.

When a matching email is received in my inbox, it needs to be sent to or run through ChatGPT to extract the email body while removing any forwarding headers or unnecessary non-body content. The extracted text should then be cleaned up—correcting grammar, formatting inconsistencies, and ensuring readability. A relevant and creative title should be generated based on the cleaned-up content.

Once processed, the refined content, along with the generated title and the original email’s sent date, should be appended as a new journal entry in a single Google Doc (i.e., all cleaned up emails will go into the same Google doc). Over the next 18 months (roughly), these entries will compile into a well-organized and polished ‘book’ of messages from EMAIL 2.

Hey @Russ - Yep, this is definitely doable! Here’s how I’d approach it:

  1. Filter the Emails: Gmail has a great filtering system. You can set up a filter to automatically label emails that match your criteria. Here’s a quick tutorial on how to do that: https://www.youtube.com/watch?v=CuTJRvjYzlQ.

  2. Trigger in Gumloop: Once your label is set up, you can create a Gmail trigger in Gumloop that activates the flow whenever a new email lands in that label. Here’s how: https://docs.gumloop.com/core-concepts/triggers.

  3. Process the Email: You can use AI steps in Gumloop to clean up and format the email however you need.

  4. Push to Google Docs: Finally, send the processed data into an existing Google Doc.

I was able to get it to work one time. However, now I’m seeing this:

I didn’t change anything and just ran it again and the red error came up.

You can disable Loop mode on the AI Assistant node here and it should work properly.

Here’s some more info on type mismatches: https://vimeo.com/1058769548/7eb10d0674?share=copy

1 Like

What does loop mode do? And can I have this workflow automatically run so I don’t need to manually do it?

Loop mode: https://docs.gumloop.com/core-concepts/loop_mode

In this case loop mode is not necessary since you’re not processing a list.

Yes, you can trigger your workflow instead of manually running it: Triggers - Gumloop.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.