Weekly/Daily AI Generated Motivational Emails

Hi All,

I have set myself a goal of mastering automation with Make.com. I am on week 3 of my journey and am building my first project :hammer_and_wrench:. To help with motivation I decided to build an automation that would send me an AI generated motivational email either daily or weekly. I would be delighted if people check it out and give some feedback.

As a software developer for almost 20 years I understand that there is clean code and well… the opposite of clean code! The same probably applies to Make scenarios right? There will be clean ones and not so clean ones. I am curious to find out where my scenario is currently sitting, if it can be improved etc. Maybe there are better ways of doing what I implemented :thinking:.

I am attaching the blueprint but will also breakdown where I spent most of my time.

The email output from the call to ChatGPT was a Long String with multiple newlines.

First I passed this directly to my Gmail - Send an Email module, but there were two issues.

  1. I had no subject, it was part of the main email body.
  2. The email text was all on one line, it no longer had the newlines.

To solve these issues, first I used Tools - Set variable to create a variable called email_subject_content_array. I split the Long String email text into an array, splitting on two newlines.

Next I used the Tools - Set multiple variables to create two variables, email_subject and email_content.

I mapped the first item from the array email_subject_content_array to email_subject, replacing ‘Subject:’ with an emptystring.

I then joined the remaining items from the array using two html br tags as the separator and mapped it to email_content. This would ensure that the newlines would appear in the email.

And here is the final product! :e_mail: Thanks in advance for any feedback :folded_hands:t2:.

Blueprint:
ai-generated-email.json (39.3 KB)

1 Like

Welcome to the Make community!

Yes, that is possible. You’ll need a minimum of just two modules:

Screenshot_2025-03-14_210306

Screenshot_2025-03-14_220322

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":8,"module":"openai-gpt-3:CreateCompletion","version":1,"parameters":{"__IMTCONN__":107818},"mapper":{"model":"gpt-4o-mini","top_p":"1","select":"chat","messages":[{"role":"user","content":"Act as Tony Robbins, the world-renowned life coach, and write a short, motivational email (150-200 words) in my bold, energetic style. Address the recipient as \"Hey, Brian, you unstoppable force!\" Ask them two questions: \"What did you do yesterday to move closer to mastering Make.com?\" and \"What will you do today to unleash your automation potential with Make.com?\" Infuse the message with high-energy encouragement, pushing them to take massive action and own their journey to automation mastery. Keep it punchy, positive, and direct—no fluff!\n\nReturn as a JSON object using these exact keys:\n\n{\n  \"email_subject\": \"\",\n  \"email_html\": \"\"\n}","imageDetail":"auto"}],"max_tokens":"500","temperature":"1","n_completions":"1","response_format":"json_object","parseJSONResponse":true},"metadata":{"designer":{"x":12,"y":0,"name":"OpenAI"},"parameters":[{"name":"__IMTCONN__","type":"account:openai-gpt-3","label":"Connection","required":true}],"advanced":true}},{"id":4,"module":"google-email:ActionSendEmail","version":2,"parameters":{"account":94797},"mapper":{"cc":[],"to":["bdoherty.cz@gmail.com"],"bcc":[],"from":"","html":"{{8.result.email_html}}","subject":"{{8.result.email_subject}}","attachments":[]},"metadata":{"designer":{"x":254,"y":-2},"parameters":[{"name":"account","type":"account:google-restricted","label":"Connection","required":true}]}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

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.

Thanks @samliew for your detailed response!

I was looking at previous posts in the forums today and saw that formatting the output from ChatGPT to html was a common topic. Made me realise that I should have explored there before posting my project here looking for feedback! :slight_smile: So a little bit backwards but a learning experience for next time :wink: