Add On – Google Drive

  1. For this integration to work you need to create an app inside google’s developer site. Log in to start creating your app.​.
  2. On the left side panel click Credentials.
  3. Once loaded click the Create credentials button and select OAuth Client ID.
  4. In the OAuth Client ID creation page you need to Configure a Product Name on the consent screen. To do that Click the blue button that says Configure Consent Screen
  5. Add the credentials needed for the Consent Page. Add your Email, Webiste URL, Product Name and other Optionals like Logo, Privacy Policy and Terms of Use. Once all credentials are added hit Save.
  6. After saving you will be redirected to the page to created the OAuth Client ID. Click the option Web Application and add the name you desire for the ID. Next is to add the Authorized Redirect URL. the with your own domain.
  7. Once done hit save and you will get the Client ID and Client Secret. Copy these 2 and pasted to a notepad and you will need to use it to integrate your Gravity 2 PDF and your Google Drive
  8. Log in to your wordpress account. It should be something like (Change to your real domain)
  9. Navigate to the left side panel of the dashboard look for the Gravity 2 PDF menu and select Add-ons to start adding the add-ons.
  10. Once the Add-on section is loaded. Click the Install text below the add-on you want to install. In this case we need to install Gravity 2 PDF – Google Drive
  11. Next step is to activate the add-on you just installed. Click the Activate text below the add-on.
  12. Once activated it will be automatically added to Gravity 2 PDF Settings.
  13. Now we will add the API Key and Secret to our newly added plug-in. At the left side navigation of the dashboard hover your mouse to Gravity 2 PDF and click Google Drive.
  14. Add the API key and secret you got from creating your google drive app to their respective textbox and once it is added click Save. Then click the Get Access Token.
  15. After you click the button I will ask you to log in to your Google account if you are not logged in but if you are logged in already. Since you created the App you know that this is safe and no harm will happen to your site so if you encountered a warning that says the app is not verified you can just proceed to the integration.
  16. After that you will be redirected to the page where you will allow the connection of your Google Drive App to your Gravity 2 PDF. Click the Allow button and it will automatically add your token and redirect you back to your website.
  17. Now we will use the newly added Plug-in to our Merge PDF Setting. To do that hover your mouse to Gravity 2 PDF and Click Gravity 2 PDF. Look for the Merge you want to add the Google Drive Add-on and click Edit.
  18. Scroll down at the bottom part of the page and at the Delivery Type dropdown menu look for Google option and click Add.
  19. It will add a textbox to the page which will ask you to name the folder you want to store the file. You can use also some user variables and gravity form IDs as well to keep your files organized.
  20. Once all the configuration is done, test the setting and you will see the folder will be created in your Google Drive account with the file inside it.