Respond in bulk using the logic app and gmail filter
starts with oauth journey! and moves on to sandbox with jsons
using the filter go over them

todo > check the leads do not send 2 emails in one week >>>
todo > send the optimized version always
todo > add the contact date
Gmail label is the key to the solution

Issue is the locale >>> Send them a bulk email might not make sense ?
todo: spot the locale of the email >>> send the attachments >>> make sure you are in their email database
there is no listing with the labels



https://gmail.googleapis.com/gmail/v1/users/[email protected]/messages?q=label:0_sales_triggerlogicappwithmessageLabel

Go to gmail api

Enable first

https://console.cloud.google.com/apis/library/gmail.googleapis.com?project=pexabo-252021
Generate a key

key=apikey did not work

bearer keyword
https://stackoverflow.com/questions/35433362/how-to-post-access-token-parameter-to-the-gmail-api
IT SAID UNSANITIZED


move to oauth

postman giving a good idea

https://www.postman.com/api-evangelist/workspace/google/request/35240-0f7aae6f-445f-4063-bc17-2c75b9dae4d3

Forked version and testing

create the sysntax

same error at least the other parts should be ok

Path variable did not change it

focus on oauth2

there is download json at the creation stage

format dsl needed

edit and add the oauth2 token

a bit more complex usecase

https://learn.microsoft.com/en-us/answers/questions/1178938/how-to-use-oauth-2-0-authorization-in-logic-apps-h
I need 2?

Instead of status code something else is needed

2 step action why computer people get paid


multi video https://youtu.be/IV3PN7IejTg
Workflow

Multi stage in the middle apps

oauth2 >>> 2 stages for the tokens >> temporary access
First one to pass to the other one >>> get the json and it has the necesarry call mechanism

Add all to make it work

Granttype error

Main document
https://developers.google.com/identity/protocols/oauth2
Getting the code

Postman has the client to get this working

https://blog.postman.com/how-to-access-google-apis-using-oauth-in-postman/
similar implementation

url is token not auth like mine

error is back

similar issue
https://stackoverflow.com/questions/59210775/able-to-generate-token-for-salesforce-using-postman-but-same-i-tried-using-logic
in the body similar error

json should have this parameter!
Another app similar use > https://www.mikaelsand.se/2023/01/getting-a-bearer-token-from-aad-using-logic-apps/
access token with multi stages
https://gotoguy.blog/2020/12/05/blog-series-powering-up-your-home-office-lights-part-4-using-logic-apps-to-get-access-token-and-renew-access-token-if-needed/
someone sorted with a different action?
https://stackoverflow.com/questions/76535668/how-do-i-use-an-azure-logic-app-to-request-an-oauth-access-token
i get this error

i move to application/json it did not change
https://stackoverflow.com/questions/76535668/how-do-i-use-an-azure-logic-app-to-request-an-oauth-access-token
no built in connector

Pivot and use a function

Goal > save 40 minute of email reply time daily

move to function app and use python!
https://cloud.google.com/functions/docs/samples/functions-bearer-token#functions_bearer_token-python

https://cloud.google.com/functions/docs/samples/functions-bearer-token#functions_bearer_token-python
simpler play by using the google code that is ready

python no browser based generators

make platform ready action

https://stackoverflow.com/questions/38494279/how-do-i-get-an-oauth-2-0-authentication-token-in-c-sharp
Create a function was there

its own libraries can not be loaded

add new library

dot net library
https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth
library testin

Google to be loaded?

Docker ?
your code your library more cosrt

There is a cost based on it so there is a decision to be made here
using the http is much better >>> find the way
https://stackoverflow.com/questions/43408821/google-oauth2-returns-unsupported-grant-type-via-curl-php
Gmail api and first principles

verification not required

There is javascript there

maybe the javascript version can work on the logic app


https://developers.google.com/identity/protocols/oauth2/javascript-implicit-flow
old frined javascript

Thanks for the complex diagram

restart here

Centralised and bespoke system

Back to the IDE on the mac

Concepts

There is a specification

Game server not to get the username and password

Python implementation

OAuth implementation
https://github.com/LindaLawton/GoogleAuthSimple/blob/master/GoogleAuthWinForm/AuthResponse.cs
Maybe oauth by postman is a better example
As I do not wanna pay for the process runner
first step just starts with the clientid

maybe logic app with token would not resolve the issue >>> as it always need a page?
I might need an app code

Response has the code

Second one had the clientid secret and code >>> to get refresh code

Last one is the access code
Refresh and access token comes in


Collection
https://github.com/afsarali273/GmailAPI/blob/master/Gmail/Gmail%20Authentication.postman_collection.json
Refresh token lets you get an access token all the time

80 percent of the job is the access token part

ecen the message id is here

Start with terminate and pretty jason > Code could be the critical part

url different

it send me a page to open

The output is atleast making some sense?


different errors can be progress

removed user intervention to click is what i am looking for

https://stackoverflow.com/questions/25816335/using-google-apis-for-ones-own-account-without-oauth
There is a playground

Exhange code for tokens is there

Setting shown on ui

https://developers.google.com/oauthplayground/
use your own

fix for redirect


https://developers.google.com/oauthplayground
add the second one

uploader name is there

but i had to click it

at least the labels are back

I might need the service account there is still no way without the redirect page?
There is force prompt no option

List url
https://gmail.googleapis.com/gmail/v1/users/[email protected]/messages

Roll back to step 1

Request / Response
GET /oauthplayground/?code=4%2F0AfJohXmieP3pOwUbweSi99iMjz2J5zZxrRG9g8ta9VHOtIvlShgQGdIl5tsG3PkEeZpEew&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly HTTP/1.1
Host: developers.google.com
Am i getting one time code for unattended access?
https://developers.google.com/identity/protocols/oauth2/web-server#offline
my use case with logic apps unattended server
https://developers.google.com/identity/protocols/oauth2/web-server#offline
Inside still this is missing
https://accounts.google.com/signin/oauth/error/v2?authError=Cg9pbnZhbGlkX3JlcXVlc3QSLFJlcXVpcmVkIHBhcmFtZXRlciBpcyBtaXNzaW5nOiByZXNwb25zZV90eXBlGjdodHRwczovL2RldmVsb3BlcnMuZ29vZ2xlLmNvbS9pZGVudGl0eS9wcm90b2NvbHMvb2F1dGgyIJAD

maybe the way to go is to get the emails from outlook

todo > than from email address needs to be parsed some how!
I can forward than i lose some metadata

Also forward did not work as well

getting this code in the server is the key but i dont have the server in the serverless logic app format

>>> maybe i read the emails and put them to a database than i process them from the database ?
Do it on a temporary basis than move on to a trigger basis

https://developers.google.com/oauthplayground/?code=4%2F0AfJohXmieP3pOwUbweSi99iMjz2J5zZxrRG9g8ta9VHOtIvlShgQGdIl5tsG3PkEeZpEew&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly
Allow it( maybe in the future i resolve this issue)

Temporary labels output
Request / Response
GET /gmail/v1/users/[email protected]/labels HTTP/1.1
Host: gmail.googleapis.com
Content-length: 0
Authorization: Bearer ya29.a0AfB_byD6rfdL-g7yT7tB64YeJUEPwS8RyfVTdVe7_-UwIMdXDW83jMKuiLu6vQKv8Xxb0QzM24-2-ynTNToIF9FiOvYUvPS2PqBKS-WBkSC2iCKjKUa4C3c715sy9CtwhXqWnZTWetCYF4MZKYOuf2ZdoU-BwbkzsifpaCgYKARcSAQ8SFQHGX2Mi1w_tR3-OxLw6XkFpEAwxpA0171HTTP/1.1 200 OK
Content-length: 4085
X-xss-protection: 0
Content-location: https://gmail.googleapis.com/gmail/v1/users/[email protected]/labels
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Thu, 25 Jan 2024 18:46:07 GMT
X-frame-options: SAMEORIGIN
Alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-type: application/json; charset=UTF-8{
"labels": [
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "CHAT",
"name": "CHAT"
},
{
"type": "system",
"id": "SENT",
"name": "SENT"
},
{
"type": "system",
"id": "INBOX",
"name": "INBOX"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "IMPORTANT",
"name": "IMPORTANT"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "TRASH",
"name": "TRASH"
},
{
"type": "system",
"id": "DRAFT",
"name": "DRAFT"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "SPAM",
"name": "SPAM"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "CATEGORY_FORUMS",
"name": "CATEGORY_FORUMS"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "CATEGORY_UPDATES",
"name": "CATEGORY_UPDATES"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "CATEGORY_PERSONAL",
"name": "CATEGORY_PERSONAL"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "CATEGORY_PROMOTIONS",
"name": "CATEGORY_PROMOTIONS"
},
{
"type": "system",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "CATEGORY_SOCIAL",
"name": "CATEGORY_SOCIAL"
},
{
"type": "system",
"id": "STARRED",
"name": "STARRED"
},
{
"type": "system",
"id": "UNREAD",
"name": "UNREAD"
},
** {
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_1452878502214202942",
"name": "0_sales_triggerlogicappwithmessageLabel"
}, **
{
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_2108590433463520064",
"name": "0_sales_USACorp"
},
{
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_3411671104323131884",
"name": "2_spending_invoice"
},
{
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_4235701552592087655",
"name": "3_packing_thinkific"
},
{
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_4243453649684566832",
"name": "3_pack_udemy"
},
{
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_4716836601042464671",
"name": "1_borrow_followupMain"
},
{
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_4808420618647086460",
"name": "0_sales_pluralsight"
},
{
"type": "user",
"labelListVisibility": "labelHide",
"messageListVisibility": "show",
"id": "Label_5572518215070687438",
"name": "spending_visafollowup"
},
{
"type": "user",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "Label_5837701917314130044",
"name": "_sales_Payoneer"
},
{
"type": "user",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "Label_6",
"name": "Notes"
},
{
"type": "user",
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"id": "Label_7904937592462891222",
"name": "_sales_cprime"
}
]
}
my selection
** {
"type": "user",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"id": "Label_1452878502214202942",
"name": "0_sales_triggerlogicappwithmessageLabel"
}, **
57 messages to pull

Google Api explorer is the action

Api explorer is the way to go

Much practical

57 to 58 >>> tested as the labels are working

Never worked now it is going to work >>> i also expect the leads to be added

test with one

Lets make replyid work first

multi fails

retry none

Location not send

email not send

gmail works not the best still it is in

Every 30 seconds to send it

check before cancel > many events at home happening

multi sending issue

Recruiter already in

it looks like i am sending an email but not saving to the database

answered a request>>> i am working / yelled >>> working from home others are not there >>> not noticing the gaps and moving on to other things that happens at home
contractormarketing-savelead-bygmaillabel >>> future logic app todo it.
Imported from rifaterdemsahin.com · 2024