Actions13
Table → Increment or Decrement a Field
AI-generatedOverview
This node interacts with a table resource to increment or decrement a numeric field in a specific record. It is useful when you need to update counters, quantities, or any numeric value stored in a table dynamically during workflow execution. For example, you might use it to increase the stock count of an item after a sale or decrease the number of available seats after a booking.
Properties
| Name | Meaning |
|---|---|
| Table Name or ID | Select the target table by name or ID where the record exists. |
| Record Name or ID | Select the specific record within the chosen table to update. |
| Column Name or ID | Choose the numeric column (field) in the record that will be incremented or decremented. |
| Value | The numeric amount to add (increment) or subtract (decrement) from the selected field's current value. |
Output
The node outputs JSON data representing the updated record after the increment or decrement operation. This typically includes the record's fields with their new values reflecting the change. If the node supports binary data output, it would relate to any file attachments or media linked to the record, but this operation primarily deals with numeric field updates and does not produce binary output.
Dependencies
- Requires connection to the external service managing tables and records (e.g., a database or API).
- Needs an API authentication token or key configured in n8n credentials to authorize requests.
- The node depends on dynamic loading methods to fetch available tables, records, and columns for user selection.
Troubleshooting
Common Issues:
- Selecting a non-numeric field for increment/decrement will likely cause errors.
- Providing an invalid record or table ID may result in "record not found" or similar errors.
- Insufficient permissions or invalid API credentials can cause authorization failures.
Error Messages:
- "Field is not numeric": Ensure the selected column is a numeric type.
- "Record not found": Verify the record ID exists in the specified table.
- "Unauthorized" or "Authentication failed": Check that the API key or token is correctly set up in n8n credentials.
Links and References
- n8n Expressions Documentation
- Relevant API documentation for the external table service (not provided here).