Welcome to the Make community!
This is a great use-case for AI to perform.
You can do this with just a single module.
Here is an example using the FREE Groq AI module “Create a Chat Completion”:
Output
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.
-
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:
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.
-
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":286,"module":"groq:createJSONChatCompletion","version":1,"parameters":{"__IMTCONN__":2370769},"mapper":{"model":"llama-3.1-70b-versatile","systemPrompt":"You will receive possibly non-English dates, translate them, and extract them into JSON using the example format below.\n\nThe JSON should look like this:\n\n{\n \"formatted_date\": \"31/12/2024\",\n \"formatted_time\": \"11:59pm\",\n \"military_time\": \"23:59\"\n}","userMessage":"23 11:30 2024 اغسطس"},"metadata":{"designer":{"x":2993,"y":-1387},"restore":{"parameters":{"__IMTCONN__":{"label":"My Groq API Key connection","data":{"scoped":"true","connection":"groq"}}},"expect":{"model":{"mode":"chose","label":"llama-3.1-70b-versatile"}}},"parameters":[{"name":"__IMTCONN__","type":"account:groq","label":"Connection","required":true}],"expect":[{"name":"model","type":"select","label":"Model","required":true},{"name":"systemPrompt","type":"text","label":"System Prompt","required":true},{"name":"userMessage","type":"text","label":"User Message","required":true},{"name":"max_tokens","type":"number","label":"Max tokens returned"},{"name":"temperature","type":"number","label":"Temperature"},{"name":"top_p","type":"number","label":"Top P"},{"name":"frequency_penalty","type":"number","label":"Frequency Penalty"},{"name":"seed","type":"number","label":"Seed"}]}}]}],"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.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!