Import CSV Set Forwarding

33 views
Skip to first unread message

Bill Benson

unread,
Dec 21, 2022, 3:54:07 PM12/21/22
to GAM for Google Workspace
Is it possible to import a CSV file with source email addresses and target email addresses then set forwarding with that file in GAM? If so what is the syntax?

Maj Marshall Giguere

unread,
Dec 21, 2022, 4:06:41 PM12/21/22
to google-ap...@googlegroups.com
https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Gmail-Forwarding#manage-forwarding-addresses
https://github.com/taers232c/GAMADV-XTD3/wiki/Bulk-Processing#csv-files

Assuming you are using advanced GAM, and that your CSV file has column headers 

CSV File: forwards.csv
user,forwardto
...

You could do the following:

$ gam csv ./forwards.csv user ~user add forwardingaddress ~forwardto

Maj Marshall E Giguere

NH Wing Director of IT

Civil Air Patrol, U.S. Air Force Auxiliary

GoCivilAirPatrol.com

nhwg.cap.gov

Volunteers serving America's communities, saving lives, and shaping futures.



On Wed, Dec 21, 2022 at 1:54 PM Bill Benson <whb...@gmail.com> wrote:
Is it possible to import a CSV file with source email addresses and target email addresses then set forwarding with that file in GAM? If so what is the syntax?

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/5bdfbf9b-c851-4091-ac1b-9c81760b58ban%40googlegroups.com.

Bill Benson

unread,
Dec 21, 2022, 4:34:57 PM12/21/22
to GAM for Google Workspace
Thank you sir, I will test this tomorrow and let you know how it goes.

Ross Scroggs

unread,
Dec 21, 2022, 4:37:01 PM12/21/22
to google-ap...@googlegroups.com
Marsh has the correct first step: you have to define a forwardingaddress before you can forward to it

The second step is to enable forwarding:

$ gam csv ./forwards.csv user ~user forward true  keep ~forwardto

keep retains the message in the original user's inbox, you can also say: trash archive markread.

Ross




--

Maj Marshall Giguere

unread,
Dec 21, 2022, 4:59:16 PM12/21/22
to google-ap...@googlegroups.com
Ross;

Thanks for keeping me honest.

-Marsh

Maj Marshall E Giguere

NH Wing Director of IT

Civil Air Patrol, U.S. Air Force Auxiliary

GoCivilAirPatrol.com

nhwg.cap.gov

Volunteers serving America's communities, saving lives, and shaping futures.


Bassel Massamiri

unread,
Dec 22, 2022, 10:42:56 AM12/22/22
to google-ap...@googlegroups.com
Hello Guys,

I'm trying to create my own documentation and template , so i tried your commands but the second one is not working do you know why:

the first one is working:

gam csv gsheet <Email> <ID> forwarding gam user ~user add forwardingaddress ~forwardto

The second one is not working:

gam csv gsheet  <Email>  <ID>  forwarding gam user ~user forward true keep ~forwardto

Please let me know thanks


Ross Scroggs

unread,
Dec 22, 2022, 10:50:13 AM12/22/22
to google-ap...@googlegroups.com
"not working" doesn't give enough detail to determine the problem.

Provide more detail or send a Meet/Zoom invitation.

Ross
----
Ross Scroggs



Reply all
Reply to author
Forward
0 new messages