Post

4 followers Follow
0
Avatar

Attaching files to an e-mail send via a work flow

Hi,

How can I attached files that were uploaded to work items in an e-mail send via a work flow. (I can do in a custom action that upload the files but not in a WF that run on a work item where the files already exist.).

Thanks,

Matti

Thanks,

Matti

Matti Herzberg Answered

Please sign in to leave a comment.

11 comments

0
Avatar

Matti,

Can you please provide the use case? This should be attainable by calling the file. The file will need to be uploaded into Clarizen and you can use File ID to pull the correct file, especially if the workflow will pull the same file every time. If you need to choose the file, it will have to be a Custom Action, not workflow rule.

Boris Krutiy 0 votes
Comment actions Permalink
0
Avatar

Hi Matti,

You can't attach files to the outgoing emails. However you can do one of the following:
1. Use discussion post and put the file as a related entity.
2. Use email but use GetFileUrl on the file.
3. Use email but use GetObjectViewUrl and share the file as a widget (I would suggest to create a clean file object details view with no panel like discussions...)

Please let me know if it makes sense.

Regards,
Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

Hi Tamir

We've been in dialogue about your point 3 before in a similar use case.

Just letting you - and Matti know that this does not work. I had a case for this for 8 months and Product has now(!) come back and said it's not a bug that you cannot limit related fields in customizations - so this will not work.

Peter Fjelsten 0 votes
Comment actions Permalink
0
Avatar

Hi Peter,

In order to limit the relation you'll have to create a different profile and remove relations on files. Then create the view accordingly. This method works and had been rolled out to customers.

Let me know if it makes sense.

Regards,
Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

So you would specify a view and a profile in the customization? If true, that might be a work-around.

Peter Fjelsten 0 votes
Comment actions Permalink
0
Avatar

Peter,

Please try and let me know if that works out for you.

Good luck!
Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

Hi,

  1. The GetFileUrl function does not work in a WF only in CA.
  2. Here is what I did: 2.1 When the files are uploaded (custom Action) I save their ID and names. 2.2 I use the GetObjectViewUrl with the file ID to attach it to an e-mail and it works. The only issue is that I created 2 custom fields to save the file id and name.

Thanks,

Matti

Matti Herzberg 0 votes
Comment actions Permalink
0
Avatar

Hi Matti,

Based on what I see that function is available in the context of a WR.
Can you please check again?

Thanks,
Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

Hi Tamir,

It works! Thanks!

(Although not for me as I am and admin user - and profiles don't really work for admins as reported in Request 18136)

Peter Fjelsten 0 votes
Comment actions Permalink
0
Avatar

Tamir, the rule you helped me set up works if the file is not already linked to the object the mails is to be tracked on.

In most of our cases, the workflow is that files are attached/linked on the object and then the message needs to be sent out. How can I make it work in that case?

The current CA for your reference (abbreviated):

(File, Attachment1, is selected in user panel)

Conditional action
If true = Attachment1<>NULL && GetLink('AttachmentLink',CurrentObject(),Attachment1)=NULL
New Attachment
$Entity* = CurrentObject()
$Document = Attachment1

And except from the mail
"See shared files at the links below:
{Catch(HyperLink(GetObjectViewUrl(NewObject1.Document,'e01f71cc-950d-4b34-a010-613bcc3afdad',null,true),NewObject1.Document.Name),'')}"

I tried setting Ignore if already exists on the Attachment but naturally then it does not work since this is the NewObject1 we're using in the link to the file to add to the mail.

Do you have any suggestions?

Peter Fjelsten 0 votes
Comment actions Permalink
0
Avatar

(OK, I can see my nice formatting was eaten by Zendesk :-( )

Peter Fjelsten 0 votes
Comment actions Permalink