InsightConnect Marketplace

Google Docs

Back to Marketplace

Google Docs

v1.1.0

Create and retrieve Google documents

Tags: docuement, google, drive, utilities


Actions
  • Append Line
  • Create Blank Document
  • Create Document
  • Get Document

Description

Google Docs is a online word processor. The plugin allows you to create and retrieve Google documents.

Key Features

  • Create Google documents
  • Get Google documents

Requirements

Documentation

Setup

  1. Enable the Google Docs API from the developer console by searching for "Google Docs API" and selecting Enable
  2. Choose Credentials on the left-hand pane and select '+ Create Credentials' at the top of page
  3. Choose OAuth 2
  4. Enable 'Consent Screen' and configure the consent with your desired permissions
  5. Complete the 'OAuth 2.0 Client IDs' configuration
  6. On the Credentials page, find your newly created OAuth Client and click the download arrow icon next to the trashcan
  7. Copy and paste the contents of the downloaded credential file into the plugin's connection

The connection configuration accepts the following parameters:

Name Type Default Required Description Enum Example
credentials_file_contents credential_secret_key None True Copy and paste the contents of the credentials file provided by Google None { "credentials_file_contents": { "secretKey": "{"type":"service_account","project_id":"project-1111111111111","private_key_id": "a1111aa111111aaa1111a1aa1aa111aa1a11aaaa1","private_key": "-----BEGIN PRIVATE KEY-----\\nc29tZSBwcml2YXRlIGtleQ==\\n-----END PRIVATE KEY-----\\n","client_email": "user@example.com","client_id": "111111111111111111111","auth_uri": "https://accounts.google.com/o/oauth2/auth","token_uri": "https://oauth2.googleapis.com/token","auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test%40project-1111111111111.iam.gserviceaccount.com"}" } }

Example input:

{
  "credentials_file_contents": {
    "secretKey": "{\"type\":\"service_account\",\"project_id\":\"project-1111111111111\",\"private_key_id\": \"a1111aa111111aaa1111a1aa1aa111aa1a11aaaa1\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\\\nc29tZSBwcml2YXRlIGtleQ==\\\\n-----END PRIVATE KEY-----\\\\n\",\"client_email\": \"user@example.com\",\"client_id\": \"111111111111111111111\",\"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\"token_uri\": \"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/test%40project-1111111111111.iam.gserviceaccount.com\"}"
  }
}

Technical Details

Actions

Append Line

This action is used to append line at end of document.

Input
Name Type Default Required Description Enum Example
content string None True Document content None This line will be added to end of document
document_id string None True Document ID None 1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q

Example input:

{
  "document_id": "1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q",
  "content": "This line will be added to end of document"
}
Output
Name Type Required Description
result create_result True Append line result

Example output:

{
  "result": {
    "replies": [
      {}
    ],
    "writeControl": {
      "requiredRevisionId": "ALm37BXuK4Riu0b1tbfv_hcbywo6sqKmArHp9GjZXy3xmRHAMG3p8C46LxZzMynRAoeC2_WSzDQrp4CGN7Gf"
    },
    "documentId": "1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q"
  }
}

Create Blank Document

This action is used to create a blank Google document.

Input
Name Type Default Required Description Enum Example
title string None True Document Title None New Document by InsightConnect

Example input:

{
  "title": "New Document by InsightConnect"
}
Output
Name Type Required Description
document document True Created Document

Example output:

{
  "document": {
    "title": "New Document by InsightConnect",
    "body": {
      "content": [
        {
          "endIndex": 1,
          "sectionBreak": {
            "sectionStyle": {
              "columnSeparatorStyle": "NONE",
              "contentDirection": "LEFT_TO_RIGHT"
            }
          }
        },
        {
          "startIndex": 1,
          "endIndex": 2,
          "paragraph": {
            "elements": [
              {
                "startIndex": 1,
                "endIndex": 2,
                "textRun": {
                  "content": "\n",
                  "textStyle": {}
                }
              }
            ],
            "paragraphStyle": {
              "namedStyleType": "NORMAL_TEXT",
              "direction": "LEFT_TO_RIGHT"
            }
          }
        }
      ]
    },
    "documentStyle": {
      "background": {
        "color": {}
      },
      "pageNumberStart": 1,
      "marginTop": {
        "magnitude": 72,
        "unit": "PT"
      },
      "marginBottom": {
        "magnitude": 72,
        "unit": "PT"
      },
      "marginRight": {
        "magnitude": 72,
        "unit": "PT"
      },
      "marginLeft": {
        "magnitude": 72,
        "unit": "PT"
      },
      "pageSize": {
        "height": {
          "magnitude": 792,
          "unit": "PT"
        },
        "width": {
          "magnitude": 612,
          "unit": "PT"
        }
      }
    },
    "namedStyles": {
      "styles": [
        {
          "namedStyleType": "NORMAL_TEXT",
          "textStyle": {
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "smallCaps": false,
            "backgroundColor": {},
            "foregroundColor": {
              "color": {
                "rgbColor": {}
              }
            },
            "fontSize": {
              "magnitude": 11,
              "unit": "PT"
            },
            "weightedFontFamily": {
              "fontFamily": "Arial",
              "weight": 400
            },
            "baselineOffset": "NONE"
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "alignment": "START",
            "lineSpacing": 115,
            "direction": "LEFT_TO_RIGHT",
            "spacingMode": "COLLAPSE_LISTS",
            "spaceAbove": {
              "unit": "PT"
            },
            "spaceBelow": {
              "unit": "PT"
            },
            "borderBetween": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderTop": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderBottom": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderLeft": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderRight": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "indentFirstLine": {
              "unit": "PT"
            },
            "indentStart": {
              "unit": "PT"
            },
            "indentEnd": {
              "unit": "PT"
            },
            "keepLinesTogether": false,
            "keepWithNext": false,
            "avoidWidowAndOrphan": true,
            "shading": {
              "backgroundColor": {}
            }
          }
        },
        {
          "namedStyleType": "HEADING_1",
          "textStyle": {
            "fontSize": {
              "magnitude": 20,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 20,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 6,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_2",
          "textStyle": {
            "bold": false,
            "fontSize": {
              "magnitude": 16,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 18,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 6,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_3",
          "textStyle": {
            "bold": false,
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.2627451,
                  "green": 0.2627451,
                  "blue": 0.2627451
                }
              }
            },
            "fontSize": {
              "magnitude": 14,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 16,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_4",
          "textStyle": {
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 12,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 14,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_5",
          "textStyle": {
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 11,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 12,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_6",
          "textStyle": {
            "italic": true,
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 11,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 12,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "TITLE",
          "textStyle": {
            "fontSize": {
              "magnitude": 26,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 3,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "SUBTITLE",
          "textStyle": {
            "italic": false,
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 15,
              "unit": "PT"
            },
            "weightedFontFamily": {
              "fontFamily": "Arial",
              "weight": 400
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 16,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        }
      ]
    },
    "revisionId": "AOV_f4_6TbAXNLqEHuln5ayjQnUXQhPiInTuPKc66XgI86IWROm6LJUFjwwAeagTgeASRbRR1Cl0SiKtmAi14w",
    "suggestionsViewMode": "SUGGESTIONS_INLINE",
    "documentId": "1q6n-6JUd1TfzBXGJ_RbBqQOljLbl7j6ioeU5y64IXu0"
  }
}

Create Document

This action is used to create a Google document.

Input
Name Type Default Required Description Enum Example
content string None True This Google Doc document was created by InsightConnect None None
title string None True Document Title None New Document by InsightConnect

Example input:

{
  "content": "This Google Doc document was created by InsightConnect",
  "title": "New Document by InsightConnect"
}
Output
Name Type Required Description
result create_result True Document creation result

Example output:

{
  "result": {
    "replies": [
      {}
    ],
    "writeControl": {
      "requiredRevisionId": "AOV_f49mLnIJFgmk7psTgc5_PVg2kWLko70CMGdjFnBIbYCh-GbEZKXhRH2nMrmLgLu-ZTVF8VnzwHIpxg8v5g"
    },
    "documentId": "1LuCjmLbV_-LVihVa2OPOuvcGnIS4nmG0J84Wfw58Gy4"
  }
}

Get Document

This action is used to get a Google document.

Input
Name Type Default Required Description Enum Example
document_id string None True Document ID None 1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q

Example input:

{
  "document_id": "1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q"
}
Output
Name Type Required Description
document document True Document Object

Example output:

{
  "document": {
    "title": "New Document by InsightConnect",
    "body": {
      "content": [
        {
          "endIndex": 1,
          "sectionBreak": {
            "sectionStyle": {
              "columnSeparatorStyle": "NONE",
              "contentDirection": "LEFT_TO_RIGHT"
            }
          }
        },
        {
          "startIndex": 1,
          "endIndex": 46,
          "paragraph": {
            "elements": [
              {
                "startIndex": 1,
                "endIndex": 46,
                "textRun": {
                  "content": "This is some text that should be in the body\n",
                  "textStyle": {}
                }
              }
            ],
            "paragraphStyle": {
              "namedStyleType": "NORMAL_TEXT",
              "direction": "LEFT_TO_RIGHT"
            }
          }
        }
      ]
    },
    "documentStyle": {
      "background": {
        "color": {}
      },
      "pageNumberStart": 1,
      "marginTop": {
        "magnitude": 72,
        "unit": "PT"
      },
      "marginBottom": {
        "magnitude": 72,
        "unit": "PT"
      },
      "marginRight": {
        "magnitude": 72,
        "unit": "PT"
      },
      "marginLeft": {
        "magnitude": 72,
        "unit": "PT"
      },
      "pageSize": {
        "height": {
          "magnitude": 792,
          "unit": "PT"
        },
        "width": {
          "magnitude": 612,
          "unit": "PT"
        }
      }
    },
    "namedStyles": {
      "styles": [
        {
          "namedStyleType": "NORMAL_TEXT",
          "textStyle": {
            "bold": false,
            "italic": false,
            "underline": false,
            "strikethrough": false,
            "smallCaps": false,
            "backgroundColor": {},
            "foregroundColor": {
              "color": {
                "rgbColor": {}
              }
            },
            "fontSize": {
              "magnitude": 11,
              "unit": "PT"
            },
            "weightedFontFamily": {
              "fontFamily": "Arial",
              "weight": 400
            },
            "baselineOffset": "NONE"
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "alignment": "START",
            "lineSpacing": 115,
            "direction": "LEFT_TO_RIGHT",
            "spacingMode": "COLLAPSE_LISTS",
            "spaceAbove": {
              "unit": "PT"
            },
            "spaceBelow": {
              "unit": "PT"
            },
            "borderBetween": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderTop": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderBottom": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderLeft": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "borderRight": {
              "color": {},
              "width": {
                "unit": "PT"
              },
              "padding": {
                "unit": "PT"
              },
              "dashStyle": "SOLID"
            },
            "indentFirstLine": {
              "unit": "PT"
            },
            "indentStart": {
              "unit": "PT"
            },
            "indentEnd": {
              "unit": "PT"
            },
            "keepLinesTogether": false,
            "keepWithNext": false,
            "avoidWidowAndOrphan": true,
            "shading": {
              "backgroundColor": {}
            }
          }
        },
        {
          "namedStyleType": "HEADING_1",
          "textStyle": {
            "fontSize": {
              "magnitude": 20,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 20,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 6,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_2",
          "textStyle": {
            "bold": false,
            "fontSize": {
              "magnitude": 16,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 18,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 6,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_3",
          "textStyle": {
            "bold": false,
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.2627451,
                  "green": 0.2627451,
                  "blue": 0.2627451
                }
              }
            },
            "fontSize": {
              "magnitude": 14,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 16,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_4",
          "textStyle": {
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 12,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 14,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_5",
          "textStyle": {
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 11,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 12,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "HEADING_6",
          "textStyle": {
            "italic": true,
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 11,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "magnitude": 12,
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 4,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "TITLE",
          "textStyle": {
            "fontSize": {
              "magnitude": 26,
              "unit": "PT"
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 3,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        },
        {
          "namedStyleType": "SUBTITLE",
          "textStyle": {
            "italic": false,
            "foregroundColor": {
              "color": {
                "rgbColor": {
                  "red": 0.4,
                  "green": 0.4,
                  "blue": 0.4
                }
              }
            },
            "fontSize": {
              "magnitude": 15,
              "unit": "PT"
            },
            "weightedFontFamily": {
              "fontFamily": "Arial",
              "weight": 400
            }
          },
          "paragraphStyle": {
            "namedStyleType": "NORMAL_TEXT",
            "direction": "LEFT_TO_RIGHT",
            "spaceAbove": {
              "unit": "PT"
            },
            "spaceBelow": {
              "magnitude": 16,
              "unit": "PT"
            },
            "keepLinesTogether": true,
            "keepWithNext": true
          }
        }
      ]
    },
    "revisionId": "AOV_f4-ihmBtXazmNI3atxs6q__f_v95KD8CRRYr0A0r_JW6AvszrkUOTHGYc2duYLspaHXPvjnJWyIymNLAQQ",
    "suggestionsViewMode": "SUGGESTIONS_INLINE",
    "documentId": "1WTLf8-9swLvSJHQoyJyk-VCiU1ptTucJDrL4gZBUQ7Q"
  }
}

Triggers

This plugin does not contain any triggers.

Custom Output Types

This plugin does not contain any custom output types.

Troubleshooting

This plugin does not contain any troubleshooting information.

Version History

  • 1.1.0 - Add new Append Line action | Add example input
  • 1.0.1 - New spec and help.md format for the Extension Library
  • 1.0.0 - Initial plugin

Links

References

plugin_spec_version: v2
extension: plugin
products: [insightconnect]
name: google_docs
title: Google Docs
description: Create and retrieve Google documents
version: 1.1.0
vendor: rapid7
support: community
status: []
resources:
  source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/google_docs
  license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE
  vendor_url: https://www.google.com/
tags:
- docuement
- google
- drive
- utilities
hub_tags:
  use_cases: [data_utility]
  keywords: [docuement, google, drive, utilities]
  features: []
types:
  create_result:
    writeControl:
      title: "Write Control"
      type: object
      description: "Write control"
      required: false
    documentId:
      title: "Document ID"
      type: string
      description: "Document ID"
      required: false
    replies:
      title: "Replies"
      type: "[]object"
      description: "Replies"
      required: false
  document:
    body:
      title: "Body"
      type: object
      description: "Body"
      required: false
    documentStyle:
      title: "Document Style"
      type: object
      description: "Document Style"
      required: false
    title:
      title: "Title"
      type: string
      description: "Title"
      required: false
    revisionId:
      title: "Revision ID"
      type: string
      description: "Revision ID"
      required: false
    documentId:
      title: "Document ID"
      type: string
      description: "Document ID"
      required: false
    suggestionsViewMode:
      title: "Suggestions View Mode"
      type: string
      description: "Suggestions view mode"
      required: false
    namedStyles:
      title: "Named Styles"
      type: object
      description: "Named styles"
      required: false


connection: 
  credentials_file_contents:
    title: Credential File Contents
    description: Copy and paste the contents of the credentials file provided by Google
    type: credential_secret_key
    required: true
    example: '{ "credentials_file_contents": { "secretKey": "{\"type\":\"service_account\",\"project_id\":\"project-1111111111111\",\"private_key_id\": \"a1111aa111111aaa1111a1aa1aa111aa1a11aaaa1\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\\\nc29tZSBwcml2YXRlIGtleQ==\\\\n-----END PRIVATE KEY-----\\\\n\",\"client_email\": \"user@example.com\",\"client_id\": \"111111111111111111111\",\"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\"token_uri\": \"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/test%40project-1111111111111.iam.gserviceaccount.com\"}" } }'

actions:
  create_blank_document:
    title: Create Blank Document
    description: Create a blank Google document
    input:
      title:
        title: Title
        type: string
        description: Document Title
        required: true
        example: "New Document by InsightConnect"
    output:
      document:
        title: Document
        description: Created Document
        type: document
        required: true

  create_document:
    title: Create Document
    description: Create a Google document
    input:
      title:
        title: Title
        type: string
        description: Document Title
        required: true
        example: "New Document by InsightConnect"
      content:
        title: Content
        type: string
        description: "This Google Doc document was created by InsightConnect"
        required: true
    output:
      result:
        title: Result
        description: Document creation result
        type: create_result
        required: true

  get_document:
    title: Get Document
    description: Get a Google document
    input:
      document_id:
        title: Document ID
        description: Document ID
        type: string
        required: true
        example: "1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q"
    output:
      document:
        title: Document
        description: Document Object
        type: document
        required: true

  append_line:
    title: Append Line
    description: Append line at end of document
    input:
      document_id:
        title: Document ID
        description: Document ID
        type: string
        required: true
        example: "1wLmF13vLaGrzsnPbwh6bjNg72jFhr8t4B6unBbfJi_q"
      content:
        title: Content
        type: string
        description: Document content
        required: true
        example: "This line will be added to end of document"
    output:
      result:
        title: Result
        description: Append line result
        type: create_result
        required: true
Other plugins
McAfee Advanced Threat Defense
Rapid7   |   v1.5.0
Plugin
Get
Ivanti Security Controls
Rapid7   |   v1.3.0
Plugin
Get
Base64
Rapid7   |   v1.1.5
Plugin
Get
Fortinet FortiGate
Rapid7   |   v4.0.2
Plugin
Get
Jira
Rapid7   |   v6.0.0
Plugin
Get