Jump to content
miguelccarvalho

Passing variables to Clipboard in Workflow

Recommended Posts

Hi,

 

I'm trying to pass some variables in a workflow. The set-up of the workflow is as follows:

 

Screen Shot 2017-01-10 at 15.02.10.png

 

Where the script is 

 

from datetime import date
from datetime import timedelta
import json

today = date.today()
offset = (today.weekday() - 2) % 7
last_wednesday = today - timedelta(days=offset)

d = {'alfredworkflow': 
		{'variables':
    			{'last_wednesday': last_wednesday.strftime('%Y-%m-%d')
			}
		}
	}

print json.dumps(d)

And the copy to clipboard part is:

 

SET @startdate = {var:last_wednesday};

SELECT ...

The issue is the {var:last_wednesday} part is coming up empty and I don't understand why as I've modelled this after another functioning workflow. When pasting I only get

 

SET @startdate = ;

 

Does anyone know where the error is?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...