Detailed Problem Description for Make.com Community
Subject: Text parser’s ‘Match pattern’ and ‘Replace’ operations failing to capture/separate groups from Google Gemini AI output
Hello everyone,
I am facing a persistent and frustrating issue with the Make.com Text parser module, and I would appreciate any insight or solutions the community might have.
Scenario Overview: My scenario is designed to take a user query, send it to Google Gemini AI to generate a response, split that response into two parts, and then use those parts for image generation (Stability AI) and a webhook response.
The flow is structured as follows: Webhooks -> Google Gemini AI -> Text parser -> Tools (Set multiple variables) -> Stability AI -> Webhooks Response
Module 1: Webhooks
- Receives a
search_query
(e.g., “Volcano”).
Module 2: Google Gemini AI
- The prompt is configured to generate a single response that includes two distinct sections with specific headings.
- Gemini Output: The output from the Gemini module’s
Result
is a single long string, but it consistently contains the following structure:**Image Description:** [text for the image goes here] **Mnemonic Story & Explanation:** [text for the mnemonic story goes here]
- Example of the actual output format:
"**Image Description:** A majestic volcano erupts, spewing fiery orange lava down its dark, rugged slopes. Thick, grey ash clouds billow into a dramatic sky... **Mnemonic Story & Explanation:** VOLCANO** **V**ent: Imagine a giant underground pipe..."
- Note: I have tried structuring the Gemini input with two separate “Parts” in the Messages array (one for the image description and one for the mnemonic explanation), but Gemini still returns a single, combined string as the
Result
for both inputs.
- Example of the actual output format:
Module 3: Text parser (The problem module)
- Goal: My goal is to split the single Gemini output string into two separate text variables: one for the
Image Description
and one for theMnemonic Story
. - Attempt 1: Match pattern
- Operation:
Match pattern
- Source text:
{{2.Result}}
- Pattern used:
\*\*Image Description:\*\*([\s\S]*?)\s*\*\*Mnemonic Story & Explanation:\*\*([\s\S]*)
- Problem: After the module runs and turns green, the output bundle (
Bundle 1: (Collection)
) still contains the entire combined text underText (Long String)
. When I try to map the variables in the subsequent “Tools” module, the captured groups (1
and2
) do not appear in the list of mappable items under the Text parser’s output. They are simply not there to be selected, despite the RegEx being correct. A user in a similar thread had a screenshot showing1
and2
as mappable items, but they are not visible in my mapping menu.
- Operation:
- Attempt 2: Replace
- Operation:
Replace
- Pattern used (for Image Description):
\*\*Image Description:\*\*([\s\S]*?)\s*\*\*Mnemonic Story & Explanation:\*\*[\s\S]*
- Replacement:
$1
- Problem: This also failed. The output from the module still contained the entire combined text string, not just the captured group
1
. I tried the same logic for the Mnemonic text (\*\*Mnemonic Story & Explanation:\*\*(.*)
) with no success.
- Operation:
Summary of the issue: The Make.com Text parser is not correctly capturing or separating the text from the Gemini output using standard RegEx capturing groups, and the mapped variables (1
, 2
) are not available for selection in the next module’s mapping menu, even though the module runs without error.
Question: Has anyone encountered this specific issue with the Text parser and Gemini AI? Is there a known bug or a recommended workaround? How can I reliably split this text into two separate, mappable variables?