Extract / parse data from email, summarise, and post into google sheets

New to Activepieces - good to be part of a vibrant community.

My use case is simple but very manual right now:

  • I am tagging interested prospects in gmail and this is the trigger then for me to extract the relevant data and parse into a google sheet (CRM) with name/email/company/email summary - and ping a notification on discord once its done.

  • I tried running a flow but using openai it doesn’t scan the message - just returns a:

“I’m sorry, but as an AI language model, I do not have access to specific emails or contexts…”

  • I know I am missing something fundamental but what are the steps I should be doing?

I used to use Zapier with ease but realise that was taking a pre-filled form and putting into Google sheet so there was no parsing/extraction of unstructured data.

Seen a few people mention something similar but don’t quite understand what I need to do or if the functionality is missing. This would be a game changer for me…


Are you trying to use OpenAI to parse the data?

If you can post a screenshot of the OpenAI piece it might be a bit easier to troubleshoot.

Is it possible to share the activepieces draft I am creating with the link?

Actually I am thinking to store the email data as variables and then ask ChatGPT to parse using those.

Are we able to store specific fields as variables (like in bot builders like Voiceflow).

Also seems the versioning is not saving down at regular intervals for my flow.

You should share with us the prompt you use for the parsing, I guess your issue comes from there. Don’t ask to parse “an email”, ask to parse “the provided text” or something like that.

By no means finished and very messy but as a PoC wanted to see if it can

  • Access the inbox (it can)
  • Take the email and store the data
  • Get Chat GPT to parse it into relevant fields (Iike name / company / email body) to a google sheet
  • Fire a notification to discord or slack

I think I am missing how it should all hang together and be sequenced. I have extracted the data from the emails correctly and they appear to be getting stored in the activepieces database.

How do I store the outputs from this chatgpt command as variables that can be called later in the flow?

Chatgpt prompt: (looks at the data stored in step 2):

You are a helpful lead generation and appointment setting assistant. Parse the lead information from the text provided.

The company name should be apparent from the response email address (after the @ sign) or their signature.

“Company website” - based on their email ID suffix - include www. prefix

“Response” should be only the email reply the prospect sent

“Comment” should be less than 5 words and mark whether the prospect is Interested or Not. Whether they need more nurturing or not. Whether they have a question or not.

Return as fully structure JSON object like this.





“Company Website”:“”





The test output gives the correct data but not sure how I get this into the google sheet columns I setup:

“Namefirst”: “Christopher”,
“NameLast”: “Surname”,
“Email”: “christopher@domain.com”,
“Company Website”: “www.domain.com”,
“Telephone”: “(XXX) XXX-XXX”,
“Mobile”: “”,
“Response”: “Hi Nur,\nTell me more about your service.\n\nI’d be interested to test with you.\n\nBest,\nChris\n”,
“Comment”: “Interested”


Hi @Ali_Zaidi,

I believe this (or similar) has already been answered, with an example flow template you can use - JSON to Variables to Loop to Google Sheets - #2 by ashrafsam. It is pretty much what you have asked for help with.

Kind regards,

Thanks @GunnerJnr I will review this and get it to work!

Many thanks

1 Like

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