{
    "name": "Assess Mailchimp campaign reports with OpenAI and store the results on a Google Sheet",
    "flow": [
        {
            "id": 1,
            "module": "mailchimp:getACampaignReport",
            "version": 2,
            "parameters": {},
            "mapper": {
                "campaign": "9ed0fe640c"
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 150
                },
                "restore": {
                    "expect": {
                        "campaign": {
                            "mode": "chose",
                            "label": "9ed0fe640c"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "mailchimp"
                            },
                            "label": "My MailChimp connection (Wayneg_7)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:mailchimp",
                        "label": "Connection"
                    }
                ],
                "expect": [
                    {
                        "mode": "edit",
                        "name": "campaign",
                        "type": "select",
                        "label": "Campaign ID",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "openai-gpt-3:CreateCompletion",
            "version": 1,
            "parameters": {},
            "mapper": {
                "model": "gpt-4-1106-preview",
                "top_p": "1",
                "select": "chat",
                "messages": [
                    {
                        "role": "system",
                        "content": "Please provide a detailed assessment on each of my email campaign results, then determine if it meets the E-commerce industry standard or not and provide reasons. My email list is {{1.emails_sent}}.nnHere are the industry stats:nType: {{1.industry_stats.type}}nOpen Rate:{{sum(1.industry_stats.open_rate * 100)}}%nClick Rate: {{1.industry_stats.click_rate}}nBounce Rate: {{1.industry_stats.bounce_rate}}nUnopen Rate: {{1.industry_stats.unopen_rate}}nUnsub Rate: {{1.industry_stats.unsub_rate}}nAbuse Rate: {{1.industry_stats.abuse_rate}}nnAlso please provide ideas to improve each metric where necessary.nnHere are the metrics for you to assess:nClicks total: {{1.clicks.clicks_total}}nOpens Total: {{1.opens.opens_total}}nOpen Rate: {{sum(1.opens.open_rate * 100)}}%nHard Bounces: {{1.bounces.hard_bounces}}nSoft Bounces: {{1.bounces.soft_bounces}}nnPlease output as a valid Json (ensure it's valid), separate at each metric and do not add any pretext like ```json. nnKeep the output titles the same as the metrics provided above, Clicks total, Opens Total etc. and the results for each metric names consistant to:nResultnIndustry standardnReasonnImprovement ideasnDo not use inverted commas for these names."
                    }
                ],
                "temperature": "1",
                "n_completions": "1",
                "response_format": "text"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 150
                },
                "restore": {
                    "expect": {
                        "stop": {
                            "mode": "chose"
                        },
                        "model": {
                            "mode": "chose",
                            "label": "gpt-4-1106-preview (system)"
                        },
                        "select": {
                            "label": "Create a Chat Completion (GPT Models)"
                        },
                        "messages": {
                            "mode": "chose",
                            "items": [
                                {
                                    "role": {
                                        "mode": "chose",
                                        "label": "System"
                                    }
                                }
                            ]
                        },
                        "logit_bias": {
                            "mode": "chose"
                        },
                        "max_tokens": {
                            "empty": true
                        },
                        "response_format": {
                            "mode": "chose",
                            "label": "Text"
                        },
                        "additionalParameters": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "openai-gpt-3"
                            },
                            "label": "Make Ent GPT4"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:openai-gpt-3",
                        "label": "Connection"
                    }
                ],
                "expect": [
                    {
                        "name": "select",
                        "type": "select",
                        "label": "Select Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "chat",
                                "prompt"
                            ]
                        }
                    },
                    {
                        "name": "max_tokens",
                        "type": "number",
                        "label": "Max Tokens"
                    },
                    {
                        "name": "temperature",
                        "type": "number",
                        "label": "Temperature",
                        "validate": {
                            "max": 2,
                            "min": 0
                        }
                    },
                    {
                        "name": "top_p",
                        "type": "number",
                        "label": "Top P",
                        "validate": {
                            "max": 1,
                            "min": 0
                        }
                    },
                    {
                        "name": "n_completions",
                        "type": "number",
                        "label": "Number"
                    },
                    {
                        "name": "frequency_penalty",
                        "type": "number",
                        "label": "Frequency Penalty",
                        "validate": {
                            "max": 2,
                            "min": -2
                        }
                    },
                    {
                        "name": "presence_penalty",
                        "type": "number",
                        "label": "Presence Penalty",
                        "validate": {
                            "max": 2,
                            "min": -2
                        }
                    },
                    {
                        "name": "logit_bias",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "token",
                                    "type": "text",
                                    "label": "Token ID",
                                    "required": true
                                },
                                {
                                    "name": "probability",
                                    "type": "number",
                                    "label": "Probability",
                                    "required": true,
                                    "validate": {
                                        "max": 100,
                                        "min": -100
                                    }
                                }
                            ],
                            "type": "collection",
                            "label": "Token Probability"
                        },
                        "type": "array",
                        "label": "Token Probability"
                    },
                    {
                        "name": "response_format",
                        "type": "select",
                        "label": "Response Format",
                        "validate": {
                            "enum": [
                                "text",
                                "json_object"
                            ]
                        }
                    },
                    {
                        "name": "seed",
                        "type": "integer",
                        "label": "Seed"
                    },
                    {
                        "name": "stop",
                        "spec": {
                            "name": "value",
                            "type": "text",
                            "label": "Stop Sequence"
                        },
                        "type": "array",
                        "label": "Stop Sequences",
                        "validate": {
                            "maxItems": 4
                        }
                    },
                    {
                        "name": "additionalParameters",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "key",
                                    "type": "text",
                                    "label": "Parameter Name",
                                    "required": true
                                },
                                {
                                    "name": "type",
                                    "type": "select",
                                    "label": "Input Type",
                                    "options": [
                                        {
                                            "label": "Text",
                                            "value": "text",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "text",
                                                    "label": "Parameter Value"
                                                }
                                            ],
                                            "default": true
                                        },
                                        {
                                            "label": "Number",
                                            "value": "number",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "number",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        },
                                        {
                                            "label": "Boolean",
                                            "value": "boolean",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "boolean",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        },
                                        {
                                            "label": "Date",
                                            "value": "date",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "date",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        },
                                        {
                                            "label": "Any",
                                            "value": "any",
                                            "nested": [
                                                {
                                                    "name": "value",
                                                    "type": "any",
                                                    "label": "Parameter Value"
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ],
                            "type": "collection",
                            "label": "Input Parameter"
                        },
                        "type": "array",
                        "label": "Other Input Parameters"
                    },
                    {
                        "name": "model",
                        "type": "select",
                        "label": "Model",
                        "required": true
                    },
                    {
                        "name": "messages",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "role",
                                    "type": "select",
                                    "label": "Role",
                                    "options": [
                                        {
                                            "label": "System",
                                            "value": "system"
                                        },
                                        {
                                            "label": "User",
                                            "value": "user"
                                        },
                                        {
                                            "label": "Assistant",
                                            "value": "assistant"
                                        }
                                    ],
                                    "required": true
                                },
                                {
                                    "name": "content",
                                    "type": "text",
                                    "label": "Message Content"
                                }
                            ],
                            "type": "collection",
                            "label": "Message"
                        },
                        "type": "array",
                        "label": "Messages",
                        "required": true
                    }
                ],
                "advanced": true
            }
        },
        {
            "id": 3,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": ""
            },
            "mapper": {
                "json": "{{2.choices[].message.content}}"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 150
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Choose a data structure"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ]
            },
            "onerror": [
                {
                    "id": 6,
                    "module": "builtin:Break",
                    "version": 1,
                    "parameters": {},
                    "mapper": {
                        "count": "5",
                        "retry": true,
                        "interval": "1"
                    },
                    "metadata": {
                        "designer": {
                            "x": 900,
                            "y": 300,
                            "messages": [
                                {
                                    "category": "badsettings",
                                    "severity": "error",
                                    "message": "This directive requires storing of incomplete executions to be enabled."
                                }
                            ]
                        },
                        "restore": {
                            "expect": {
                                "retry": {
                                    "mode": "chose"
                                }
                            }
                        },
                        "expect": [
                            {
                                "name": "retry",
                                "type": "boolean",
                                "label": "Automatically complete execution",
                                "required": true
                            },
                            {
                                "name": "count",
                                "type": "uinteger",
                                "label": "Number of attempts",
                                "required": true,
                                "validate": {
                                    "max": 10000,
                                    "min": 1
                                }
                            },
                            {
                                "name": "interval",
                                "type": "uinteger",
                                "label": "Interval between attempts",
                                "required": true,
                                "validate": {
                                    "max": 44640,
                                    "min": 1
                                }
                            }
                        ]
                    }
                }
            ]
        },
        {
            "id": 5,
            "module": "google-sheets:addRow",
            "version": 2,
            "parameters": {},
            "mapper": {
                "from": "drive",
                "mode": "select",
                "values": {
                    "0": "Result: {{3.`Clicks total`.Result}}nIndustry standard:{{3.`Clicks total`.`Industry standard`}}nReason: {{3.`Clicks total`.Reason}}nImprovement ideas:{{3.`Clicks total`.`Improvement ideas`}}",
                    "1": "{{3.`Opens Total`.Result}}n{{3.`Opens Total`.`Industry standard`}}n{{3.`Opens Total`.Reason}}n{{3.`Opens Total`.`Improvement ideas`}}",
                    "2": "{{3.`Hard Bounces`.Result}}n{{3.`Hard Bounces`.`Industry standard`}}n{{3.`Hard Bounces`.Reason}}n{{3.`Hard Bounces`.`Improvement ideas`}}",
                    "3": "{{3.`Soft Bounces`.Result}}n{{3.`Soft Bounces`.`Industry standard`}}n{{3.`Soft Bounces`.Reason}}n{{3.`Soft Bounces`.`Improvement ideas`}}"
                },
                "sheetId": "Sheet1",
                "spreadsheetId": "/1FV7c6ABLjQnVwX261IcqAu6uJ9-kRQwc/1XgB8sg9ogTu_aQodHIcIVFIFpzGPJLbqWKAPHG2vhgM",
                "includesHeaders": true,
                "insertDataOption": "INSERT_ROWS",
                "valueInputOption": "USER_ENTERED",
                "insertUnformatted": false
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "restore": {
                    "expect": {
                        "from": {
                            "label": "My Drive"
                        },
                        "mode": {
                            "label": "Select by path"
                        },
                        "sheetId": {
                            "label": "Sheet1"
                        },
                        "spreadsheetId": {
                            "path": [
                                "Growth solutions 2023",
                                "Email Campaign results with AI"
                            ]
                        },
                        "includesHeaders": {
                            "label": "Yes",
                            "nested": [
                                {
                                    "name": "values",
                                    "spec": [
                                        {
                                            "name": "0",
                                            "type": "text",
                                            "label": "A"
                                        },
                                        {
                                            "name": "1",
                                            "type": "text",
                                            "label": "B"
                                        },
                                        {
                                            "name": "2",
                                            "type": "text",
                                            "label": "C"
                                        },
                                        {
                                            "name": "3",
                                            "type": "text",
                                            "label": "D"
                                        },
                                        {
                                            "name": "4",
                                            "type": "text",
                                            "label": "E"
                                        },
                                        {
                                            "name": "5",
                                            "type": "text",
                                            "label": "F"
                                        },
                                        {
                                            "name": "6",
                                            "type": "text",
                                            "label": "G"
                                        },
                                        {
                                            "name": "7",
                                            "type": "text",
                                            "label": "H"
                                        },
                                        {
                                            "name": "8",
                                            "type": "text",
                                            "label": "I"
                                        },
                                        {
                                            "name": "9",
                                            "type": "text",
                                            "label": "J"
                                        },
                                        {
                                            "name": "10",
                                            "type": "text",
                                            "label": "K"
                                        },
                                        {
                                            "name": "11",
                                            "type": "text",
                                            "label": "L"
                                        },
                                        {
                                            "name": "12",
                                            "type": "text",
                                            "label": "M"
                                        },
                                        {
                                            "name": "13",
                                            "type": "text",
                                            "label": "N"
                                        },
                                        {
                                            "name": "14",
                                            "type": "text",
                                            "label": "O"
                                        },
                                        {
                                            "name": "15",
                                            "type": "text",
                                            "label": "P"
                                        },
                                        {
                                            "name": "16",
                                            "type": "text",
                                            "label": "Q"
                                        },
                                        {
                                            "name": "17",
                                            "type": "text",
                                            "label": "R"
                                        },
                                        {
                                            "name": "18",
                                            "type": "text",
                                            "label": "S"
                                        },
                                        {
                                            "name": "19",
                                            "type": "text",
                                            "label": "T"
                                        },
                                        {
                                            "name": "20",
                                            "type": "text",
                                            "label": "U"
                                        },
                                        {
                                            "name": "21",
                                            "type": "text",
                                            "label": "V"
                                        },
                                        {
                                            "name": "22",
                                            "type": "text",
                                            "label": "W"
                                        },
                                        {
                                            "name": "23",
                                            "type": "text",
                                            "label": "X"
                                        },
                                        {
                                            "name": "24",
                                            "type": "text",
                                            "label": "Y"
                                        },
                                        {
                                            "name": "25",
                                            "type": "text",
                                            "label": "Z"
                                        }
                                    ],
                                    "type": "collection",
                                    "label": "Values"
                                }
                            ]
                        },
                        "insertDataOption": {
                            "mode": "chose",
                            "label": "Insert rows"
                        },
                        "valueInputOption": {
                            "mode": "chose",
                            "label": "User entered"
                        },
                        "insertUnformatted": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "google"
                            },
                            "label": "My Google connection (l.govender@make.com)"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:google",
                        "label": "Connection"
                    }
                ],
                "expect": [
                    {
                        "name": "mode",
                        "type": "select",
                        "label": "Choose a Method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "select",
                                "fromAll",
                                "map"
                            ]
                        }
                    },
                    {
                        "name": "insertUnformatted",
                        "type": "boolean",
                        "label": "Unformatted",
                        "required": true
                    },
                    {
                        "name": "valueInputOption",
                        "type": "select",
                        "label": "Value input option",
                        "validate": {
                            "enum": [
                                "USER_ENTERED",
                                "RAW"
                            ]
                        }
                    },
                    {
                        "name": "insertDataOption",
                        "type": "select",
                        "label": "Insert data option",
                        "validate": {
                            "enum": [
                                "INSERT_ROWS",
                                "OVERWRITE"
                            ]
                        }
                    },
                    {
                        "name": "from",
                        "type": "select",
                        "label": "Choose a Drive",
                        "required": true,
                        "validate": {
                            "enum": [
                                "drive",
                                "share",
                                "team"
                            ]
                        }
                    },
                    {
                        "name": "spreadsheetId",
                        "type": "file",
                        "label": "Spreadsheet ID",
                        "required": true
                    },
                    {
                        "name": "sheetId",
                        "type": "select",
                        "label": "Sheet Name",
                        "required": true
                    },
                    {
                        "name": "includesHeaders",
                        "type": "select",
                        "label": "Table contains headers",
                        "required": true,
                        "validate": {
                            "enum": [
                                true,
                                false
                            ]
                        }
                    },
                    {
                        "name": "values",
                        "spec": [
                            {
                                "name": "0",
                                "type": "text",
                                "label": "A"
                            },
                            {
                                "name": "1",
                                "type": "text",
                                "label": "B"
                            },
                            {
                                "name": "2",
                                "type": "text",
                                "label": "C"
                            },
                            {
                                "name": "3",
                                "type": "text",
                                "label": "D"
                            },
                            {
                                "name": "4",
                                "type": "text",
                                "label": "E"
                            },
                            {
                                "name": "5",
                                "type": "text",
                                "label": "F"
                            },
                            {
                                "name": "6",
                                "type": "text",
                                "label": "G"
                            },
                            {
                                "name": "7",
                                "type": "text",
                                "label": "H"
                            },
                            {
                                "name": "8",
                                "type": "text",
                                "label": "I"
                            },
                            {
                                "name": "9",
                                "type": "text",
                                "label": "J"
                            },
                            {
                                "name": "10",
                                "type": "text",
                                "label": "K"
                            },
                            {
                                "name": "11",
                                "type": "text",
                                "label": "L"
                            },
                            {
                                "name": "12",
                                "type": "text",
                                "label": "M"
                            },
                            {
                                "name": "13",
                                "type": "text",
                                "label": "N"
                            },
                            {
                                "name": "14",
                                "type": "text",
                                "label": "O"
                            },
                            {
                                "name": "15",
                                "type": "text",
                                "label": "P"
                            },
                            {
                                "name": "16",
                                "type": "text",
                                "label": "Q"
                            },
                            {
                                "name": "17",
                                "type": "text",
                                "label": "R"
                            },
                            {
                                "name": "18",
                                "type": "text",
                                "label": "S"
                            },
                            {
                                "name": "19",
                                "type": "text",
                                "label": "T"
                            },
                            {
                                "name": "20",
                                "type": "text",
                                "label": "U"
                            },
                            {
                                "name": "21",
                                "type": "text",
                                "label": "V"
                            },
                            {
                                "name": "22",
                                "type": "text",
                                "label": "W"
                            },
                            {
                                "name": "23",
                                "type": "text",
                                "label": "X"
                            },
                            {
                                "name": "24",
                                "type": "text",
                                "label": "Y"
                            },
                            {
                                "name": "25",
                                "type": "text",
                                "label": "Z"
                            }
                        ],
                        "type": "collection",
                        "label": "Values"
                    }
                ]
            }
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "eu2.make.com",
        "notes": []
    }
}