Need Help Automating Newsletter Sending with Make.com, Gemini, and Google Docs

What are you trying to achieve?

My goal is to have the text generated by the Gemini module directly integrated into the Google Docs module, so that it saves and structures this text in a Google Docs file.

Steps taken so far

Hello everyone,

I’m currently working on an automation scenario to retrieve emails, test sending the retrieved emails through Gemini, and then use prompts to select the top four, refine them, and send them to Google Docs.

Here’s where I stand:

The connection between Outlook and Gemini is established.
I’m using Google Docs as a module to receive the content, but I’m facing an issue: I can’t seem to get the result obtained from Gemini to be directly sent to the Google Docs module I created.

Problem Encountered:
I am trying to automate the creation of newsletters using Make.com (formerly Integromat), Gemini AI, and Google Docs. The scenario works as follows:

Receiving emails via Outlook.
Processing the email content through Gemini AI to extract relevant information.
Inserting the text generated by Gemini into a Google Docs document.

The specific problem is as follows:

The Gemini AI module correctly generates the expected text, which is found in the "Result: (Long String)" field of its output.
However, when I try to map this "Result" field into the "Appended Text" field of the Google Docs module, Make.com does not correctly recognize the mapping.
Instead of automatically retrieving the text from Gemini, Make.com prompts me to fill in the "Result" field manually or returns a "BundleValidationError" indicating that a value is missing for the "text" field.
I have checked that the Google Docs document exists and that the path is correct.

If anyone has suggestions or advice on how to resolve this issue, I would greatly appreciate your input!

Thank you in advance for your help.

Screenshots: scenario setup, module configuration, errors

Screenshots: scenario setup, module configuration, errors


Hi @Marc-Michel_Mbk,

what a great idea for a scenario! Could you send over the output bundles of the gemini module? To do that, run it once → click on the little bubble next to the gemini module → Click the download symbol and click on “Download output bundles”. Then, just copy everything in there and send that here.

Need to replicate your gemini output to see the exact issue that google docs is throwing.

Thanks!

1 Like

sorry for replying so late, I did as you told me, here is the code:

[
{
“result”: “\n\nNEWS 1 :\nTitre :\nSource :\nContenu :\n\nNEWS 2 :\nTitre :\nSource :\nContenu :\n\nNEWS 3 :\nTitre :\nSource :\nContenu :\n\nNEWS 4 :\nTitre :\nSource :\nContenu :\n\nVoici les actualités à partir desquelles il faut faire la sélection :\n\n1. Nouveau record pour le CAC 40 : L’indice phare de la Bourse de Paris a franchi un nouveau record historique, porté par les bons résultats des entreprises du luxe. (Source : Le Figaro Économie)\n\n2. La BCE maintient ses taux directeurs inchangés : La Banque Centrale Européenne a décidé de ne pas modifier ses taux d’intérêt, malgré les pressions inflationnistes persistantes. (Source : Les Echos)\n\n3. Guide pratique pour investir dans l’immobilier locatif : Un article de blog détaille les étapes clés pour réussir son investissement locatif, de la recherche du bien à la gestion locative. (Source : Blog Investissement Immo)\n\n4. Les cryptomonnaies sous surveillance accrue : Les régulateurs financiers internationaux renforcent leur contrôle sur le marché des cryptomonnaies, craignant des risques systémiques. (Source : Reuters Finance)\n\n5. Webinaire gratuit : Optimiser sa fiscalité en 2024 : Une session en ligne propose des conseils pour réduire ses impôts grâce à des stratégies d’optimisation fiscale légale. (Source : Newsletter Fiscalité & Patrimoine)\n\n6. Elon Musk annonce un nouveau projet d’intelligence artificielle : Le fondateur de Tesla et SpaceX se lance dans la création d’une nouvelle entreprise dédiée à l’IA, visant à concurrencer OpenAI. (Source : Bloomberg Technology)\n\n7. L’inflation ralentit légèrement en zone euro : Les chiffres officiels montrent un léger ralentissement de l’inflation en zone euro, mais elle reste au-dessus de l’objectif de la BCE. (Source : Eurostat)\n\n8. Interview exclusive : Le PDG d’une Fintech française dévoile sa stratégie de croissance : Un entretien avec le dirigeant d’une startup innovante du secteur financier, qui partage sa vision et ses ambitions. (Source : La Tribune Finance)\n”,
“candidates”: [
{
“content”: {
“parts”: [
{
“text”: “\n\nNEWS 1 :\nTitre :\nSource :\nContenu :\n\nNEWS 2 :\nTitre :\nSource :\nContenu :\n\nNEWS 3 :\nTitre :\nSource :\nContenu :\n\nNEWS 4 :\nTitre :\nSource :\nContenu :\n\nVoici les actualités à partir desquelles il faut faire la sélection :\n\n1. Nouveau record pour le CAC 40 : L’indice phare de la Bourse de Paris a franchi un nouveau record historique, porté par les bons résultats des entreprises du luxe. (Source : Le Figaro Économie)\n\n2. La BCE maintient ses taux directeurs inchangés : La Banque Centrale Européenne a décidé de ne pas modifier ses taux d’intérêt, malgré les pressions inflationnistes persistantes. (Source : Les Echos)\n\n3. Guide pratique pour investir dans l’immobilier locatif : Un article de blog détaille les étapes clés pour réussir son investissement locatif, de la recherche du bien à la gestion locative. (Source : Blog Investissement Immo)\n\n4. Les cryptomonnaies sous surveillance accrue : Les régulateurs financiers internationaux renforcent leur contrôle sur le marché des cryptomonnaies, craignant des risques systémiques. (Source : Reuters Finance)\n\n5. Webinaire gratuit : Optimiser sa fiscalité en 2024 : Une session en ligne propose des conseils pour réduire ses impôts grâce à des stratégies d’optimisation fiscale légale. (Source : Newsletter Fiscalité & Patrimoine)\n\n6. Elon Musk annonce un nouveau projet d’intelligence artificielle : Le fondateur de Tesla et SpaceX se lance dans la création d’une nouvelle entreprise dédiée à l’IA, visant à concurrencer OpenAI. (Source : Bloomberg Technology)\n\n7. L’inflation ralentit légèrement en zone euro : Les chiffres officiels montrent un léger ralentissement de l’inflation en zone euro, mais elle reste au-dessus de l’objectif de la BCE. (Source : Eurostat)\n\n8. Interview exclusive : Le PDG d’une Fintech française dévoile sa stratégie de croissance : Un entretien avec le dirigeant d’une startup innovante du secteur financier, qui partage sa vision et ses ambitions. (Source : La Tribune Finance)\n”
}
],
“role”: “model”
},
“finishReason”: “STOP”,
“avgLogprobs”: -0.1728489993831732
}
],
“usageMetadata”: {
“promptTokenCount”: 84,
“candidatesTokenCount”: 509,
“totalTokenCount”: 593,
“promptTokensDetails”: [
{
“modality”: “TEXT”,
“tokenCount”: 84
}
],
“candidatesTokensDetails”: [
{
“modality”: “TEXT”,
“tokenCount”: 509
}
]
},
“modelVersion”: “gemini-2.0-flash”
}
]

@Marc-Michel_Mbk,

not the best at explaining, so I made a quick video for you:

Please let me know if that helps

3 Likes

Thank you so much, it worked!

I created a JSON file and put the output data inside. After linking it to the rest of the chain and running it, everything worked perfectly.
I’m not sure why, but sometimes after executing the scenario, only the “Watch Mail” module would run, and the downloadable output file would show “null” and be 0KB. But now, when I run the chain, with the “Watch Mail” module again,

everything executes as expected.

The issue now is that the action of modifying the selected articles with the Gemini module keeps looping and sending them back to the Google Docs module. If I don’t stop the process, the document keeps filling up with all the generated text.

I have no prior experience in this, and I’m still learning. Thank you all for your help!

1 Like

Welcome to the Make community!

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Example

Here is an example of how your scenario could look:

This is just an example. Your final solution may or may not look like this depending on your requirements.

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like

thank you for your advice, as I don’t know anything about make despite the fact that it’s complicated, I’m still trying to test my ideas and learn.

This scenario on Make.com automates the retrieval and processing of newsletters to extract the most relevant news. It starts by monitoring and retrieving the last 10 emails via Outlook, then converts their HTML content into plain text using the “HTML to Text” module. Once cleaned, these emails are grouped together using the “Text Aggregator” module and processed together by Gemini AI. Gemini then analyzes this content and selects the 4 most interesting news items according to their relevance to finance, wealth management and investment. The result is then stored in a Google Docs document for archiving and future use. However, one problem persists: some images and links remain present despite HTML to Text conversion, which may require additional filtering or adaptation of Gemini’s prompt to improve content clean-up before final storage.

1 Like

@samliew @Juliusforster.
thank you again, despite the fact that I’m not computer literate, I was able to create this scenario and make it fully functional, thanks to your advice and your help, thank you again.
The scenario monitors e-mails, extracts important information, cleans up and organizes the text, then sends this text to a Google Docs document. It uses AI to extract key points and apply a prompt, and saves everything in a Google Docs document. The only point to note is that newsletters are sometimes very long, which can push the text limit Gemini can provide over the edge. Other than that, everything else works fine.

1 Like

It might be possible to save a further operation per email by using the inline built-in function replace instead of the Text Parser “Replace” module.

{{ replace(text; search string; replacement string) }}

For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.