Can Fillout Be Used to Complete Multiple Documents and Submit Them to Pipedream for Merging before Signing with Signow?

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

Is it possible to use Fillout to fill out detail for 1 of the document in Fillout and then submit another document in the same fillout and then submit into Pipedream to merge both document and send to Signow to sign?

To achieve the workflow you described, you can use Pipedream to integrate Fillout and SignNow. Here’s a step-by-step guide on how you can set this up: 1. Trigger the Workflow with Fillout: Use a Fillout form submission as the trigger for your Pipedream workflow. This will capture the details from the first document. 2. Submit Another Document in Fillout: If you need to submit another document, you can create another Fillout form or use the same form with additional fields. Ensure that the data from both documents are captured. 3. Merge Documents in Pipedream: Once you have the data from both documents, you can use a code step in Pipedream to merge the data. This might involve combining the data into a single object or formatting it as needed for SignNow. 4. Send to SignNow for Signing: Use the SignNow API to send the merged document for signing. You can create a Pipedream action that interacts with SignNow to upload the document and initiate the signing process. ### Example Pipedream Component for Fillout Here’s an example of how you might set up a Pipedream component to interact with Fillout: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { fillout: { type: “app”, app: “fillout”, }, }, async run({ steps, $ }) { // Example request to get forms from Fillout const response = await axios($, { url: https://api.fillout.com/v1/api/forms, headers: { Authorization: Bearer ${this.fillout.$auth.oauth_access_token}, }, }); return response; }, });

What the code for Merge Documents in Pipedream: Once you have the data from both documents, you can use a code step in Pipedream to merge the data. This might involve combining the data into a single object or formatting it as needed for SignNow.

To merge documents in Pipedream, you can use a code step to combine data from multiple sources into a single object or format it as needed. Below is an example of how you might achieve this using a Node.js code step in Pipedream: export default defineComponent({ async run({ steps, $ }) { // Assume you have data from two documents in steps.doc1 and steps.doc2 const doc1Data = steps.doc1.data; const doc2Data = steps.doc2.data; // Merge the data from both documents const mergedData = { ...doc1Data, ...doc2Data, }; // Format the merged data as needed for SignNow // For example, you might convert it to a specific JSON structure const formattedData = JSON.stringify(mergedData, null, 2); // Return the formatted data return formattedData; }, }); ### Explanation: 1. Data Retrieval: The example assumes that you have already retrieved data from two documents and stored them in steps.doc1.data and steps.doc2.data. 2. Data Merging: The mergedData object is created by combining the data from both documents using the spread operator (...). 3. Data Formatting: The merged data is formatted as a JSON string. You can adjust this step to format the data as needed for SignNow or any other application. 4. Return Statement: The formatted data is returned, which can then be used in subsequent steps of your Pipedream workflow. You can modify this code to fit the specific structure of your documents and the requirements of the application you are integrating with, such as SignNow.