Something I don't understand here.

I wish to send an email on node publication. So - I went in and added the advanced action "Send e-mail".

All well and good - can add the address, form the body etc.

But - under triggers - I can't see how to add that for publication. I could add it to "Trigger: After saving a new post" - but - that sends the mail even if the publication flag was unchecked.

I'm sure that this is something I'm just not understanding on how to actually use it - so any hints on that welcome :)

Comments

hillaryneaf’s picture

It would most likely be used with workflow module in conjunction with actions. So when the user moves an article from a workflow state of something like "reviewed" to "published" it would send the email.

chrissearle’s picture

OK - I'll have a look at that - thanks.

Am also wondering if it is possible to have different "on publication send" triggers for different taxonomy terms (nodes with the term rather than adding of terms).

Will grab the workflow module and have a play.

chrissearle’s picture

OK. Installed workflow.

Created an e-mail action for sending email

Created a workflow that has two states - unsent and sent and configured the transitions.

Click on actions to add actions to the workflow - the e-mail action is not available on the add workflow actions tab - only on the content actions tab. The only action I can assign to a transition on the workflow actions tab is "Change workflow state of post to next state".

Why can't I assign the send e-mail action?

chrissearle’s picture

Note: Ignore this comment - as I hit submit I suddenly worked it out (use extra states - one for each option) :)

And a last follow up (although this may be more a q for the workflow team)

I can't see that I can add two workflows to the same node type - so how can I give the author the choice of e-post action 1 or 2 (some posts are for a restricted group - some for all) ?

chrissearle’s picture

Re #3 - seems like this is fixed by installing the triggerunlock module.

jvandyk’s picture

Currently there can be only one workflow per node type. I hope to change that in the future. See http://drupal.org/node/80703

chrissearle’s picture

OK - useful. Shout if you need testers :)

nath’s picture

So, can this be marked closed, as there isn't really anything to do?

chrissearle’s picture

That's a good question. I've been very busy with an update of a 4.7 to 6.4 install the last few days. I have an LDAP upgrade going this week but I'll need to look again at this. I know I didn't get to where I wanted to be - but I'm not sure if this becomes a feature req for two workflows per node type or what right now.

chrissearle’s picture

Status: Active » Closed (fixed)

I've had time to look at this now.

I've got a working workaround - where the user can choose in the add/edit form to move to the send e-post state. So - its manual rather than triggered by the node moving from not-published to published.

However - since we now offer them two choices (send to all, send to admin list) - this is probably better.

I'd still like to know if its possible to trigger of change of publication state - but for now - I think this can be closed.