Files
n8n-install/n8n/n8n_import_script.sh
Yury Kossakovsky 532c5f0584 Update n8n import script and workflows
- 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.
2025-05-05 13:56:16 -06:00

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.'