Quick Overview
This workflow watches a Google Sheets vocabulary list for new German words, looks up synonyms via OpenThesaurus, and uses an OpenAI chat model to generate a JSON-formatted example sentence with metadata, then writes the results (or a “not found” note) back to the same sheet.
How it works
- Triggers every minute when a new row is added to the selected Google Sheets worksheet.
- Sends the new row’s
vocabulary value to OpenThesaurus to retrieve the headword and available synonyms.
- Checks whether OpenThesaurus returned any terms and, if none are found, updates the row in Google Sheets with a “類義語が見つかりませんでした。” message.
- If terms are found, prompts an OpenAI chat model (via an AI Agent) to output strict JSON containing a natural German example sentence using a synonym, the part of speech, a Japanese translation, and a CEFR level estimate.
- Extracts the JSON fields and updates the matching Google Sheets row with the generated sentence, part of speech, translation, and level.
Setup
- Connect your Google Sheets OAuth credentials and select the target spreadsheet and worksheet for both the trigger and update steps.
- Ensure your sheet has columns named
vocabulary, Similar Examples sentence, part_of_speech, translation_ja, and level, and that vocabulary can be used to match/update rows.
- Add OpenAI credentials (or an OpenAI-compatible connection) for the OpenAI Chat Model used by the AI Agent, and confirm the model name is available in your account.
- Enter new German words in the
vocabulary column to test, and verify the OpenThesaurus lookup returns terms for your input words.