You can merge data from Infusionsoft into a Google Doc — or PDF — with no code at all. This recipe requires an HTTP Post in an Infusionsoft campaign, a Google Form, a Google Spreadsheet, a Google Doc, and the autoCrat add-on for Google Apps.
1. Prepare the Google Doc merge template. Insert tags formatted as a field name inside double carrots, e.g. “Dear <<firstname>>:”. Use a single word for your field name, but it can be whatever you want. (Click here to see an example.)
2. Set up a Google Form with “questions” for all the data you want to merge. In the form settings under the gear icon, deselect any sign in restrictions (so you can submit data via HTTP Post). (Click here to see an example.)
3. On the Google Form under Responses, click the “more” dots and choose “Select response destination” to set a Google Spreadsheet to hold the data.
4. In the Google Spreadsheet, install the add-on autoCrat.
5. In autoCrat, create a new job to merge the data from the spreadsheet into the Google Doc. In step 9, be sure to select “Yes” for the option “Run on form trigger”. (If you want to create a PDF instead of a Google Doc, select the correct type in step 4.)
(Here comes the most technical part. In order to create the HTTP Post, you need the form’s POST URL and you need the html names of the fields you want to fill out, which is different than the names you gave them. I recommend copying this information to a text file for reference as you will need to paste it into Infusionsoft.)
6. View the Google Form you created (as if you are going to fill it out) in Chrome.
7. Hover over the blank space on the form just above the title and right click on the from and choose Inspect to open the page source code. A few lines up you should see this:
form action=" followed by a URL. Copy the URL to a text file.
8. Hover over the first field you will want to fill out and right click to Inspect again. In the source code scroll down a few lines until you see something that looks like this:
input type="hidden" name="entry.1462991265" Copy the name (in this case entry.1462991265) to the text file and note what it identifies.
9. Repeat step 8 for each field. Keep track of which entry name belongs to which information.
Ok, hard part done. Now you should have a text file with a URL and a list of html field names and what they stand for.
10. In a campaign in Infusionsoft (at the point where you want the document to be created), create an HTTP Post.
11. Copy the URL from your form into the POST URL field in the HTTP Post.
12. Add a name/value pair with the name “submit” and the value “Submit”.
13. Add name/value pairs for each of the data fields you want to send to the Google Doc. The name will be the entry name you copied in step 8. The value will be the Infusionsoft merge field, e.g. ~Contact.FirstName~.
14. Set your HTTP Post to Ready and publish the campaign.
That’s it! When the HTTP Post fires, it will send the data from the values into the form fields you designated as names. That data will be saved as a form entry and will be sent to the spreadsheet. AutoCrat will merge the data from the speadsheet into the Google doc and, if you selected it, create a PDF on your Google Drive.