How to send a Gravity PDF in a WhatsApp message from Gravity Forms

When someone submits a Gravity Forms form, Gravity Notifications can send them a WhatsApp message with the PDF that Gravity PDF creates for that entry, such as an invoice, a receipt or a booking confirmation. This guide shows how to set it up.

What you need

PDF attachments work with Kapso and the Meta WhatsApp Cloud API. They aren’t available when you send WhatsApp messages through Twilio.

Step 1: Create a WhatsApp template with a document header

WhatsApp sends files in a template’s header, so the template needs a document header. In WhatsApp Manager (or your Kapso dashboard), create a new message template and choose Document as the header type. Write the body as usual, with variables if you need them, and submit the template for approval.

WhatsApp template with Document chosen as the header type

Step 2: Add a PDF to your form in Gravity PDF

Open your form and go to Settings > PDF. Add a new PDF (or use an existing one), choose its template and settings, and save it. Make sure the PDF is active.

Gravity PDF feed in the form's PDF settings

If the form has more than one active PDF, the first one that applies to the entry is sent.

Step 3: Add [gravitypdf] to the WhatsApp feed

In the same form’s settings, open the WhatsApp feeds and add a new feed (or edit one). Choose the recipient and the template from step 1. In Media file URL, enter [gravitypdf], then save the feed.

WhatsApp notification feed with [gravitypdf] in the Media file URL setting

When the feed runs, Gravity Notifications creates the PDF for the entry and attaches it to the message.

Step 4: Test it

Submit the form on the front end with your own WhatsApp number. You should get the WhatsApp message with the PDF attached as a document.

Troubleshooting

  • The message arrives without the PDF: check that the PDF is active in Settings > PDF and that its conditional logic matches the entry.
  • The message isn’t sent: check that the template is approved and its header type is Document.
  • You use Twilio for WhatsApp: PDF attachments need Kapso or the Meta WhatsApp Cloud API.

Still stuck? Open a support request and we’ll help.