Email Template Code
This allows you to make changes or modifications to the email data before sending it.
You can customize the data, format, or structure as needed to meet specific requirements.
For AI-based email customization and intelligent processing, see:
AI Operations
Sample Implementation
async function customizeERP(userData, apiOperations) {
const tableName = "Sales Orders Table";
let recipients = {
to: ["examples@domain.com"]
};
if (userData && userData.length > 0) {
const returnData = await Promise.all(
userData.map(async (row) => {
// Your Code Starts Here
})
);
return {
data: returnData,
recipients: recipients
};
}
}Output structure
{
"data": {
"count": 1,
"rows": [
{
"id": 1,
"columnName1": "columnValue1",
"columnName2": "columnValue2",
"columnName3": "columnValue3"
}
]
},
"recipients": {
"to": []
}
}