Email Stripe receipt?

Lars

Member
Consent to Access & Modify
I authorize Pabbly Support to log in to my account and make changes to the specified workflow for troubleshooting.
I've started using Stripe and would like to configure a workflow to
  1. Trigger whenever a successful payment has happened i Stripe
  2. Retrieve the associated receipt
  3. Convert it to PDF (do I need a paid service for this?
  4. Email it to my accounting system's inbox
Trigger is straightforward. How to retrieve the receipt is not clear. Also which PDF conversion to use (hopefully free).

Thanks,
Lars.
 

ArshilAhmad

Well-known member
Staff member
Hi @Lars,

If you are collecting payments through invoices, use “Stripe: Invoice Payment Succeeded”as your trigger step and check if it provides the invoice as a PDF directly in the trigger step. This will not require any conversion tools, thus no paid service needed.

1771528522942.png



==================================================================

If you are not collecting payments through invoices but via a checkout page, try using the “Stripe: New Charge” trigger event instead. This should provide the receipt in the trigger step, but not in PDF format. For converting it to a PDF, you would need a paid application such as CloudConvert, PDF.co etc.



Thanks & Regards,
Arshil Ahmad
Customer Support Associate
🌐 Pabbly.com
👉Rate your support
 

Lars

Member
Ok, thanks, got the transaction to trigger PC correctly now. And the receipt is supplied as a URL. I need to create an attachment, preferably PDF, from that URL and attach it to a SMTP email. Best way?
 

Preeti Paryani

Well-known member
Staff member
Hi @Lars,

Thanks for sharing the workflow.

Since Stripe provides the receipt as a URL, you can generate a PDF attachment in either of these ways:

Option 1: PDF.co
  • Use Convert URL to PDF
  • Map the receipt URL
  • It returns a PDF file URL
  • Use that in your SMTP attachment

1771834977361.png


Option 2: Google Drive
  • Use Google Drive – Upload a File (map the receipt URL)
  • It returns a File ID
  • Then use Share a File With Anyone
  • You’ll get a public PDF link
  • Use that as the email attachment
1771834982754.png


Let us know if you need help with field mapping.
 

Lars

Member
Thanks. I'm looking for a free solution so now testing the Google Drive option. The uploaded file is stored and displayed as HTML, see image.

Also, The Share a File with Anyone action doesn't allow me to map varaiables from previous step, so how do I ensure that it's the currently uploaded file that is shared?

1771835795362.png
 

Preeti Paryani

Well-known member
Staff member
Hi @Lars,

Yes, what you're seeing is expected. Stripe’s receipt URL returns an HTML page, so when you upload it to Google Drive, it is stored as HTML — not as a PDF. Google Drive does not convert web pages into PDF automatically.

If you specifically need the file as a PDF attachment, you will need a URL-to-PDF conversion service such as:
  • PDF.co (1 month free trial)
  • CloudConvert (forever free - 10 conversions per day)

You can look for any free URL-to-PDF service that provides API access. If they have API documentation, you can use API by Pabbly to connect it.

At the moment, without a conversion service, there isn’t a completely free direct way inside Pabbly to convert that Stripe receipt URL into a PDF.
 

Lars

Member
Thanks for your patience :) I've added CloudConvert now and the Convert A File action so that it retrieves the HMTL file from Google Drive and then converts it to PDF. No error messages so far. What I can't find is where the new file is stored. Do you know how to retrieve it? I followed the instructions in the Cloudconvert action to retrieve the job details of the conversion, and there's no location field, only the file name I supplied in the conversion step.
 

Preeti Paryani

Well-known member
Staff member
Hi @Lars,

If you’re using CloudConvert in your workflow, you do not need the Google Drive steps.

You can directly map the HTML receipt URL from the trigger into the CloudConvert action. CloudConvert will handle the conversion and return a PDF file URL, which you can then use further (for example, as an email attachment).

We’ve deleted the unnecessary Google Drive action in the example and highlighted the field where the PDF URL is returned. Please refer to the attached image for clarity.

1771848502350.png
 

Lars

Member
Excelllent, thanks! So, final challenge: How do I attach this PDF as an actual file attachment, not just a link, in an email. Looking at your SMTP action, attachments need to be valid files, not just URL's like what CloudConvert is supplying. I tried the Google Drive approach again but don't know how to convert the file ID into a valid filename with a full path.
 

Lars

Member
Just one last question: the last uploader step means I've uploaded a file to your storage. Will it automatically be purged after a set time or how do I delete it?
 
Top