← All N8N workflows
Messaging & emailIfMergeSchedule TriggerSpotifySwitch

send email via gmail on workflow error

Configured with Schedule Trigger, Spotify, Switch. Review the connections and setup before adapting this template.

Workflow preview
TriggerCRONSchedule TriggerFiles / mediaGet User's PlaylistsSpotifyRoutingSwitchSwitchFiles / mediaGet Discover TracksSpotifyFiles / mediaGet Archive TracksSpotifyTransformMergeMergeRoutingCheck if tracks to addis NOT emptyIfFiles / mediaAdd tracks to ArchiveplaylistSpotify

Node categories in this workflow

  • Trigger
  • Files / media
  • Routing
  • Transform

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
CRONTriggerSchedule TriggerSee node parameters
Get User's PlaylistsFiles / mediaSpotifyplaylist / getUserPlaylists
SwitchRoutingSwitchSee node parameters
Get Discover TracksFiles / mediaSpotifyplaylist / getTracks
Get Archive TracksFiles / mediaSpotifyplaylist / getTracks
MergeTransformMergeSee node parameters
Check if tracks to add is NOT emptyRoutingIfSee node parameters
Add tracks to Archive playlistFiles / mediaSpotifyplaylist

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • spotifyOAuth2Api

Workflow notes

CRON

Every Monday @ 8:30am

Switch

Find Discover and Archive playlist by name

Purpose

Purpose

Compares tracks using Combine operation to output non-matching Discover Weekly tracks to ensure that duplicates are not appended to the Archive playlist

Do anything else here

Do anything else here

For example, in my personal workflow, after the tracks have been added to to my Archive playlist, I send a POST request to my self-hosted NTFY server to notify me that my Discover Weekly playlist has refreshed, and I also provide the links to easily open the playlists within the notification that is sent.

The possibilities are endless with n8n!

README

README

This workflow will automatically archive your Spotify Discover Weekly playlist to a separate playlist. One additional caveat this workflow addresses is it will compare the refreshed Discover Weekly tracks against your archive playlist's existing tracks to ensure only unique tracks are added to your archive playlist. This helps reduce clutter within the archive playlist.

Setup Instructions (Required)

  1. Within your Spotify account, create a new playlist You may name this playlist whatever you like. The default name within the workflow is Discover Weekly Archive. If you decide on another name, ensure you update the Switch node output with the key of arch to the name of the playlist you set.

  2. Create your Spotify credential(s) and update each Spotify node with your created credential Follow the instructions within the n8n docs to create your Spotify credential, then select the credential in the Get User's Playlists, Get Discover Tracks, Get Archive Tracks, and Add tracks to Archive playlist nodes.

  3. Activate the workflow to run workflow based on the Cron expression set in the Schedule trigger node.

Optional Setup

  • Update the Cron expression within the Schedule trigger node with an earlier or later time if your GENERIC_TIMEZONE is set. You may also consider setting the workflow timezone as well. For assistance with Cron expressions, refer to the n8n docs.
  • Add nodes to the end of the workflow to send notifications, update a spreadsheet, or any other operation/action you'd like to perform in conjunction with archiving your Discover Weekly tracks
  • Setup a error workflow to handle any thing that goes wrong within the workflow. You can find an example here or more information concerning handling errors within the n8n docs.
send email via gmail on workflow error

send email via gmail on workflow error

Purpose and structure

This folder contains the send email via gmail on workflow error workflow. Its executable nodes use if, merge, scheduleTrigger, spotify, switch. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

CRON

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Schedule/0382_Schedule_Spotify_Create_Scheduled.json MIT; preserve source notices.

More in Messaging & email