<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tested Automations</title>
    <description>The latest articles on DEV Community by Tested Automations (@testedautomations).</description>
    <link>https://dev.to/testedautomations</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4250865%2F4861c83e-9422-4b17-820b-cc243730e148.png</url>
      <title>DEV Community: Tested Automations</title>
      <link>https://dev.to/testedautomations</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/testedautomations"/>
    <language>en</language>
    <item>
      <title>n8n dedupe trap: alwaysOutputData + error output runs both branches</title>
      <dc:creator>Tested Automations</dc:creator>
      <pubDate>Wed, 18 Nov 2026 03:55:34 +0000</pubDate>
      <link>https://dev.to/testedautomations/n8n-dedupe-trap-alwaysoutputdata-error-output-runs-both-branches-21l4</link>
      <guid>https://dev.to/testedautomations/n8n-dedupe-trap-alwaysoutputdata-error-output-runs-both-branches-21l4</guid>
      <description>&lt;p&gt;To deduplicate leads in n8n you typically look the email up in Google Sheets first. If there is no match the Sheets node returns &lt;strong&gt;no items&lt;/strong&gt; and the workflow silently stops, so people turn on &lt;strong&gt;Always Output Data&lt;/strong&gt;: now "not found" produces one empty item you can route to "add new lead".&lt;/p&gt;

&lt;p&gt;I combined that with &lt;strong&gt;On Error: continue (using error output)&lt;/strong&gt; to send an "ACTION NEEDED" email when the sheet is unreachable. Testing with a broken tab name showed a nasty interaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;With the lookup failing, both of these ran:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the error output → ACTION NEEDED email (correct), and&lt;/li&gt;
&lt;li&gt;the main output, because &lt;em&gt;Always Output Data&lt;/em&gt; added an empty item → treated as "new lead" → appended to the sheet → auto-reply → &lt;strong&gt;200 OK&lt;/strong&gt; to the form.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the owner got an alarm &lt;em&gt;and&lt;/em&gt; a "new lead" email, and the form was told everything was fine. With an expired credential instead of a typo, the append would fail too and you would get two alarms for one lead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Use &lt;strong&gt;On Error: Continue (regular output)&lt;/strong&gt; on the lookup node instead of the error output, and route all three cases with a Switch:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Case&lt;/th&gt;
&lt;th&gt;What the item looks like&lt;/th&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lookup failed&lt;/td&gt;
&lt;td&gt;has &lt;code&gt;error&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;ACTION NEEDED email, reply 202&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Match found&lt;/td&gt;
&lt;td&gt;has &lt;code&gt;row_number&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;update existing row&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No match&lt;/td&gt;
&lt;td&gt;empty item from Always Output Data&lt;/td&gt;
&lt;td&gt;add new lead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each case now has exactly one path. I tested all three against a real sheet, plus a form post with the email in different upper/lower case to confirm the dedupe matches.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: this comes from building my &lt;a href="https://testedautomations.gumroad.com/l/n8n-lead-capture?utm_source=devto&amp;amp;utm_campaign=alwaysoutput" rel="noopener noreferrer"&gt;Lead Capture for n8n&lt;/a&gt; kit. The pattern above is all you need to fix it in your own workflow.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>nocode</category>
      <category>n8n</category>
      <category>automation</category>
      <category>googlesheets</category>
    </item>
    <item>
      <title>Your n8n error alert can crash too: paired items are lost on a Google Sheets error output</title>
      <dc:creator>Tested Automations</dc:creator>
      <pubDate>Wed, 18 Nov 2026 03:49:55 +0000</pubDate>
      <link>https://dev.to/testedautomations/your-n8n-error-alert-can-crash-too-paired-items-are-lost-on-a-google-sheets-error-output-2a69</link>
      <guid>https://dev.to/testedautomations/your-n8n-error-alert-can-crash-too-paired-items-are-lost-on-a-google-sheets-error-output-2a69</guid>
      <description>&lt;p&gt;A common n8n pattern for "never lose data" is: set the node's &lt;strong&gt;On Error&lt;/strong&gt; to &lt;em&gt;Continue (using error output)&lt;/em&gt; and wire the error output to an "ACTION NEEDED" email. I use that in every workflow I sell. While testing an invoice-reminder workflow I found a case where &lt;strong&gt;the alert email itself failed&lt;/strong&gt;, so the error went nowhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Email node sends a reminder to a client.&lt;/li&gt;
&lt;li&gt;Google Sheets "Update Row" node writes "Reminders sent" back to the sheet. On Error: continue using error output.&lt;/li&gt;
&lt;li&gt;Error output → Email node: "ACTION NEEDED: reminder for invoice {{ $('Plan reminders').item.json.invoice }} was sent, but the sheet was not updated".&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;I renamed the tab to simulate a broken sheet. The reminder went out, the update failed (expected), and then the alert node failed with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Paired item data for item from node 'Mark reminder in sheet' is unavailable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Sheets node failed &lt;strong&gt;before&lt;/strong&gt; it processed individual items ("Sheet with name ... not found"), so the items on its error output carried no link back to the input items. Every &lt;code&gt;$('Some earlier node').item&lt;/code&gt; lookup in the alert node broke. The workflow stopped, and the daily summary that should have run afterwards never ran either.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Don't rely on &lt;code&gt;.item&lt;/code&gt; (paired-item lookups) in nodes that sit on an error output. Two options that worked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Execute Once + &lt;code&gt;.all()&lt;/code&gt;&lt;/strong&gt;: set the alert node to &lt;em&gt;Execute Once&lt;/em&gt; and list everything from a node before the failure, e.g. &lt;code&gt;$('Row update values').all().map(i =&amp;gt; i.json.invoice)&lt;/code&gt;. A batch update usually fails as a whole, so "here is everything that was sent today" is the right message anyway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Carry the data on the item&lt;/strong&gt;: put the fields you need into the item with a Set node &lt;em&gt;before&lt;/em&gt; the risky node, so the alert can read &lt;code&gt;$json&lt;/code&gt; instead of looking back.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Test your alerts, not just your happy path
&lt;/h2&gt;

&lt;p&gt;Break each external step on purpose (wrong tab name, SMTP pointing at a closed port) and check that the alert actually arrives. Two of my three workflows had an alert path that looked right in the editor and failed the first time it was triggered.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I sell tested n8n kits that use this pattern: &lt;a href="https://testedautomations.gumroad.com/l/n8n-invoice-reminders?utm_source=devto&amp;amp;utm_campaign=paired-items" rel="noopener noreferrer"&gt;Invoice Payment Reminders for n8n&lt;/a&gt;. The fix above is complete on its own.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>nocode</category>
      <category>n8n</category>
      <category>automation</category>
      <category>errors</category>
    </item>
    <item>
      <title>n8n Google Sheets append works in the editor but fails after import? Check columns.schema</title>
      <dc:creator>Tested Automations</dc:creator>
      <pubDate>Wed, 18 Nov 2026 03:49:04 +0000</pubDate>
      <link>https://dev.to/testedautomations/n8n-google-sheets-append-works-in-the-editor-but-fails-after-import-check-columnsschema-4cgb</link>
      <guid>https://dev.to/testedautomations/n8n-google-sheets-append-works-in-the-editor-but-fails-after-import-check-columnsschema-4cgb</guid>
      <description>&lt;p&gt;I sell small n8n workflows, and before selling one I test it end to end against a real Google Sheet. The first real-sheet test of my order workflow failed on &lt;strong&gt;every&lt;/strong&gt; valid order, even though the same workflow had looked fine while I built it. This post explains why, so you don't ship the same bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  The symptom
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Google Sheets node (v4.5, "Append Row", mapping mode "Map Each Column Manually") is in the JSON with all column mappings filled in.&lt;/li&gt;
&lt;li&gt;After importing the workflow on another instance, every append fails or writes nothing. My error branch caught it, so the order was emailed to me as "ACTION NEEDED" instead of disappearing, but no row was ever written.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The cause
&lt;/h2&gt;

&lt;p&gt;In "Map Each Column Manually" mode the node stores two things:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"columns"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mappingMode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"defineBelow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"Order ID"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"={{ $json.order_id }}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;value&lt;/code&gt; holds your expressions. &lt;code&gt;schema&lt;/code&gt; holds the list of sheet columns the node fetched from the sheet while you were editing. If you build or edit the JSON by hand, or export it before the node ever loaded the sheet, &lt;code&gt;schema&lt;/code&gt; can be empty. With an empty schema, the mapped values have no columns to go to.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Put one entry per column into &lt;code&gt;schema&lt;/code&gt;, matching your header row exactly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Order ID"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"displayName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Order ID"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"defaultMatch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="nl"&gt;"display"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"canBeUsedToMatch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, open the node once in the editor with the real sheet selected, so n8n fills the schema, then export again.&lt;/p&gt;

&lt;h2&gt;
  
  
  A second one from the same test: "+44..." becomes #ERROR!
&lt;/h2&gt;

&lt;p&gt;The same test turned the phone number &lt;code&gt;+44 7700 900123&lt;/code&gt; into &lt;code&gt;#ERROR!&lt;/code&gt;. Google Sheets parses values starting with &lt;code&gt;+&lt;/code&gt; (or &lt;code&gt;=&lt;/code&gt;) as formulas when they're written "as the user would type them". Set the node's &lt;strong&gt;Options → Cell Format&lt;/strong&gt; to &lt;strong&gt;RAW&lt;/strong&gt; (&lt;code&gt;"options": {"cellFormat": "RAW"}&lt;/code&gt;) and the value is stored as plain text.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I test now
&lt;/h2&gt;

&lt;p&gt;For every workflow I keep a test copy that points at a throwaway Google Sheet (shared with a service account) and a local mail catcher (Mailpit). A script posts the valid, invalid and broken cases and then reads the sheet back through the Sheets API. Both bugs above were invisible until the row was read back.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I sell tested n8n workflow kits, including the order workflow where I found these bugs: &lt;a href="https://testedautomations.gumroad.com/l/n8n-order-intake-kit?utm_source=devto&amp;amp;utm_campaign=sheets-schema" rel="noopener noreferrer"&gt;Order Intake Kit for n8n&lt;/a&gt;. Everything you need to fix the bug yourself is in this post.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>nocode</category>
      <category>n8n</category>
      <category>automation</category>
      <category>googlesheets</category>
    </item>
  </channel>
</rss>
