Hi All,
I would like to configure the Email alerts after the successful / failure of the Alteryx job which should display dynamic values to the recipients with the below mentioned template.
Subject:[Success/Failure] [Today's datetime] [Solution name] [Job name]
Body :
Dashboard/Solution name :
Job name:
Job frequency:
Job start date time: Job end date time:
Job duration:
Job status:
No of rows processed:
Any suggestions is much appreciated...!
Thanks in Advance
assuming you have access to Alteryx Server/Gallery and it's configure to allow you send email then:
In your workflow configuration > events> add Send Email and select when you want the email to be sent:
You will need to config fill in your to and from field.
Here is an example of an output:
Subject: Alteryx: G:\ProgramData\Alteryx\Service\Staging\d03f973574\Whereismycar.yxmd - 0 Errors
User: XXXXXXX
ComputerName: AYYYYYYYY
WorkingDir: G:\ProgramData\Alteryx\Service\Staging\ d03f973574\
Errors: 0
ConversionErrors: 0
Warnings: 2
Started running G:\ProgramData\Alteryx\Service\Staging\8680_2bcf5ae1ef1941bf8ab368d03f973574\ABCD.yxmd at Fri Jan 12 21:15:22 2024
00:00:0.797 - ToolId 1: T: \Data\dir2\dir3\dir4\01_Sales\01_Workflow\03_Data\BIKE.yxdb|2531 records were read from " T:\Data\dir2\dir3\dir4\01_Sales\01_Workflow\03_Data\BIKE.yxdb"
00:00:0.828 - ToolId 2: 1819 records were True and 712 were False
00:00:0.844 - ToolId 3: 23 records were True and 1796 were False
00:00:0.877 - Warning - ToolId 8: The field "Left_Right_Policy_No" is not contained in the record.
00:00:0.877 - Warning - ToolId 8: The field "Left_Right_Replaced_By" is not contained in the record.
00:00:0.906 - ToolId 5:T: \Data\dir2\dir3\dir4\01_Sales\01_Workflow\03_Data\CAR.yxdb|19 records were read from "T:\Data\dir2\dir3\dir4\01_Sales\01_Workflow\03_Data\CAR.yxdb"
00:00:0.953 - ToolId 8: 19 records were joined with 0 un-joined left records and 4 un-joined right records
00:00:1.188 - ToolId 4: T: \Data\dir2\dir3\dir4\01_Sales\01_Workflow\03_Data\CAR.yxdb|23 records were written to " T: \Data\dir2\dir3\dir4\01_Sales\01_Workflow\03_Data\CAR.yxdb|"
00:00:3.985 - ToolId 23: Messages sent: 1 Finished in 00:00:4.002 with 2 warnings
HTH
regards
Tam
Hello @Tam,
Thank you for the quick response.
I am aware of configuring the event in the designer. But the thing is I need to organize the output logs into the below mentioned template form.
Subject:[Success/Failure] [Today's datetime] [Solution name] [Job name]
Body :
Dashboard/Solution name :
Job name:
Job frequency:
Job start date time: Job end date time:
Job duration:
Job status:
No of rows processed:
Is it possible to edit the output logs?
@Sagarloknath ok got it.
If you can access the path where the %OutputLog% are kept you could read it using a dynamic input tool and then it's a matter of parsing the info required to generate an email.
Enable Logging via System Settings
To enable logging via System Settings, you need to be an Administrator user. If you're an Admin user...
In System Settings, navigate to Engine > General.
In the Logging Directory field, specify a directory where you want to capture the output logs that are produced each time a workflow or app runs.
To disable logging, leave the Logging Directory field blank.
Enable Logging via User Settings
You can also enable logging via Alteryx Designer's User Settings. To enable logging via User Settings...
In Designer, navigate to Options > User Settings > Edit User Settings.
In the User Settings Defaults tab, select the Override System Settings check box.
In the Logging Directory field, specify a directory to capture the output logs that are produced each time a workflow or app is run.
To disable logging, leave the Logging Directory field blank.
HTH
Tam
Thank you for the suggestion,
I have downloaded the log file. Would you mind tell me what is the next procedure to send an email with the modified template. If you can send me the workflow that would be great.
Regards,
Sagar
Hi Sagar
Scan down the log and output the value you need (you can use regex if you know how to. To me regex is like reading latin) put these values into the text input in the attached example work flow.
Subject:[Success/Failure] you need to define what is success or failure [Today's datetime] row 8 [Solution name] row 8[Job name] row 3
Body :
Dashboard/Solution name : row 8
Job name: row 3
Job frequency: not really sure what you mean ?
Job start date time: row 8 Job end date time: calculated from row 8 and row 17
Job duration: row 17
Job status: You will need to define this from row 4 to 6
No of rows processed: Sum of Row 9 and row 14
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |