Is there a workaround for “numCards” parameter where based on input from a Jotform, a PDF that’s number of pages is based on jotform data/boxes checked/content of entry. For instance for a submission for a SOP generator 50 cards might be too much, but not enough for someone else
Hey! Max here, Technical Support API Engineer at Gamma. How numCards and cardSplit work: numCards is optional, but if you leave it out it defaults to 10. When cardSplit is set to "auto" (also the default), Gamma distributes your content across that number of cards. The density adjusts based on how much content you send. More content = denser cards. Less content = sparser cards. So you can either stick with the default 10 cards, set a specific number that makes sense for your use case, or pass different values dynamically based on your form data. On PDF input: You can't pass PDF files directly to the API. The inputText parameter only accepts text strings. If PDFs are involved in your workflow, you'd need to extract the text from them first. Can you help me understand your setup better? What platform are you using? Zapier, Make, N8N, custom code? What's your Jotform collecting? And how does that connect to generating the SOPs? Are you generating one presentation per form submission, or something else? Just want to make sure I understand what you're building before pointing you in a specific direction.
I guess Document is what I meant not PDF, using N8N. The jotform is collecting input from doctors to organize their protocols / SOPs for them within their practice and generating a protocol book to be used by them and nurses and/or paramedics that work under them for them to follow. Therefore the number of pages I would need generated in each submission is going to be variable. Max J.
Vincent B. Got it, that makes sense. Building protocol books for medical practices in N8N. The reality: There's no fully automatic card count determination in the API. The numCards parameter will always use a specific integer (defaults to 10 if you leave it out, max is 60 for Pro or 75 for Ultra). When you use cardSplit: "auto", Gamma distributes content across that fixed number of cards with variable density per card. For your variable length protocols: You could add some logic in your N8N workflow before the Gamma API call to calculate an appropriate numCards value based on the Jotform submission. Building that calculation logic is outside our support scope since it's part of your workflow implementation, but the approach would work well for what you're describing. Resources for building that N8N logic: N8N Code node docs N8N expressions guide Our API parameter reference: https://developers.gamma.app/docs/how-does-the-generations-api-work We're here for any questions about the Gamma API side of things.
.png)