Quick Overview
This workflow runs every 30 minutes, searches Gmail for LinkedIn comment notification emails, extracts the commenter and comment details, uses Mistral AI to draft a short reply, and appends the comment plus draft to a Google Sheets inbox for review.
How it works
- Runs every 30 minutes on a schedule.
- Searches Gmail for recent LinkedIn notification emails about comments or replies (English and German subjects).
- Parses each email to extract the commenter name, comment text, post preview, post URL, message ID, and received timestamp.
- Reads previously logged items from Google Sheets and keeps only comments whose Gmail message ID is not already recorded.
- Sends the post and comment context to the Mistral chat completions API to generate a short reply draft in the configured persona.
- Appends the new comment details and the AI draft to a Google Sheets tab as a human-in-the-loop reply inbox.
Setup
- Connect Gmail OAuth2 for the inbox that receives your LinkedIn notification emails and ensure LinkedIn comment notifications are enabled.
- Connect Google Sheets OAuth2 and select the target spreadsheet and sheet in both Google Sheets steps.
- Create an HTTP Bearer Auth credential with your Mistral API key and attach it to the Mistral HTTP request step.
- Ensure your Google Sheet has columns to store the parsed fields (for example: received_at, commenter_name, comment_text, post_title, post_url, mail_message_id, and a column for the AI draft and review status).
- Optionally adjust the Gmail search query and the reply persona text to match your LinkedIn email language and preferred writing style.