4

I am having trouble using CiviRules to send PDFs automatically using PDF API for CiviCR. Namely, when I create condition and I need to add action Send PDF there is to email parameter. I want this to be created dynamically like send Email action picks up email from contact automatically.

When I leave it blank the email doesn't go through.

[info] Civirules api action exception: Mandatory key(s) missing from params array: to_email. API call: Pdf.create with params: to_email="", template_id="74", contact_id="752"

I can't insert a token into that field. So, am I missing something obvious or is this functionality intended for a totally different purpose?

  • Since this question is about an extension, you may want to communicate with the extension authors by creating an issue at github.com/CiviCooP/org.civicoop.pdfapi/issues – Noah Miller Sep 26 '18 at 21:54
  • I hoped to do some coding and make a PR myself, but I never seem to have the time to do that. I should create an issue either way. Thanks for the suggestion, Noah! – Marko Sep 27 '18 at 7:44
3

I ended up hardcoding it so it uses $contact['email'] instead of $params['to_email']

I am leaving it open for some time, if anybody has a better idea (or if I missed something obvious)

UPDATE:

The developers of the extension included this feature. Using version 2.0 the PDF will be emailed to the associated contact if the to email field is left empty. So no need for hacks anymore. Big thanks to ErikH - CiviCooP

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.