Commit Graph
93 Commits
Author SHA1 Message Date
Omar Ajoue 416e15cdb6 ⚡ Improve axios output to be more identical to request (#2588) 2021-12-23 21:20:50 +01:00
Omar Ajoue fbaac6cd5e 🚨 Stabilize test workflows (#2480)
* Attempt to fix test workflows execution

* Remove apt update

* trying to fix timezone

* Trying to fix build issues

* Reduced concurrency level

* Improve error message and further decrease concurrency level

* Further reduce concurrency level

* Removed concurrency

* Removing update credentials as it's not working currently

* Also removing export

* Fixed versions for typeorm and sqlite

* Re add concurrency

* Adjustig sqlite3 and typeorm versions

* Fixing only sqlite version

* Fixing only typeorm version

* Reverting unnecessary changes
2021-11-27 10:54:18 +01:00
Omar Ajoue 9f7113c94b 🐛 Remove default headers for PUT and PATCH (#2434) 2021-11-15 17:20:28 +01:00
Omar Ajoue 357178d83b ⚡ New JSON attributes are now considered warnings in testing workflows (#2432) 2021-11-12 14:28:49 +01:00
Omar Ajoue 15e64d1bc4 🐛 Add function to calculate content-length when using multipart/form-data (#2427) 2021-11-12 13:55:29 +01:00
Omar Ajoue e39678b54f 🐛 Fixed url params serializing for OAuth1 requests (#2381) 2021-10-28 11:09:25 -05:00
Omar Ajoue c97ceba86d 🐛 Fixed the way proxies are declared with axios (#2384) 2021-10-28 11:07:09 -05:00
Omar Ajoue 15d05c7f01 ⚡ Fixed ignore response code flag to work properly with return full response (#2370) 2021-10-26 18:58:08 -05:00
Omar Ajoue 3fe5a2ddff 🐛 Fix run deck node (#2285) 2021-10-06 13:14:53 -05:00
Omar Ajoue a5e714f1c4 🐛 Fix the way arrays are serialized for gmail and a few other nodes (#2289) 2021-10-06 13:05:28 -05:00
Omar Ajoue 86942c4ce7 🐛 Fix "Ignore response code" flag in http request node (#2284) 2021-10-06 12:53:18 -05:00
Omar Ajoue 3253a81318 🐛 Fix body formatting for x-form-www-urlencoded (#2269) 2021-10-01 17:43:50 +02:00
Omar AjoueandJan Oberhauser 4a3d3cd331 🐛 Improve Axios compatibility (#2262)
* Improved the error object returned by axios to make it more compatible with request

* Fixed multipart/form-data payload creation

* 🐛 Remove issue with circular references

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-09-30 14:10:56 -05:00
Omar Ajoue 694ec64330 Changed the error handling location 2021-09-28 15:20:01 +02:00
Omar Ajoue b873eec2ad Fixed refresh token to work correctly with Axios 2021-09-28 14:41:12 +02:00
Omar Ajoue 62d1d69710 🐛 Fix n8n's behavior for empty response bodies (#2246)
* Fixed n8n's behavior for empty response bodies

* Correctly parsing empty bodies when expected output is a buffer
2021-09-27 17:50:37 -05:00
Omar Ajoue 3c256dc3f6 🐛 Fix startup behavior for scaled mode (#2242) 2021-09-24 08:42:41 +02:00
443c2a4d51 ✨ Updated node design and node versioning (#1961)
* ⚡ introduce versioned nodes

* Export versioned nodes for separate process run

* Add bse node for versioned nodes

* fix node name for versioned nodes

* extend node from nodeVersionedType

* improve nodes base and flow to FE

* revert lib es2019 to es2017

* include version in key to prevent duplicate key

* handle type versions on FE

* clean up

* cleanup nodes base

* add type versions in getNodeParameterOptions

* cleanup

* code review

* code review + add default version to node type description

* remove node default types from store

* 💄 cleanups

* Draft for migrated Mattermost node

* First version of Mattermost node versioned according to node standards

* Correcting deactivate operations name to match currently used one

* ✨ Create utility types

* ⚡ Simplify Mattermost types

* ⚡ Rename exports for consistency

* ⚡ Type channel properties

* ⚡ Type message properties

* ⚡ Type reaction properties

* ⚡ Type user properties

* ⚡ Add type import to router

* 🐛 Add missing key

* 🔨 Adjust typo in operation name

* 🔨 Inline exports for channel properties

* 🔨 Inline exports for message properties

* 🔨 Inline exports for reaction properties

* 🔨 Inline exports for user properties

* 🔨 Inline exports for load options

* 👕 Fix lint issue

* 🔨 Inline export for description

* 🔨 Rename descriptions for clarity

* 🔨 Refactor imports/exports for methods

* 🔨 Refactor latest version retrieval

* 🔥 Remove unneeded else clause

When the string literal union is exhausted, the resource key becomes never, so TS disallows wrong key usage.

* ✨ Add overloads to getNodeParameter

* ⚡ Improve overload

* 🔥 Remove superfluous INodeVersions type

* 🔨 Relocate pre-existing interface

* 🔥 Remove JSDoc arg descriptions

* ⚡ Minor reformatting in transport file

* ⚡ Fix API call function type

* Created first draft for Axios requests

* Working version of mattermost node with Axios

* Work in progress for replacing request library

* Improvements to request translations

* Fixed sending files via multipart / form-data

* Fixing translation from request to axios and loading node parameter options

* Improved typing for new http helper

* Added ignore any for specific lines for linting

* Fixed follow redirects changes on http request node and manual execution of previously existing workflow with older node versions

* Adding default headers according to body on httpRequest helper

* Spec error handling and fixed workflows with older node versions

* Showcase how to export errors in a standard format

* Merging master

* Refactored mattermost node to keep files in a uniform structure. Also fix bugs with merges

* Reverting changes to http request node

* Changed nullish comparison and removed repeated code from nodes

* Renamed queryString back to qs and simplified node output

* Simplified some comparisons

* Changed header names to be uc first

* Added default user agent to requests and patch http method support

* Fixed indentation, remove unnecessary file and console log

* Fixed mattermost node name

* Fixed lint issues

* Further fix linting issues

* Further fix lint issues

* Fixed http request helper's return type

Co-authored-by: ahsan-virani <ahsan.virani@gmail.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2021-09-21 19:38:24 +02:00
Omar AjoueandLuiz Eduardo de Oliveira Fonseca 7dcbaedea6 ✨ Add Mautic Campaings to Node Actions (#2164)
* added mautic campaings node actions

* Changed campaign contact term and fixed typos

Co-authored-by: Luiz Eduardo de Oliveira Fonseca <luizeof@gmail.com>
2021-09-03 18:30:29 +02:00
Omar AjoueandJan Oberhauser 1db0097ae3 ⚡ Add execution ID to queue processes for clarification (#2168)
* Add execution ID to queue processes for clarification

* ⚡ Display correct execution ID

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-09-02 18:58:13 +02:00
Omar Ajoue d17ab8e9e5 ⚡ Allow webhook processes to wake up waiting executions (#2153) 2021-08-31 11:55:06 +02:00
Omar Ajoue 5a97dbf4c5 ⚡ Fix canvas update on workflow duplication (#2119)
* Reverting some changes in the way the canvas is updated so that conext is not lost when duplicating a workflow

* Removed unnecessary if
2021-08-27 19:32:21 +02:00
Omar Ajoue 128e1b241b 🐛 Fix performance issue with credentials loading (#2130) 2021-08-26 13:45:15 +02:00
Omar Ajoue 9dca4d0f24 🐛 Drop temporary table if it exists before running full migration (#2114) 2021-08-23 10:25:57 +02:00
Omar Ajoueandlublak 199377e183 ⚡ Replace glob-promise with fast-glob (#2096)
Co-authored-by: lublak <lublak.de@gmail.com>
2021-08-20 23:48:02 +02:00
Omar AjoueandJan Oberhauser 7ce7285f7a ⚡ Load credentials from the database (#1741)
* Changes to types so that credentials can be always loaded from DB

This first commit changes all return types from the execute functions
and calls to get credentials to be async so we can use await.

This is a first step as previously credentials were loaded in memory and
always available. We will now be loading them from the DB which requires
turning the whole call chain async.

* Fix updated files

* Removed unnecessary credential loading to improve performance

* Fix typo

* ⚡ Fix issue

* Updated new nodes to load credentials async

* ⚡ Remove not needed comment

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-08-20 18:57:30 +02:00
Omar Ajoue 6bc3a20591 Merge pull request #2098 from n8n-io/fix-webhook-id-issue-duplicate
Updates webhook UUIDs to a new one when duplicating
2021-08-19 16:32:36 +02:00
Omar Ajoue 3b73cb6a56 Adjustments suggested by @mutdmour 2021-08-19 15:26:38 +02:00
Omar Ajoue 82dbbcd2e0 Changed the webhook id change code placement 2021-08-19 10:51:30 +02:00
Omar Ajoue 86fa3a6b9e Updates webhook UUIDs to a new one when duplicating 2021-08-18 16:25:05 +02:00
Omar Ajoue 63bc4097e0 ⚡ Automatically add trailing slash to webhook urls (#2076)
* Add trailing slash to webhook url if not present

Relates to community post https://community.n8n.io/t/problem-with-google-calendar-credentials/7232

We'll be adding a trailing slash as it's a requisite.

* Adding slash to all cases.
2021-08-12 11:22:44 +02:00
Omar Ajoue 47fbd5e762 ⚡ Allow usage of special characters on SES (#2068) 2021-08-10 14:51:58 +02:00
Omar Ajoue b8524bbfb7 Merge pull request #2052 from n8n-io/woocommerce-lint-and-tags-fix
Fixed linting and tags information
2021-08-04 18:44:17 +02:00
Omar Ajoue dd034f2143 Fixed linting and tags information 2021-08-04 18:38:48 +02:00
Omar Ajoue cc56b28538 Merge pull request #2014 from n8n-io/fix-spreadsheet-node
Fixed the spreadsheet nodes for saving dates
2021-07-21 15:25:18 +02:00
Omar Ajoue 873029438f Fixed the spreadysheet nodes for saving dates 2021-07-21 14:30:38 +02:00
Omar Ajoueanddali d6239d5bfb ⚡ Add full continue-on-fail support to all nodes (#1996)
* Update Compression node

* Update Crypto node

* Update DateTime node

* Update EditImage node

* Update EmailSend node

* Update ExecuteWorkflow node

* Update FTP node

* Update Function node

* Update FunctionItem node

* Update ExecuteCommand node

* Update OpenWeatherMap node

* Update ReadBinaryFile node

* Update ReadPdf node

* Update RssFeedRead node & add URL validation

* Update SpreadsheetFile node

* Update Switch node

* Update WriteBinaryFile node

* Update Xml node

* Update ActiveCampaign node

* Update Airtable node

* Update ApiTemplateIo node

* Update Asana node

* Update AwsLambda node

* Update AwsSns node

* Update AwsComprehend node

* Update AwsRekognition node

* Update AwsS3 node

* Fix Error item

* Update AwsSes node

* Update AwsSqs node

* Update Amqp node

* Update Bitly node

* Update Box node

* Update Brandfetch node

* Update CircleCi node

* Update Clearbit node

* Update ClickUp node

* Update Cockpit node

* Update CoinGecko node

* Update Contentful node

* Update ConvertKit node

* Update Cortex node

* Update CustomerIo node

* Update DeepL node

* Update Demio node

* Update Disqus node

* Update Drift node

* Update Dropbox node

* Update GetResponse node

* Refactor & Update Ghost node

* Update Github node

* Update Gitlab node

* Update GoogleAnalytics node

* Update GoogleBooks node

* Update GoogleCalendar node

* Update GoogleDrive node

* Update Gmail node

* Update GoogleSheets node

* Update GoogleSlides node

* Update GoogleTasks node

* Update Gotify node

* Update GraphQL node

* Update HackerNews node

* Update Harvest node

* Update HtmlExtract node

* Update Hubspot node

* Update Hunter node

* Update Intercom node

* Update Kafka node

* Refactor & update Line node

* Update LinkedIn node

* Update Mailchimp node

* Update Mandrill node

* Update Matrix node

* Update Mautic node

* Update Medium node

* Update MessageBird node

* Update Mindee node

* Update Mocean node

* Update MondayCom node

* Update MicrosoftExcel node

* Update MicrosoftOneDrive node

* Update MicrosoftOutlook node

* Update Affinity node

* Update Chargebee node

* Update Discourse node

* Update Freshdesk node

* Update YouTube node

* Update InvoiceNinja node

* Update MailerLite node

* Update Mailgun node

* Update Mailjet node

* Update Mattermost node

* Update Nasa node

* Update NextCloud node

* Update OpenThesaurus node

* Update Orbit node

* Update PagerDuty node

* Update PayPal node

* Update Peekalink node

* Update Phantombuster node

* Update PostHog node

* Update ProfitWell node

* Refactor & Update Pushbullet node

* Update QuickBooks node

* Update Raindrop node

* Update Reddit node

* Update Rocketchat node

* Update S3 node

* Update Salesforce node

* Update SendGrid node

* Update SentryIo node

* Update Shopify node

* Update Signl4 node

* Update Slack node

* Update Spontit node

* Update Spotify node

* Update Storyblok node

* Refactor & Update Strapi node

* Refactor & Update Strava node

* Update Taiga node

* Refactor & update Tapfiliate node

* Update Telegram node

* Update TheHive node

* Update Todoist node

* Update TravisCi node

* Update Trello node

* Update Twilio node

* Update Twist node

* Update Twitter node

* Update Uplead node

* Update UProc node

* Update Vero node

* Update Webflow node

* Update Wekan node

* Update Wordpress node

* Update Xero node

* Update Yourls node

* Update Zendesk node

* Update ZohoCrm node

* Refactor & Update Zoom node

* Update Zulip node

* Update Clockify node

* Update MongoDb node

* Update MySql node

* Update MicrosoftTeams node

* Update Stackby node

* Refactor Discourse node

* Support corner-case in Github node update

* Support corner-case in Gitlab node update

* Refactor & Update GoogleContacts node

* Refactor Mindee node

* Update Coda node

* Lint fixes

* Update Beeminder node

* Update Google Firebase RealtimeDatabase node

* Update HelpScout node

* Update Mailcheck node

* Update Paddle node

* Update Pipedrive node

* Update Pushover node

* Update Segment node

* Refactor & Update Vonage node

* Added new conditions to warnings on execute batch cmd

* Added keep only properties flag

* Fixed code for keep only props

* Added dependencies for image editing

Co-authored-by: dali <servfrdali@yahoo.fr>
2021-07-20 08:58:54 +02:00
Omar AjoueandJan Oberhauser d3da5023f0 🐛 Fix "unknown", never-end workflow and not displaying error message (#1978)
* Added try catch blocks to avoid endlessly running workflows

* Added handling for subworkflows

* ⚡ Fix one cause of "unkown" status of worklows with "main" mode

* ⚡ Fix one cause of "unkown" status of worklows with "own" mode

* ⚡ Fix one cause of "unkown" status of worklows with "queue" mode

* Saving database recovery

* 🐛 Fix issue that errors did not get saved correctly and also not
displayed

* ⚡ Save workflow timeout correctly as error

* Adding error capture to queued jobs

* ⚡ Mark canceled executions as not finished consistently across all
modes

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-07-10 11:34:41 +02:00
Omar AjoueandJan Oberhauser 8d235e94cb ⚡ Performance improvements for executions count on Postgres (#1888)
* Performance improvements for executions count on Postgres

As reported by a community member https://community.n8n.io/t/stress-load-testing/4846/5
and https://github.com/n8n-io/n8n/issues/1578, when using postgres with
a big volume of executions, the executions list's performance degrades.

This PR is aimed at Postgres specifically by querying postgres' stats
collector instead of running a full table scan, providing a good
estimate.

More can be read here: https://www.citusdata.com/blog/2016/10/12/count-performance/

* Removed order of magnitude so we display closer numbers

* Making count based on statistics only when not applying filters

* ⚡ Minor styling improvements

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-07-06 23:25:25 +02:00
1e551a202f 🚨 Add Workflow testing framework (#1814)
* Added flag to simplify output to execute command and created executeAll

Also created a command that lists workflows so it can be used by
other applications that wish to interact with n8n via CLI.

* Added compare funcionality that helps us identify possible breaking changes

* ⚡ Add JSON flag to output execution result in json format

* Add execution time to execution result

* Add --output flag to save JSON formated results

* Fix typos

* Adding usage examples and warning message

* Changing command to always output JSON information

* ⚡ Add concurrency to executeAll command

* ✨ Add IDs filter to executeAll command

* ✏️ Fix typos

* Fix lint issues

* Improvements to execute all

* Added colors and beautified execute all command output

* Improving premature termination of execute all command

* Refactored output

* Added detection for warnings instead of errors for a few cases

* Fixed linting

* Improved process finishing

* Added encryption key init, removed messages from non-debug run and created sample github actions file

* Updated test command to use correct encryption key

* Correcting paths

* Changed command name and changed concurrency to be slot based

* Added the retry functionality

* Improved typing and fixed executions filtering

* Updated test description

* Added concurrency

* Added skip list and concurrency

* Fixed termination behavior, removed unnecessary code and added main mode to executions

* Added special edge cases handling

* Added safe debug flag for non tty terminals

* Removed comparison and retries for testing

* Changed the way we run commands to add more debug info

* Test adding concurrency

* Testing with regular testing procedure without comparison

* Adding compare flag

* Fixing short output command

* Upgraded concurrency to 16, fixed short output and covered nodes count

* Fixed short output condition

* Correcting short output information

* Correcting the output for short output

* Added a string to possible warnings list

* Added example usages with more arguments

* Improvements to code made by Ivan

* Removed colorize output setting (always use colors), moved execution timeout to become static and removed node list from executions

* Moving types to a separate file on execute batch command

* Changed interfaces file extension to prevent oclif warnings

* Updated workflow pdf files

* ⚡ Change rule when tests run + minor formatting fixes

Co-authored-by: dali <servfrdali@yahoo.fr>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-07-01 09:04:24 +02:00
Omar AjoueandJan Oberhauser 427f25d3d0 ⚡ Add "Split Into Items" option to HTTP Request node (#1912)
* Added the option to flatten output so we can more easily work with arrays

* ⚡ Change parameter name

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-06-23 12:04:50 +02:00
Omar Ajoue 5cb1b4a678 ⚡ Update flag because of deprecation notice (#1909) 2021-06-20 11:00:25 +02:00
Omar AjoueandJan Oberhauser 4dbf64b1a4 🐛 Add Migration for MySQL to certify that we're using the correct collation (#1905)
* Migration for MySQL to certify that we're using the correct collation

* Update migration to check for collation existence before running

* ⚡ Fix format

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-06-18 23:57:58 +02:00
Omar Ajoue 44c3e97621 ⚡ Adding more log messages to error workflows (#1895) 2021-06-15 12:32:13 +02:00
Omar Ajoue 7ccc0f40a2 🐛 Correct paging parameter on Strava Node (#1804) 2021-05-20 02:47:55 +02:00
Omar Ajoue 481dbae16b 🐛 Fixing the limit for searching deals on hubspot (#1803) 2021-05-20 02:46:06 +02:00
Omar Ajoue 76e1b9fba0 🐛 Fix get profile operation on Slack Node (#1799) 2021-05-19 02:12:26 +02:00
Omar Ajoue 3e98612881 ✨ Add Force node reconnect option to IMAP trigger node (#1792)
* Adding reconnect feature to IMAP nodes

* Fixing clear interval and persisting last UID in static data
2021-05-16 02:33:15 +02:00
Omar Ajoue c739a498f1 🐛 Fix ordering when auto refreshing (#1761)
* Fix ordering when auto refreshing

* Fix ordering for current executinos as well
2021-05-12 10:51:54 -05:00
Omar AjoueandIván Ovejero 7bc79c879d 📝 Add database type and execution mode to issues template (#1762)
* Added database type and execution mode to issues template

* Bump n8n version suggestion

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

* Bump node.js version as suggested

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2021-05-11 23:13:39 -05:00
Omar Ajoue 0867c7bbfe 🐛 Fix issue with long credential names in MySQL (#1771) 2021-05-11 22:43:24 -05:00
Omar Ajoue 6ffc544888 ⚡ Add await statement to hooks (#1775) 2021-05-11 22:15:22 -05:00
Omar Ajoue cdbb3acd2d 🐛 Remove webhooks deregistration from webhook process (#1753) 2021-05-07 19:37:45 -05:00
Omar Ajoue d90acdf863 ⚡ Implement timeout for subworkflows (#1751) 2021-05-07 19:06:26 -05:00
Omar Ajoue fc3ebf1a4c ⚡ Adds increment operation to Redis (#1745) 2021-05-07 18:33:14 -05:00
c972f3dd50 ✨ Added logging to n8n (#1381)
* Added logging to n8n

This commit adds logging to n8n using the Winston library.

For now, this commit only allows logging to console (default behavior)
or file (need to pass in config via environment variables).

Other logging methods can be further implemented using hooks. These were
skipped for now as it would require adding more dependencies.

Logging level is notice by default, meaning no additional messages would
be displayed at the moment. Logging level can be set to info or debug as
well to enrich the generated logs.

The ILogger interface was added to the workflow project as it would make
it available for all other projects but the implementation was done on
the cli project.

* Lint fixes and logging level naming. Also fixed the way we use the logger as it was not working previously

* Improvements to logging framework

Using appropriate single quotes
Improving the way the logger is declared

* Improved naming for Log Types

* Removed logger global variable, replacing it by a proxy

* Add logging to CLI commands

* Remove unused GenericHelpers

* Changed back some messages to console instead of logger and added npm
shortcuts for worker and webhook

* Fix typos

* Adding basic file rotation to logs as suggested by @mutdmour

* Fixed linting issues

* Correcting comment to correctly reflect space usage

* Added settings for log files rotation

* Correcting config type from String to Number

* Changed default file settings to number

To reflect previous changes to the type

* Changed the way log messages are added to be called statically. Also minor naming improvements

* Applying latest corrections sent by @ivov

* ⚡ Some logging improvements

* Saving logs to a folder inside n8n home instead of root

* Fixed broken tests and linting

* Changed some log messages to improve formatting

* Adding quotes to names  on log messages

* Added execution and session IDs to logs. Also removed unnecessary line breaks

* ⚡ Added file caller to log messages (#1657)

This is done using callsites library which already existed
in the project as another library's dependency. So in fact
it does not add any new dependency.

* Adding logs to help debug Salesforce node

* ⚡ Add function name to logs and add more logs

* ⚡ Improve some error messages

* ⚡ Improve some more log messages

* ⚡ Rename logging env variables to match others

Co-authored-by: dali <servfrdali@yahoo.fr>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-05-01 22:43:01 -05:00
fc54f7c82b ✨ Add query parameters for CrateDB, PostgresDB, TimescaleDB and QuestDB (Parametrized Queries) (#1577)
* Adding support to ParameterizedQuery on Postgres Node

* Created another parameter to toggle on replacement so it's clear to users what is happening.

* Fixed lint issues

* ⚡ Formatting

* Improvements to questDB node so it is more consistent

* Fixed lint issues

* Fixed typing issue

* ⚡ Apply suggestions BHesseldieck

Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>

* Standardized output for postgres and postgres-like nodes

This changes the behavior of CrateDB, Postgres, QuestDB and TimescaleDB
nodes.

The Execute Query operation used to execute multiple queries but return
the result from only one of the queries.

This change causes the node output to containt results from all queries
that ran, making the behavior more consistent across all n8n.

* Fixing lint issues

* ⚡ Minor improvements

* ⚡ Fix breaking changes files

Co-authored-by: Gustavo Arjones <gustavo.arjones@ank.app>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
2021-04-30 17:35:34 -05:00
81d8a9f332 💥 Deprecate Activation Trigger and add two new replacement nodes (#1680)
* Add Workflow & n8n Trigger nodes

* Update nodes descriptions & icons

* Remove Activation Trigger node

* Update nodes descriptions & Add timestamp and workflow_id

* Added breaking change notice and types to events

* ⚡ Minor improvements

Co-authored-by: dali <servfrdali@yahoo.fr>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-24 23:14:06 +02:00
41669c0e0f ✨ Add options to run queries as transactions (#1612)
* add multi return

* add independently and transaction to query

* pgInsert normal and transaction

* independently for pgInsert

* normal, transaction and independently for pgUpdate

* cleanup

* implement it in other nodes

* multiple fixes

* add optional returning support

* clean up Postgres functions

* fix other postgres based dbs

* Added option to run queries as a transaction to Postgres

This commit allows users to configure Postgres, CrateDB, TimescaleDB and
QuestDB to run queries independently or as transactions as well as the
previous mode which is to execute multiple queries at once.

Previous behavior remains untouched so we only added new options.

* Standardize behavior across nodes that use postgres protocol

Also fixed unit tests.

* Added breaking change notice

* Added more information to breaking changes

* ⚡ Styling fixes

Co-authored-by: lublak <lublak.de@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-24 22:55:14 +02:00
Omar Ajoue 73da7998cf 🐛 Fix attempt to reconnect and make IMAP node stable (#1667) 2021-04-17 17:01:27 +02:00
Omar AjoueandJan Oberhauser 0c779de704 ⚡ Implement timeout for workers and corrected timeout for subworkflows (#1634)
* Implemented timeout for workers and corrected timeout for subworkflows

* Fixed issue with timeouts when running on separate processes

* Standardized timeouts across all n8n

Now the maxTimeout setting takes effect whenever a timeout is set
to any workflows.

This causes local timeouts (either set on a per-workflow basis or
via global settings) to be capped by the maximum timeout. This
behavior already existed but was not applied to all places.

Also changed the way n8n enforces timeouts for subworkflows, making
it work always.

In effect, with this change, if you have one workflow that calls others
only the main workflow's timeout is taken into consideration, limiting
the maximum time that other workflows combined can run.

* ⚡ Fix timeout problem in "own" mode

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-17 16:44:07 +02:00
Omar Ajoue 882e2f8e74 ⚡ Addglobal timeout setting for all http requests except for http request node (#1650)
* Added a global timeout setting for all http requests except for http
node.

The http node explicitly sets a timeout that overrides the default
value.

This is to prevent behaviors when users were expecting that their quests
could take a very long time to execute.

* Removed unnecessary typing from code
2021-04-17 15:15:33 +02:00
f225bbbb84 ✨ Add type casting to postgres queries (#1600)
* 538 add support for casting types in postgres

* Add typing to postgres insert nodes and removed unnecessary field from crate db

* Added placeholder and description for types in postgres

* Adding tests to insert and changes suggested by Ben

* ⚡ Minor improvement

Co-authored-by: mutdmour <mutdmour@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-03 16:53:47 +02:00
726a99bf69 ✨ Add Activation Trigger (#1570)
* ✨ n8n start trigger node

* first declaration of WorkflowActivationMode

* implement first WorkflowActivationMode: 'init', 'create', 'update', 'activate'

* fix Server missing id

* add activation infos to triggers

* remove WorkflowActivationMode from webhook execution function

* add some missing activation and add manual activation

* clean up and fix some code

* fix UnhandledPromiseRejectionWarning: Error: Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function!

* fix spaces

* use a better name for the node

* fix ident in package.json

* Contributions to lublak's PR #1287

* Fixed linting issues and change the way parameters are displayed

* ⚡ Fix name and minor improvements

Co-authored-by: lublak <lublak.de@gmail.com>
Co-authored-by: lublak <44057030+lublak@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-03-23 19:08:47 +01:00
Omar Ajoue dfeb531cc0 🐛 Fix concurrency issues with subworkflows (#1558) 2021-03-19 17:32:43 +01:00
Omar Ajoue 53a20dddce 🐛 Fix issue with subworkflows running on main process (#1557) 2021-03-19 15:18:35 +01:00
30d83d0bc2 ✨ Add DeepL Node (#1551)
* Created the node for DeepL translator tool

Still missing a few additional fields but functionality is ok for most cases.

* Added optional fields for Deepl and separated description to a separate file

* Fixed linting issue

* 🎨 Replace PNG with SVG icon

* 💄 Adjust style to codebase conventions

* 🔨 Refactor types

* ⚡ Simplify error handling

* ⚡ Add always open edit window for text field

* ✏️ Edit descriptions in text operations

* ⚡ Fix source language for English

EN-GB and EN-US are not supported as source languages, but EN is.

* 💄 Apply cosmetic changes

* ⚡ Small improvement

* ⚡ Remove not needed Authentication selection

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-03-18 23:34:15 +01:00
Omar Ajoue b879755f0b 🐛 Fix issues with subworkflows not finishing (#1553) 2021-03-18 23:24:57 +01:00
Omar Ajoue 8095c4a264 ⚡ Add debug information for pending workflows on exit (#1536) 2021-03-12 11:35:23 +01:00
Omar AjoueandJan Oberhauser d6d57c2df6 🐛 Fixed an issue with queue mode for executions that should not be saved (#1509)
* Fixed an issue with queue mode for executions that should not be saved

* ⚡ Minimal change

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-03-10 15:51:18 +01:00
Omar AjoueandJan Oberhauser 3d80129a28 🐛 Fix performance and crashes with latest updates (#1524)
* Removing unnecessary data from process communication

* Wrapping progress save in a try ... catch block to prevent crashes

* Migration to fix mysql problems with big data on executions

* ⚡ Minor formatting fixes

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-03-10 10:50:07 +01:00
Omar Ajoue 66a345ea94 🐛 Fix issue with auto refresh on execution list (#1475)
* Fix issue with auto refresh on execution list

When auto refresh is on, we used to get executions from backend using
the firstId field to filter recent executions.

This is a problem when you have executions that do not finish in order,
leaving gaps behind. This PR fixes this problem by refreshing the latest
30 executions and correctly adding them to the list.

* Fixed an issues with auto refresh on executions ExecutionsList

Fixed two bugs, one in frontend which was ignoring the first returned
row from the backend and an issue with backend that was not using
the overriden version of `executeWorkflow` function for sub sub
workflows.

* Fixed the display of manual executions when running with queues and improved display of subworkflows

* Changing workflow ids array from variable to constant

* Added unknown status to workflow execution and changed its color to orange
2021-03-03 08:31:55 +01:00
Omar Ajoue 3ff7d3af39 🐛 Fix naming and description of environment variable (#1458) 2021-03-01 21:21:16 +01:00
Omar Ajoue fc09e4c10e 🐛 Fix issue that manual executionscould not be stopped when running with queue (#1484) 2021-03-01 13:19:29 +01:00
Omar Ajoue 14329b2eb4 🐛 Fixed an issue with current executing workflows when using queues (#1483)
When running n8n in queue mode, the query to search for currently
running workflows would fail on Postgres but work fine with SQLite and
MySQL / MariaDB. This fix makes it work fine for all RDBMS.
2021-03-01 12:55:01 +01:00
Omar AjoueandJan Oberhauser 6ee9501d16 🐛 Fixing execution history for integrated workflows. (#1469)
* Fixing execution history for integrated workflows.

* ⚡ Minor improvements

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-02-20 13:51:06 +01:00
Omar Ajoue 91b715025d 🐛 Fix auto refresh on executions list (#1457) 2021-02-18 00:09:39 +01:00
Omar Ajoue bc66fab041 ⚡ Fix an issue with the regex that detects node names 2021-02-15 09:55:28 +01:00
Omar AjoueandJan Oberhauser e53efdd337 ✨ Separate webhooks from core (#1408)
* Unify execution ID across executions

* Fix indentation and improved comments

* WIP: saving data after each node execution

* Added on/off to save data after each step, saving initial data and retries working

* Fixing lint issues

* Fixing more lint issues

* ✨ Add bull to execute workflows

* 👕 Fix lint issue

* ⚡ Add graceful shutdown to worker

* ⚡ Add loading staticData to worker

* 👕 Fix lint issue

* ⚡ Fix import

* Changed tables metadata to add nullable to stoppedAt

* Reload database on migration run

* Fixed reloading database schema for sqlite by reconnecting and fixing postgres migration

* Added checks to Redis and exiting process if connection is unavailable

* Fixing error with new installations

* Fix issue with data not being sent back to browser on manual executions with defined destination

* Merging bull and unify execution id branch fixes

* Main process will now get execution success from database instead of redis

* Omit execution duration if execution did not stop

* Fix issue with execution list displaying inconsistant information information while a workflow is running

* Remove unused hooks to clarify for developers that these wont run in queue mode

* Added active pooling to help recover from Redis crashes

* Lint issues

* Changing default polling interval to 60 seconds

* Removed unnecessary attributes from bull job

* Added webhooks service and setting to disable webhooks from main process

* Fixed executions list when running with queues. Now we get the list of actively running workflows from bull.

* Add option to disable deregistration of webhooks on shutdown

* Rename WEBHOOK_TUNNEL_URL to WEBHOOK_URL keeping backwards compat.

* Added auto refresh to executions list

* Improvements to workflow stop process when running with queues

* Refactor queue system to use a singleton and avoid code duplication

* Improve comments and remove unnecessary commits

* Remove console.log from vue file

* Blocking webhook process to run without queues

* Handling execution stop graciously when possible

* Removing initialization of all workflows from webhook process

* Refactoring code to remove code duplication for job stop

* Improved execution list to be more fluid and less intrusive

* Fixing workflow name for current executions when auto updating

* ⚡ Right align autorefresh checkbox

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-02-09 23:32:40 +01:00
Omar AjoueandJan Oberhauser 7a3aaf8a24 ✨ Unify execution id + Queue system (#1340)
* Unify execution ID across executions

* Fix indentation and improved comments

* WIP: saving data after each node execution

* Added on/off to save data after each step, saving initial data and retries working

* Fixing lint issues

* Fixing more lint issues

* ✨ Add bull to execute workflows

* 👕 Fix lint issue

* ⚡ Add graceful shutdown to worker

* ⚡ Add loading staticData to worker

* 👕 Fix lint issue

* ⚡ Fix import

* Changed tables metadata to add nullable to stoppedAt

* Reload database on migration run

* Fixed reloading database schema for sqlite by reconnecting and fixing postgres migration

* Added checks to Redis and exiting process if connection is unavailable

* Fixing error with new installations

* Fix issue with data not being sent back to browser on manual executions with defined destination

* Merging bull and unify execution id branch fixes

* Main process will now get execution success from database instead of redis

* Omit execution duration if execution did not stop

* Fix issue with execution list displaying inconsistant information information while a workflow is running

* Remove unused hooks to clarify for developers that these wont run in queue mode

* Added active pooling to help recover from Redis crashes

* Lint issues

* Changing default polling interval to 60 seconds

* Removed unnecessary attributes from bull job

* ⚡ Improved output on worker job start

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-02-09 08:59:32 +01:00
Omar AjoueandJan Oberhauser 0d273ca854 ✨ Add delete tweet operation for Twitter node (#1368)
* Add delete tweet operation for Twitter node

* ⚡ Minior improvement on Twitter-Node

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-02-06 16:08:47 +01:00
Omar AjoueandJan Oberhauser cd7ed7db47 ✨ Add CLI export/import for credentials/workflows (#1363)
* Added options to import and export workflows and credentials

* Fixed linting issues and descriptions

* Linting issues and allowing import/export operations to output multiple files

* ⚡ Minor changes to CLI export/import

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-01-20 23:51:49 +01:00
Omar Ajoue 5a6b191688 🐛 Fix AWS lambda and SNS problem with signature (#1361) 2021-01-20 12:23:32 +01:00
Omar Ajoue e5bbf7144f ⚡ Typeform Trigger translates double curly brackets square brackets (#1316) 2021-01-14 17:32:20 +01:00
Omar AjoueandJan Oberhauser 143c8bd326 ⚡ Allow Gmail node to send messages formatted as HTML (#1285)
* Allowing Gmail node to send messages formatted as HTML

* Improving message field description

* Fixing lint issues

* Adding missing trailing comma

* ⚡ Small improvements to GMail-Node

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-01-07 11:58:28 +01:00
Omar Ajoue 9c479abc35 🐛 Fixed batch sizing to work when batchSize = 1 (#1314) 2021-01-07 07:53:48 +01:00
Omar Ajoue ba8ea6c0f5 Removing console.log message 2021-01-06 13:01:56 +01:00
Omar Ajoue 04a8912a94 Changed vacuum operation to run on startup only. Also it is now off by default. 2021-01-04 09:30:02 +01:00
Omar Ajoue d528e442ba Run vacuum on sqlite periodically 2020-12-31 10:42:16 +01:00
Omar Ajoue 71bf9cb9c0 ⚡ Increase timeout to IMAP node. (#1178)
Yahoo mail is unable to provide a response in under 3 seconds. Increasing
this limit to 10 seconds seems to solve the timeout issue.

I was unable to properly login to Yahoo but at least the timeout error
is not happening anymore.

Setting the node to work with Gmail worked fine although it is a
somewhat painful process as Gmail avoids the so called non secure apps.
2020-11-18 14:41:18 +01:00
Omar Ajoue 3650d3b3bf 🐛 Fixing issue with Gmail subject enconding (#1121)
Reported by community user huuich (https://community.n8n.io/t/gmail-integration-partly-created/693/12?u=jan)

An attempt to fix the problem using basic JS functions (escape / unescape
/ encoding / decoding) did not work, so I decided to use MailComposer
as suggested by Jan on Jira Issue PROD-575
2020-11-02 22:47:47 +01:00
Omar Ajoue 26de4a86c9 ⚡ Adding throttle to http request node (#1095)
Works by setting a timeout between each batch of requests.
Batch size and interval are configurable.
2020-10-26 13:27:12 +01:00
Omar Ajoue 37f787d7b2 ✨ Load node properties on demand (#1089)
* ⚡ Changed rest api endpoint to omit node properties by default.
⚡ Created another endpoint to return all node information based on a list of names

* refactor: changed endpoint to POST instead of GET

* Changed properties to be optional for node description

* Removed eager loading for node properties.

All nodes will have their properties fetched when used in a workflow.
Works when opening an already saved workflow, creating a new one from
scratch or pasting JSON / URLs.

* Removing unnecessary dependency
2020-10-22 17:24:35 +02:00