Start with something familiar
Imagine your app needs to give a customer a receipt. You already have the words and numbers; now you need a PDF they can download. That is a good first task for LongRun.
We’ll use it to learn the process together. By the end of the first lesson, you’ll have sent a request and opened the PDF it produced. You don’t need to build a workflow first.
One task? Start with a direct action
Think of an action as a tool you pick for a particular job. HTML to PDF turns HTML into a document. Resize Image changes an image’s dimensions. Merge PDFs joins documents together.
Calling one of these tools directly is a direct action. You choose the action, give it the inputs it needs, and ask LongRun to run it. We’ll choose HTML to PDF for our first lesson because we can type the input ourselves—there’s no file to prepare or upload.
When your process grows, use a workflow
Later, you might want to extract pages from several PDFs and put the results into a ZIP file. Now you have a sequence of tasks, with one step feeding the next. That is where a workflow helps.
You build that sequence once in the visual editor. Your app can then call it again with different files. In the workflow lesson, we’ll first learn how to pass an input into a step and return its result.
When the design stays the same, use a template
Suppose every receipt should have the same layout, but a different customer name. You can create that layout as a template and leave a place for customer_name.
Send Ada as the value, and the receipt shows Ada. Send Sam next time, and the same design shows Sam. The template lesson walks through placing that field and previewing the finished document.
Let’s make your first PDF
One last word you’ll see often: run. A run is one attempt to do the work you requested. LongRun gives it an ID so you can ask, “Is this one finished yet?”
You now have enough context to begin. Open Run your first action below. We’ll create your key, send a small piece of HTML, and follow that run all the way to a downloaded PDF.