✍️ Send a mail the an automation workflow
- 1. Summary
- 2. Result
- 3. Step by Step Guide
- Use a dialog to trigger a workflow
- Prerequisites:
- Steps:
- 4. Documentation
1. Summary
Mail is sent via automation workflow trigger
2. Result
A mail was successfully sent by the workflow
3. Step by Step Guide
Use a dialog to trigger a workflow
Prerequisites:
- Your n8n workflow is ready
- The workflow name has no special character and it is activated
Steps:
- Create a dialog
- Create a form and add it to the dialog
- The form can include multiple data-fields, every field and value will automatically send to the n8n workflow
- The data is accessable via
$json.body.payload.formData.[field-name]
- The form needs a button
- name of the button (object instance name) = [workflowname]
- EventClick = see code below
- document: with this it is possible to handover documents like a word-file to the workflow
- formData: all data from your form
- myParam.workflowName: Instead of using the button-name you can hardcode the workflowname here
myParam.workflowName = 'my-workflow';
- At the end the dialog will be closed automatically
- TODO: Create a message based on the response from the workflow-execution (right now: have a look to the dev-tools console)
B1 doesn’t allow special characters within object instance names (also not “-”). So keep in mind to give the n8n workflow a name without any special character
var myParam = {
context: { eventSource },
payload: {
document: '$_[context.eventSource.topScreen.caller.topScreen.getObject(\'dextdoc\')?.getValue(\'fullpath\')]_$',
formData: '$_[context.eventSource.parent.getAllScreenValues()]_$'
},
options: { isTest: false}
};
myParam.workflowName = eventSource.name;
myParam.context.eventSource = eventSource;
console.log(myParam);
window.akioma.automation.runWorkflow(myParam);
eventSource.topScreen.close();
4. Documentation
To find more information, you can check the following documentation.
Back to Use Cases
Back to Home Page