{"id":24505008,"url":"https://github.com/austinsonger/googleform-2-zendesk","last_synced_at":"2025-03-15T08:32:11.871Z","repository":{"id":207509418,"uuid":"719425162","full_name":"austinsonger/GoogleForm-2-ZenDesk","owner":"austinsonger","description":"This code is designed to automate the process of handling responses from a Google Form submission, creating a document based on a template, and generating a ticket in Zendesk (a customer service software).","archived":false,"fork":false,"pushed_at":"2023-11-16T07:09:51.000Z","size":456,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T23:31:38.569Z","etag":null,"topics":["google-app-script","google-apps-script"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austinsonger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-16T06:15:08.000Z","updated_at":"2023-11-16T06:21:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"42a6c6c5-31e4-420b-9fb5-eaa6c12cefce","html_url":"https://github.com/austinsonger/GoogleForm-2-ZenDesk","commit_stats":null,"previous_names":["austinsonger/googleform-2-zendesk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinsonger%2FGoogleForm-2-ZenDesk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinsonger%2FGoogleForm-2-ZenDesk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinsonger%2FGoogleForm-2-ZenDesk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinsonger%2FGoogleForm-2-ZenDesk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austinsonger","download_url":"https://codeload.github.com/austinsonger/GoogleForm-2-ZenDesk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707200,"owners_count":20334611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-app-script","google-apps-script"],"created_at":"2025-01-21T23:28:30.361Z","updated_at":"2025-03-15T08:32:11.832Z","avatar_url":"https://github.com/austinsonger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoogleForm-2-ZenDesk\n\n### Purpose of the Code\nThis code is designed to automate the process of handling responses from a Google Form submission, creating a document based on a template, and generating a ticket in Zendesk (a customer service software).\n\n\n##### Starting Point - onFormSubmit Function:\n   - This function is triggered when a form is submitted.\n   - It first checks if the form submission is valid. If not, it logs a message and stops.\n   - It then collects the responses from the form and stores them in a structured format (`formData`).\n\n\n##### Processing Form Responses:\n   - The code loops through each response, categorizing them based on their title (like 'Type of Ticket' and 'Ticket Owner').\n   - It identifies if the ticket is a 'Change' type and stores the relevant information.\n\n\n##### Validation Check:\n   - It checks if essential information like 'Type of Ticket' and 'Ticket Owner' is present. If not, it logs a message and s\n\n##### Document Creation and Updating:\n   - The code then uses a function (`createGoogleDocFromTemplateInSharedDriveFolder`) to create a Google Document from a template. This document is named and stored in a specific folder.\n   - It replaces placeholders in the document with the actual form data.\n   - The document title is updated with details like the type of ticket, ticket owner, and ticket ID.\n\n\n##### Zendesk Ticket Creation:\n   - A Zendesk ticket is created using the `createZendeskTicket` function.\n   - This function constructs a ticket with a subject and a message body containing a link to the Google Document.\n   - If the ticket type is 'Access Request', it sets a specific ticket status.\n\n\n##### Spreadsheet Logging:\n   - The `getSpreadsheetUrl` function is used to log the URL of a spreadsheet where form responses might be recorded.\n\n\n##### Additional Functions:\n   - `updateTicketStatus`: Updates the status of a Zendesk ticket.\n   - `updateGoogleDocTitle`: Updates the title of the Google Document.\n   - `getTemplateIdByTypeOfTicket`: Determines the template ID based on the type of ticket.\n  \n  \n##### Security Note\n\nThe code includes sensitive information like a Zendesk token and email addresses, which should be securely managed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinsonger%2Fgoogleform-2-zendesk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustinsonger%2Fgoogleform-2-zendesk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinsonger%2Fgoogleform-2-zendesk/lists"}