Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Send a mail with the automation workflow

    Send a mail with the automation workflow

    icon
    ✍️ 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:

    1. Your n8n workflow is ready
    2. The workflow name has no special character and it is activated
    3. image

    Steps:

    1. Create a dialog
    2. Create a form and add it to the dialog
      1. The form can include multiple data-fields, every field and value will automatically send to the n8n workflow
      2. The data is accessable via $json.body.payload.formData.[field-name]
      3. The form needs a button
        1. name of the button (object instance name) = [workflowname]
        2. ⚠️
          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
        3. EventClick = see code below
        4. document: with this it is possible to handover documents like a word-file to the workflow
        5. formData: all data from your form
        6. myParam.workflowName: Instead of using the button-name you can hardcode the workflowname here myParam.workflowName = 'my-workflow';
        7. At the end the dialog will be closed automatically
        8. TODO: Create a message based on the response from the workflow-execution (right now: have a look to the dev-tools console)
    image

    4. Documentation

    To find more information, you can check the following documentation.

    Automation HubAutomation Hub

    Back to Use CasesUse Cases

    Back to Home Page

    Logo
    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();