Why is the 'download_attachment' step in the Gmail developer app exceeding the payload limit despite the file size being within limit?

This topic was automatically generated from Slack. You can find the original thread here.

Hi Pipedream team!

I’m having a problem with the Gmail developer app - the ‘download_attachment’ step - keeps exceeding the payload limit - but I believe the file size limit should be 25meg - I tried a few things - including running this step in an isolated worflow triggered by a webhook - I’m I’m kind of lost.

  • any ideas? I don’t understand why the file itself should be console-logging or ending up as a step export

You should visit Pricing - Pipedream for the latest pricing, but I’ll do my best to answer. It sounds like you’re encountering the Function Payload Limit Exceeded error. This error can occur when the total size of console.log() statements, step exports, and the original event data sent to workflows and sources exceeds a combined size limit. Here are a few steps you can take to address this issue: 1. Avoid Large Step Exports: Instead of passing large data between steps using step exports, you can write the data to the /tmp directory in one step and read the data into another step. This avoids the use of step exports and should keep you under the payload limit. 2. Use the Large File Upload Interface: Pipedream supports uploading data up to 5TB using the large file upload interface. You can send large HTTP payloads by passing the pipedream_upload_body=1 query string or an x-pd-upload-body: 1 HTTP header in your HTTP request. Read more here. 3. Sending Large Emails: If you’re dealing with large emails, you can send emails up to 30MB in size by sending emails to [YOUR EMAIL ENDPOINT]@upload.pipedream.net. Emails delivered to this address are uploaded to a private URL you have access to within your workflow, at the variable steps.trigger.event.mail.content_url. You can download and parse the email within your workflow using that URL. This content contains the raw email, and you must parse this email on your own. Here’s an example of how you can write and read data to/from the /tmp directory: Writing a file to /tmp: import { promises as fs } from 'fs'; export default defineComponent({ async run({ steps, $ }) { const data = "Your large data here"; const filePath = '/tmp/large_data.txt'; await fs.writeFile(filePath, data); return { filePath }; } }); Reading a file from /tmp: ``` import { promises as fs } from ‘fs’; export default defineComponent({ async run({ steps, $ }) { const filePath =

Hey , could you share the screenshots of your error & workflow if possible?