Skip to main content

Node Operations

This document describes every resource and operation available in the Workflow Interaction Layer node as seen in the n8n UI.

Auto-Populated Fields

The node automatically injects two fields on every create operation; you do not need to set them:

FieldSourceDescription
workflowIdthis.getWorkflow().idThe ID of the workflow containing this node
workflowInstanceIdthis.getExecutionId()The current execution ID

Resource: Message

Create

ParameterTypeRequiredDefaultDescription
Actor IDstringYes-Target actor identifier
Actor TypeoptionsYesuseruser, group, role, system, other
TitlestringYes-Message title
Bodystring (multiline)Yes-Message body text
MetadataJSONNo{}Arbitrary JSON metadata

Get Many / Get Messages by Actor ID

Both operations support actor, workflow instance, since, and limit filters as shown in the n8n UI.

Resource: Action

Create

Creates a new action in the WIL API layer.

ParameterTypeRequiredDefaultDescription
Actor IDstringYes-Target actor identifier
Actor TypeoptionsYesuseruser, group, role, system, other
Action TypeoptionsYesgetapprovalgetapproval, showform, waitonevent
Action TitlestringNo-Optional title for the action
HTMLstringYes, for getapproval-HTML content shown before approval options
OptionslistYes, for getapproval-Repeatable approval option labels. At least one option is required.
CHEFS Form NamestringYes, for showform-CHEFS form name shown for the form action
CHEFS Form IDstringYes, for showform-CHEFS form ID to render
CHEFS Form API KeystringYes, for showform-CHEFS form API key used server-side
CHEFS Form Submission IDstringNo-Existing CHEFS form submission ID to prefill from prior data
Form Pre-Fill DataJSONNo{}Object of CHEFS field API names and values
PayloadJSONYes, for waitonevent{}Free-form wait-on-event payload, for example { "eventName": "clicked" }
Callback MethodoptionsNoPOSTnone, POST, PUT, PATCH
Callback URLstringYes (when Callback Method != None)-URL called when action completes
Callback Payload SpecJSONNo{}Template for expected callback body
Due DatestringNo-RFC 3339 timestamp
PriorityoptionsNonormalnormal or critical
Check InstringNo-RFC 3339 reminder timestamp
MetadataJSONNo{}Arbitrary JSON metadata

Action Title is sent as top-level actionTitle; it is not nested inside payload.

Payload by Action Type

  • getapproval builds payload { "html": "...", "options": ["Yes", "No"] }.
  • showform builds payload { "formName": "...", "formId": "...", "formApiKey": "...", "submissionId": "...", "formPreFillData": {} }.
  • waitonevent uses the raw Payload JSON field, matching the previous behavior.

getapproval HTML Details

When actionType is getapproval, the node builds the payload from the HTML and Options fields:

{
"html": "<p>Do you approve this request?</p>",
"options": ["Yes", "No"]
}

HTML and at least one approval option are required. The node rejects getapproval actions with missing HTML or an empty options list because the user would otherwise have no useful prompt or no way to respond.

The external UI sanitizes the HTML before rendering it. Inline scripts, event handlers, data attributes, and arbitrary inline CSS are not allowed. This keeps approval prompts safe while still allowing structured content.

Allowed tags include:

CategoryTags
Textp, br, strong, b, em, i, u, s, span, div
Headingsh1, h2, h3, h4, h5, h6
Listsul, ol, li
Tablestable, thead, tbody, tr, th, td
Othera, img, hr, blockquote, code, pre

Allowed attributes include:

AttributeTypical use
href, target, relLinks
src, alt, width, heightImages
colspan, rowspanTable cells
class, idNon-sensitive identifiers only

The renderer applies controlled styles for headings, paragraphs, lists, blockquotes, code, links, images, and tables. Do not rely on inline CSS such as style="...", border, cellpadding, or cellspacing; those are stripped or ignored. Use normal semantic HTML and let the UI apply the approved styling.

Example: Simple Approval

HTML field:

<h2>Approve Request</h2>
<p>Please confirm whether this request should proceed.</p>

Options:

Approve
Reject

Generated payload:

{
"html": "<h2>Approve Request</h2><p>Please confirm whether this request should proceed.</p>",
"options": ["Approve", "Reject"]
}

HTML field:

<h2>Consent to Share Income Information</h2>

<p>
By selecting <b>Yes</b>, you authorize us to collect and share your income information with authorized organizations
to determine your eligibility and process your request.
</p>

<table>
<tr>
<th colspan="2">Consent Summary</th>
</tr>
<tr>
<td><b>Purpose</b></td>
<td>Determine eligibility and process your request.</td>
</tr>
<tr>
<td><b>Information</b></td>
<td>Income information provided by you or authorized sources.</td>
</tr>
<tr>
<td><b>If you choose No</b></td>
<td>We may not be able to complete your eligibility assessment.</td>
</tr>
</table>

<blockquote>Your information will be used only for this purpose and handled securely.</blockquote>

Options:

Yes
No

Generated payload:

{
"html": "<h2>Consent to Share Income Information</h2><p>By selecting <b>Yes</b>, you authorize us to collect and share your income information with authorized organizations to determine your eligibility and process your request.</p><table><tr><th colspan=\"2\">Consent Summary</th></tr><tr><td><b>Purpose</b></td><td>Determine eligibility and process your request.</td></tr><tr><td><b>Information</b></td><td>Income information provided by you or authorized sources.</td></tr><tr><td><b>If you choose No</b></td><td>We may not be able to complete your eligibility assessment.</td></tr></table><blockquote>Your information will be used only for this purpose and handled securely.</blockquote>",
"options": ["Yes", "No"]
}
Example: Review Checklist

HTML field:

<h3>Review Required</h3>
<p>Confirm that the following checks are complete before approving:</p>

<ul>
<li>Applicant identity has been verified.</li>
<li>Required documents have been reviewed.</li>
<li>No duplicate request is active.</li>
</ul>

<hr />

<p><b>Decision:</b> choose one option below.</p>

Options:

Approve
Needs Changes
Reject

Generated payload:

{
"html": "<h3>Review Required</h3><p>Confirm that the following checks are complete before approving:</p><ul><li>Applicant identity has been verified.</li><li>Required documents have been reviewed.</li><li>No duplicate request is active.</li></ul><hr><p><b>Decision:</b> choose one option below.</p>",
"options": ["Approve", "Needs Changes", "Reject"]
}

showform Details

FieldTypeRequiredDescription
formNamestringYesCHEFS form name shown for the form action
formIdstringYesCHEFS form ID to render
formApiKeystringYesCHEFS form API key used server-side. The backend strips it before returning actions to the UI.
submissionIdstringNoExisting CHEFS form submission ID used to prefill the form from prior submission data
formPreFillDataobjectNoKey-value pairs matching CHEFS form field API names

If submissionId is provided, it takes full priority: the form loads the existing submission data and formPreFillData is ignored.

Other Action Operations

  • Get retrieves a single action by ID.
  • Get Many lists actions with optional actor, workflow instance, since, and limit filters.
  • Update updates action status. To delete an action, update status to deleted.