mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
- Modified the n8n import script to enhance functionality. - Added multiple new workflow JSON files for various AI applications, including automated email responses, sentiment analysis, and social media management. - Updated existing workflows to improve performance and integration with AI tools.
23 lines
759 B
Bash
23 lines
759 B
Bash
#!/bin/sh
|
|
|
|
# Exit immediately if RUN_N8N_IMPORT is not set to true
|
|
if [ "$RUN_N8N_IMPORT" != "true" ]; then
|
|
echo 'Skipping n8n import based on RUN_N8N_IMPORT environment variable.'
|
|
exit 0
|
|
fi
|
|
|
|
set -e
|
|
|
|
echo 'Importing credentials...'
|
|
find /backup/credentials -maxdepth 1 -type f -not -name '.gitkeep' -print -exec sh -c '
|
|
echo "Attempting to import credential file: $1";
|
|
n8n import:credentials --input="$1" || echo "Error importing credential file: $1"
|
|
' sh {} \;
|
|
|
|
echo 'Importing workflows...'
|
|
find /backup/workflows -maxdepth 1 -type f -not -name '.gitkeep' -print -exec sh -c '
|
|
echo "Attempting to import workflow file: $1";
|
|
n8n import:workflow --input="$1" || echo "Error importing workflow file: $1"
|
|
' sh {} \;
|
|
|
|
echo 'Import process finished.' |