Kintone allows you to set up custom workflows and data management for businesses and non-profits in one place. In this example, we will go through how to automatically generate an invoice from data in Kintone and email it to your customer via Formstack Documents.
Step 1. Create document template
Choose from one of our many document template options that are outlined here. For this example, we've created a template using our drag and drop builder.
Step 2. Customize settings in Formstack Documents
After you've saved your new template, you’re going to be taken to the Settings tab where you can modify various options like the type of file that you want to generate and the name of the file. For this example, we've chosen to generate a PDF document and include the date and time in the file name.
Optionally: If you want to test this out before going into production, you can turn on Field Map and Debug Mode so that you can see the data that’s coming over from Kintone and match those fields with the merge fields.
For testing, set the status:
- Select “Test Mode”
- Check the box “Save merge data for debugging”
For using the field map for custom integrations, set the advanced settings on the right of the page as seen below
Step 3. Define custom field mappings in Formstack Documents
Open up the Field Map tab and for each merge field, enter the associated field code of the Kintone field.
Note - Make sure to define your delivery method for where you'd like to send your document, for this example we've included an article for how to setup an email delivery.
Step 4. Retrieve test Webhook URLs in Formstack Documents
From the Merge tab, copy the Test URL.
Step 5. Create Webhook connection on Kintone App
Login to Kintone. Go to the App Settings of the desired app and open the Webhooks settings.
Click on the plus icon and set the name and description of your webhook. Enter the Webhook URL retrieved from Formstack Documents. Define when you want Webhook to trigger (Recommended: Status Change). Then, check the box to activate the webhook and save the settings.
Note: When copy and pasting the merge URL, please make sure you've removed https:// from the URL. Kintone will automatically add this.
Step 6. Test the integration
Now that you’re all done with your setup, let’s test the integration. Test out the trigger you setup. In this case, the webhook is triggered when the “Status is changed” so I would create a sample record and change the status of the process management workflow.
Note: Ensure the document is in Test Mode on Formstack Documents to avoid consuming any merge counts during development.
Step 7. Start using the integration
Once you’ve confirmed the integration is setup correctly, go back to your Formstack Documents account and change the status of your template from “Test Mode” to “Active”.